devzone 0.36.1 → 0.36.2

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.
@@ -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.2",
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": {