devzone 0.36.1 → 0.36.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -100,6 +100,14 @@ RUN export UV_TOOL_DIR=/opt/uv/tools UV_TOOL_BIN_DIR=/usr/local/bin \
100
100
  && uv tool install "vulture==${VULTURE_VERSION}" \
101
101
  && uv tool install "pytest==${PYTEST_VERSION}"
102
102
 
103
+ # Parents of the etat subPath mounts must belong to vscode (UID/GID 1000):
104
+ # the image has no ~/.local, so Kubernetes creates ~/.local, ~/.local/state
105
+ # and ~/.local/share as root when mounting the etat volume subPaths
106
+ # (~/.local/npm, ~/.local/state/oc-lancer, ~/.local/share/opencode...), and
107
+ # every tool writing there fails with EACCES (opencode --version: mkdir
108
+ # /home/vscode/.local/state) (#513)
109
+ RUN install -d -o 1000 -g 1000 /home/vscode/.local /home/vscode/.local/bin /home/vscode/.local/state /home/vscode/.local/share /home/vscode/.config
110
+
103
111
  # devzone scripts inside the image: the Kubernetes workspace pod has no
104
112
  # /workspaces/devzone checkout (#503). The Docker devcontainer relinks
105
113
  # /usr/local/bin/devzone to the mounted repository in post-create.sh.
@@ -326,18 +326,30 @@ dernier_journal_npm() {
326
326
  echo "${journal:-$HOME/.npm/_logs}"
327
327
  }
328
328
 
329
- # Installe les assistants IA figés, vérifiés par leur --version, 3 essais : npm
330
- # abandonne en silence un binaire de plateforme non téléchargé (#194)
329
+ # Installs each pinned AI assistant with its own npm command (3 tries each),
330
+ # then checks its binary: npm silently drops a platform binary it failed to
331
+ # download (#194), and one assistant failing must not block the other.
331
332
  installer_ia() {
332
- local essai
333
- for essai in 1 2 3; do
334
- if avec_progression npm install -g --no-fund --no-audit --loglevel=error "${IA_PAQUETS[@]}" >/dev/null &&
335
- claude --version >/dev/null 2>&1 && opencode --version >/dev/null 2>&1; then
336
- return 0
337
- fi
338
- [ "$essai" -eq 3 ] || echo "devzone : installation des assistants IA incomplète, nouvel essai ($((essai + 1))/3)…" >&2
333
+ local package binary attempt
334
+ IA_FAILED=()
335
+ for package in "${IA_PAQUETS[@]}"; do
336
+ case "$package" in
337
+ opencode-ai@*) binary=opencode ;;
338
+ *) binary=claude ;;
339
+ esac
340
+ for attempt in 1 2 3; do
341
+ if avec_progression npm install -g --no-fund --no-audit --loglevel=error "$package" >/dev/null &&
342
+ "$binary" --version >/dev/null 2>&1; then
343
+ break
344
+ fi
345
+ if [ "$attempt" -lt 3 ]; then
346
+ echo "devzone : installation de ${package%@*} incomplète, nouvel essai ($((attempt + 1))/3)…" >&2
347
+ else
348
+ IA_FAILED+=("$package")
349
+ fi
350
+ done
339
351
  done
340
- return 1
352
+ [ "${#IA_FAILED[@]}" -eq 0 ]
341
353
  }
342
354
 
343
355
  appliquer_ia() {
@@ -347,7 +359,7 @@ appliquer_ia() {
347
359
  if ! installer_ia; then
348
360
  journal="$(dernier_journal_npm)"
349
361
  echo "journal npm : $journal" >"$(fichier_echec ia)"
350
- echo "devzone : échec de l'installation de ${IA_PAQUETS[*]} (npm install -g, 3 essais) ; journal npm : $journal ; réessayer : devzone appliquer" >&2
362
+ echo "devzone : échec de l'installation de ${IA_FAILED[*]} (npm install -g, 3 essais) ; journal npm : $journal ; réessayer : devzone appliquer" >&2
351
363
  return 1
352
364
  fi
353
365
  rm -f "$(fichier_echec ia)"
@@ -5,7 +5,6 @@ set -euo pipefail
5
5
 
6
6
  ICI="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7
7
  RACINE="$(cd "$ICI/.." && pwd)"
8
-
9
8
  # Pod, namespace et dossier des projets dans le conteneur (#399).
10
9
  POD="devzone-workspace-0"
11
10
  NAMESPACE="devzone-workspace"
@@ -48,11 +47,17 @@ image_par_defaut() {
48
47
 
49
48
  # Attend le pod du workspace ; image introuvable ou pod lent sont dits clairement.
50
49
  attendre_pod() {
51
- local image="$1" attente pas debut etat evenements arch
50
+ local image="$1" attente pas debut etat evenements arch target_revision pod_revision
52
51
  attente="${DEVZONE_WORKSPACE_ATTENTE:-120}"
53
52
  pas="${DEVZONE_WORKSPACE_PAS:-2}"
54
53
  debut="$SECONDS"
55
54
  while [ $((SECONDS - debut)) -lt "$attente" ]; do
55
+ # Why: after helm upgrade the pod is still the old one; judge only the revision the StatefulSet is updating to, within the same wait bound.
56
+ # shellcheck disable=SC2046
57
+ target_revision="$(kubectl $(drapeau_kubectl) get statefulset devzone-workspace --namespace devzone-workspace -o jsonpath='{.status.updateRevision}' 2>/dev/null)" || true
58
+ # shellcheck disable=SC2046
59
+ pod_revision="$(kubectl $(drapeau_kubectl) get pod devzone-workspace-0 --namespace devzone-workspace -o jsonpath='{.metadata.labels.controller-revision-hash}' 2>/dev/null)" || true
60
+ if [ -z "$target_revision" ] || [ -z "$pod_revision" ] || [ "$target_revision" != "$pod_revision" ]; then sleep "$pas"; continue; fi
56
61
  # shellcheck disable=SC2046
57
62
  etat="$(kubectl $(drapeau_kubectl) get pod devzone-workspace-0 --namespace devzone-workspace \
58
63
  -o jsonpath='{.status.phase} {.status.initContainerStatuses[*].state.waiting.reason} {.status.containerStatuses[*].state.waiting.reason}' 2>/dev/null)" || true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devzone",
3
- "version": "0.36.1",
3
+ "version": "0.36.3",
4
4
  "description": "Ton poste de développement Linux, prêt en une commande, identique sur Mac, Windows et Linux.",
5
5
  "license": "GPL-3.0-only",
6
6
  "repository": {