amsd-pipeline 1.20.0 → 1.22.0

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.
Files changed (2) hide show
  1. package/install.sh +59 -0
  2. package/package.json +1 -1
package/install.sh CHANGED
@@ -257,10 +257,24 @@ if [ -n "$DEST" ]; then
257
257
  run_state_ensure_dirs "$INSTALLER_DIR/run-state-paths.json" "$DEST"
258
258
  fi
259
259
  _ok "packaged $_PKG_REF into $DEST"
260
+ # THE VERSION ACTUALLY INSTALLED, resolved from the ref that was packaged — never a literal.
261
+ # The dashboard shows this per run as the "code level", and it is the only answer an operator
262
+ # has to "what version is this box on". It came from EPAM_CODE_LEVEL hardcoded in
263
+ # launch-dashboard/.env.example and copied verbatim into every install ever made, so every
264
+ # install on every version reported the same frozen string.
265
+ _CODE_LEVEL="$(git -C "$_GIT_ROOT" describe --tags --exact-match "$_PKG_REF" 2>/dev/null \
266
+ || git -C "$_GIT_ROOT" describe --tags --always "$_PKG_REF" 2>/dev/null \
267
+ || printf '%s' "$_PKG_REF")"
260
268
  ROOT="$DEST"
261
269
  CONFIG="$ROOT/orchestrations/config"
262
270
  fi
263
271
 
272
+ # AN IN-PLACE INSTALL RESOLVES ITS VERSION THE SAME WAY — from the tree it is installing, so the
273
+ # answer is a fact about that tree rather than about how the installer was invoked.
274
+ if [ -z "${_CODE_LEVEL:-}" ]; then
275
+ _CODE_LEVEL="$(git -C "$ROOT" describe --tags --always 2>/dev/null || printf 'unknown')"
276
+ fi
277
+
264
278
  # ── What stacks exist, and which is default? Read, never listed here. ────────
265
279
  [ -f "$CONFIG/provider-sets.json" ] || { _bad "no provider-sets.json — is this the repo root?"; exit 1; }
266
280
  read -r DEFAULT_SET ALL_SETS <<<"$("$NODE_BIN" -e '
@@ -694,6 +708,23 @@ LAUNCH_HEALTH_TRIES="${EPAM_LAUNCH_HEALTH_TRIES:-30}"
694
708
  LAUNCH_HEALTH_INTERVAL="${EPAM_LAUNCH_HEALTH_INTERVAL:-1}"
695
709
  LAUNCH_STATUS=absent
696
710
 
711
+ # THE CODE LEVEL IS STAMPED WHETHER OR NOT DOCKER IS IN PLAY, and on EVERY install — it is a fact
712
+ # about this tree, not a setting and not a property of the dashboard stack. Stamped before the
713
+ # docker branch below so --no-docker installs are labelled correctly too, and re-stamped every
714
+ # time because the normal way an operator seeds launch-dashboard/.env is copying it forward from
715
+ # their previous install, which carries that install's version with it.
716
+ _stamp_code_level() {
717
+ local _f="$1"
718
+ [ -f "$_f" ] || return 0
719
+ if grep -q '^EPAM_CODE_LEVEL=' "$_f"; then
720
+ local _t; _t="$(mktemp)"
721
+ sed "s|^EPAM_CODE_LEVEL=.*|EPAM_CODE_LEVEL=${_CODE_LEVEL}|" "$_f" > "$_t" && mv "$_t" "$_f"
722
+ else
723
+ printf '\nEPAM_CODE_LEVEL=%s\n' "$_CODE_LEVEL" >> "$_f"
724
+ fi
725
+ }
726
+ _stamp_code_level "$LAUNCH_DIR/.env"
727
+
697
728
  if [ ! -f "$LAUNCH_COMPOSE" ]; then
698
729
  _ok "not present in this tree — nothing to provision"
699
730
  elif [ "$USE_DOCKER" = "no" ]; then
@@ -732,6 +763,7 @@ else
732
763
  else
733
764
  printf '\nLAUNCH_PASSWORD=%s\n' "$_DEFAULT_LAUNCH_PW" >> "$LAUNCH_DIR/.env"
734
765
  fi
766
+ _stamp_code_level "$LAUNCH_DIR/.env"
735
767
  _ok "launch-dashboard/.env created with the default LAUNCH_PASSWORD"
736
768
  printf ' LAUNCH_PASSWORD: %s\n' "$_DEFAULT_LAUNCH_PW"
737
769
  printf ' CHANGE THIS after your first login — it is the same on every fresh install.\n'
@@ -864,11 +896,38 @@ if [ "$CHECK_ONLY" = "0" ]; then
864
896
  "project": "${EPAM_PROJECT:-}",
865
897
  "installedAt": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
866
898
  "installRoot": "${ROOT}",
899
+ "version": "${_CODE_LEVEL}",
867
900
  "launchDashboard": "${LAUNCH_STATUS}"
868
901
  }
869
902
  MANIFEST
870
903
  fi
871
904
 
905
+ # ── Post-install health check — PROVE IT, do not just report having done it ──
906
+ #
907
+ # An installer that finishes its own steps and declares "ready" is reporting on ITSELF. Every
908
+ # operator-facing breakage on 2026-09-04 got past exactly that: the install did each step correctly
909
+ # and said ready, while the dashboard served 404 for /prd.json, Langfuse was probed on the wrong
910
+ # port, and a daemon held credentials nobody had filled in. A human opening a browser was the test.
911
+ #
912
+ # pipeline-health.sh already asks the RIGHT question — "can an operator launch a run from here,
913
+ # right now" — and probes the real endpoints. Running it here makes that the last word of every
914
+ # install, which is what the operator asked for: "why can't pipeline-health be used to detect all of
915
+ # these issues ... a post-install step to check pipeline health is best practice."
916
+ #
917
+ # ADVISORY, NOT FATAL. It reports on things an install legitimately cannot settle (no PRD ingested
918
+ # yet, an optional service nobody runs), so its verdict is surfaced and the install's own FAILED
919
+ # state is left to stand on its own. Skipped for --check (which IS a verification already) and when
920
+ # the install has already failed, where a second wall of red helps nobody.
921
+ if [ "$CHECK_ONLY" != "1" ] && [ "$FAILED" != "1" ] && [ -f "$INSTALLER_DIR/pipeline-health.sh" ]; then
922
+ _head "Post-install health check"
923
+ if bash "$INSTALLER_DIR/pipeline-health.sh" 2>&1 | sed 's/^/ /'; then
924
+ _ok "health check passed"
925
+ else
926
+ _warn "health check reported problems above — the install itself completed, but this machine is not ready to launch"
927
+ _warn "re-run it any time: bash orchestrations-installer/pipeline-health.sh"
928
+ fi
929
+ fi
930
+
872
931
  _head "Result"
873
932
  if [ "$FAILED" = "1" ]; then
874
933
  _bad "install incomplete — fix the items marked ✗ above"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amsd-pipeline",
3
- "version": "1.20.0",
3
+ "version": "1.22.0",
4
4
  "description": "Installer for the amsd-pipeline orchestration stack. Clones, packages and provisions the full stack with one command — no separate git clone step.",
5
5
  "bin": {
6
6
  "amsd-pipeline": "bin/amsd-pipeline.js"