diff --git a/.github/scripts/workflow-map.py b/.github/scripts/workflow-map.py index dc90c8a..68bda34 100644 --- a/.github/scripts/workflow-map.py +++ b/.github/scripts/workflow-map.py @@ -180,12 +180,12 @@ def render(rows, sources, language): out.append("") y += row_height notes = [ - "Build-only Configurator Release artifacts feed Prod. Dev-skip artifacts cannot be promoted to Prod.", + "One qualified/skip build feeds Dev and Prod; no rebuild. Historical Dev-only artifacts remain excluded.", "Shared infrastructure workflows choose lzc-dev / lzc-prod; no separate copies. * = source path filter.", "Environment reviewers and branch rules are configured in GitHub. Job conditions still apply; not every cell runs.", "Phase blocks summarize jobs, not a complete dependency DAG. Tests/packaging and staging can run in parallel.", ] if language == "en" else [ - "Build-only-Artefakte aus Configurator Release gehen an Prod. Dev-skip-Artefakte sind dafür nicht zulässig.", + "Ein Build mit qualified/skip versorgt Dev und Prod. Alte Dev-only-Artefakte bleiben ausgeschlossen.", "Gemeinsame Infrastruktur-Workflows wählen lzc-dev / lzc-prod; keine Kopien. * = Quellpfadfilter.", "Reviewer und Branchregeln werden in GitHub gesetzt. Job-Bedingungen gelten weiter; nicht jede Zelle läuft.", "Phasenblöcke fassen Jobs zusammen, kein vollständiger Abhängigkeitsgraph. Tests und Staging laufen teils parallel.", diff --git a/.github/workflows/configurator-production.yml b/.github/workflows/configurator-production.yml index af3f747..64010a1 100644 --- a/.github/workflows/configurator-production.yml +++ b/.github/workflows/configurator-production.yml @@ -10,17 +10,17 @@ on: version: description: Stable GitHub Release tag type: string - default: v2.0.0 + default: v2.1.0 required: true release_run_id: - description: Successful build-only run; required when publishing a new release + description: Successful Configurator Release run (with or without Dev deployment); reuse its immutable build type: string required: false release_mode: description: Assistant qualification policy recorded in the published manifest type: choice - default: accepted-assistant-limitations - options: [qualified, accepted-assistant-limitations] + default: skip + options: [skip, qualified] release: types: [published] diff --git a/.github/workflows/configurator-release.yml b/.github/workflows/configurator-release.yml index d8e76d2..4797b78 100644 --- a/.github/workflows/configurator-release.yml +++ b/.github/workflows/configurator-release.yml @@ -4,10 +4,10 @@ on: workflow_dispatch: inputs: release_mode: - description: Qualification policy; accepted limitations records issue 225 for a manually approved production release + description: Assistant live qualification; skip records an unqualified build usable in Dev and Prod type: choice - default: qualified - options: ['qualified', 'dev-skip-assistant-qualification', 'accepted-assistant-limitations'] + default: skip + options: ['skip', 'qualified'] build_only: description: Build and publish the immutable release and buildpack tag without deploying type: boolean @@ -44,9 +44,9 @@ jobs: secrets: inherit build: - name: ${{ inputs.release_mode == 'dev-skip-assistant-qualification' && 'build-dev-skip-assistant-qualification' || inputs.release_mode == 'accepted-assistant-limitations' && 'build-accepted-assistant-limitations' || 'build' }} + name: ${{ inputs.release_mode == 'skip' && 'build-skip' || 'build' }} needs: assistant - if: always() && !cancelled() && ((inputs.release_mode == 'accepted-assistant-limitations' && inputs.build_only && github.ref == 'refs/heads/main' && needs.assistant.result == 'skipped') || (inputs.release_mode == 'dev-skip-assistant-qualification' && github.ref == 'refs/heads/main' && needs.assistant.result == 'skipped') || (inputs.release_mode != 'dev-skip-assistant-qualification' && needs.assistant.result == 'success')) && vars.LZC_RELEASE_CI_ENABLED == 'true' && github.event_name == 'workflow_dispatch' && github.run_attempt == 1 && !inputs.release_run_id && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/feature/landing-zone-configurator') + if: always() && !cancelled() && ((inputs.release_mode == 'skip' && github.ref == 'refs/heads/main' && needs.assistant.result == 'skipped') || (inputs.release_mode == 'qualified' && needs.assistant.result == 'success')) && vars.LZC_RELEASE_CI_ENABLED == 'true' && github.event_name == 'workflow_dispatch' && github.run_attempt == 1 && !inputs.release_run_id && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/feature/landing-zone-configurator') runs-on: ubuntu-latest timeout-minutes: 25 services: @@ -144,11 +144,8 @@ jobs: run: | node ../infra/ci/release-artifact.mjs create ../.local echo "Release mode: $LZC_RELEASE_MODE" >> "$GITHUB_STEP_SUMMARY" - if [ "$LZC_RELEASE_MODE" = dev-skip-assistant-qualification ]; then - echo 'Dev only; live Assistant qualification NOT performed; runtime Assistant setting unchanged. Promotion is prohibited.' >> "$GITHUB_STEP_SUMMARY" - fi - if [ "$LZC_RELEASE_MODE" = accepted-assistant-limitations ]; then - echo 'Assistant is NOT fully qualified. Known intermittent HTTP 400 failures: issue #225. Production requires published GitHub Release and manual approval.' >> "$GITHUB_STEP_SUMMARY" + if [ "$LZC_RELEASE_MODE" = skip ]; then + echo 'Assistant live qualification skipped; assistantQualified=false. This immutable build can be deployed to Dev and published for manually approved Prod deployment. Known limitations: issue #225.' >> "$GITHUB_STEP_SUMMARY" fi tar -czf ../.local/configurator-release.tar.gz -C ../.local release.tar.gz release.sha256 runner.tar.gz runner.sha256 release-manifest.json (cd ../.local && sha256sum configurator-release.tar.gz > configurator-release.sha256) @@ -207,7 +204,7 @@ jobs: deploy: needs: [build, publish_buildpack] - if: always() && !cancelled() && github.event_name == 'workflow_dispatch' && !inputs.build_only && inputs.release_mode != 'accepted-assistant-limitations' && vars.LZC_RELEASE_CI_ENABLED == 'true' && github.run_attempt == 1 && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/feature/landing-zone-configurator') && ((needs.build.result == 'success' && needs.publish_buildpack.result == 'success') || (needs.build.result == 'skipped' && needs.publish_buildpack.result == 'skipped' && inputs.release_run_id != '')) + if: always() && !cancelled() && github.event_name == 'workflow_dispatch' && !inputs.build_only && vars.LZC_RELEASE_CI_ENABLED == 'true' && github.run_attempt == 1 && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/feature/landing-zone-configurator') && ((needs.build.result == 'success' && needs.publish_buildpack.result == 'success') || (needs.build.result == 'skipped' && needs.publish_buildpack.result == 'skipped' && inputs.release_run_id != '')) permissions: actions: read contents: read diff --git a/docs/diagrams/generated/workflow-phases.de.svg b/docs/diagrams/generated/workflow-phases.de.svg index 71af104..d2309f5 100644 --- a/docs/diagrams/generated/workflow-phases.de.svg +++ b/docs/diagrams/generated/workflow-phases.de.svg @@ -1,6 +1,6 @@ GitHub Actions · Pipeline-PhasenEine Zeile je Pipeline. Gemeinsame Workflows werden für Dev und Prod nicht dupliziert. -Generated by .github/scripts/workflow-map.py; source signature ad83c6ae7089a715e64372d6fe03f8af67f67eb76048de938879416ce334a801 +Generated by .github/scripts/workflow-map.py; source signature bf1e0f25d9b57c37fe0b9243f1b6c5581d0a79dc5f3a8de7fad504f4f5c9b34d @@ -146,6 +146,6 @@ jobs: deploy ◆ lzc-prod-releaseStage + MigrationRolling-AktivierungTLS / Dienste / Runner -Build-only-Artefakte aus Configurator Release gehen an Prod. Dev-skip-Artefakte sind dafür nicht zulässig.Gemeinsame Infrastruktur-Workflows wählen lzc-dev / lzc-prod; keine Kopien. * = Quellpfadfilter.Reviewer und Branchregeln werden in GitHub gesetzt. Job-Bedingungen gelten weiter; nicht jede Zelle läuft.Phasenblöcke fassen Jobs zusammen, kein vollständiger Abhängigkeitsgraph. Tests und Staging laufen teils parallel. +Ein Build mit qualified/skip versorgt Dev und Prod. Alte Dev-only-Artefakte bleiben ausgeschlossen.Gemeinsame Infrastruktur-Workflows wählen lzc-dev / lzc-prod; keine Kopien. * = Quellpfadfilter.Reviewer und Branchregeln werden in GitHub gesetzt. Job-Bedingungen gelten weiter; nicht jede Zelle läuft.Phasenblöcke fassen Jobs zusammen, kein vollständiger Abhängigkeitsgraph. Tests und Staging laufen teils parallel. diff --git a/docs/diagrams/generated/workflow-phases.svg b/docs/diagrams/generated/workflow-phases.svg index 63053e0..3b00512 100644 --- a/docs/diagrams/generated/workflow-phases.svg +++ b/docs/diagrams/generated/workflow-phases.svg @@ -1,6 +1,6 @@ GitHub Actions · workflow phasesOne row per workflow. Shared workflows are not duplicated for Dev and Prod. -Generated by .github/scripts/workflow-map.py; source signature ad83c6ae7089a715e64372d6fe03f8af67f67eb76048de938879416ce334a801 +Generated by .github/scripts/workflow-map.py; source signature bf1e0f25d9b57c37fe0b9243f1b6c5581d0a79dc5f3a8de7fad504f4f5c9b34d @@ -146,6 +146,6 @@ jobs: deploy ◆ lzc-prod-releaseStage + migrationRolling activationTLS / services / Runner -Build-only Configurator Release artifacts feed Prod. Dev-skip artifacts cannot be promoted to Prod.Shared infrastructure workflows choose lzc-dev / lzc-prod; no separate copies. * = source path filter.Environment reviewers and branch rules are configured in GitHub. Job conditions still apply; not every cell runs.Phase blocks summarize jobs, not a complete dependency DAG. Tests/packaging and staging can run in parallel. +One qualified/skip build feeds Dev and Prod; no rebuild. Historical Dev-only artifacts remain excluded.Shared infrastructure workflows choose lzc-dev / lzc-prod; no separate copies. * = source path filter.Environment reviewers and branch rules are configured in GitHub. Job conditions still apply; not every cell runs.Phase blocks summarize jobs, not a complete dependency DAG. Tests/packaging and staging can run in parallel. diff --git a/docs/workflows.de.md b/docs/workflows.de.md index 7aa294a..0c65cef 100644 --- a/docs/workflows.de.md +++ b/docs/workflows.de.md @@ -30,7 +30,8 @@ Gemeinsame Workflows und solche mit wählbarer Zielumgebung stehen einmal oben. Die getrennten Dev- und Prod-Auslieferungen folgen darunter. **Configurator Release** baut auch die gemeinsamen Produktionseingaben; sein Deploy-Job zielt auf Dev. Produktion verwendet kompatible veröffentlichte Assets ohne erneuten -Build. Dev-skip-Artefakte sind keine zulässigen Produktionseingaben. +Build. Ein Build mit skip oder qualified kann Dev und Prod versorgen; historische +Dev-only-Artefakte bleiben ausgeschlossen. Die Grafik fasst Phasen zusammen, nicht jeden Schritt oder jede Abhängigkeit. Browserabnahme/Runner-Paketierung und CF-Staging laufen teilweise parallel. Der Aufruf von **Verify Deployment** führt echte Test-Cloud-Änderungen und @@ -53,37 +54,43 @@ Bereinigung aus, auch in der Vorprüfungsphase von **Publish Release**. ### Dev-Release ohne Live-Qualifikation des Assistant -Bei Model-Serving-Ausfällen unter -**Actions > Configurator Release > Run workflow** auf Branch **main** ausdrücklich -**release_mode=dev-skip-assistant-qualification** wählen. **build_only** nicht -anhaken, **release_run_id** leer lassen und **runner_pool_size=1** setzen. -Den genauen Quellstand/Lauf prüfen und nach allen anwendbaren Build-/ -Veröffentlichungsprüfungen die bestehende Umgebung **lzc-dev-release** freigeben. -Diese ausdrückliche Dev-Ausnahme überspringt nur den Live-Qualifikationsjob des -Assistant. `LZC_ASSISTANT_ENABLED` übernimmt weiterhin die bestehende -Umgebungseinstellung; ein konfigurierter Assistant bleibt aktiviert, ohne neuen -Live-Qualifikationsnachweis für diesen Release. Ob Inferenz funktioniert, hängt -weiterhin von der Modellverfügbarkeit ab. Dies gilt nicht als erfolgreiche -Qualifikation und löscht keine früheren fehlgeschlagenen Nachweise. Alle übrigen -Prüfungen, Migrationen, geschützten Tags und Dev-Zielprüfungen bleiben erhalten. -Gespräche und Vorschläge bleiben gespeichert; bestehende Laufzeitvalidierung, -Autorisierung und Revisionsprüfungen bleiben unverändert. Der Modus autorisiert -weder Produktion noch Kunden-Infrastruktur-Apply. - -Das Manifest vermerkt die Beschränkung auf Dev und `assistantQualified=false`; -der Build-Job heißt `build-dev-skip-assistant-qualification`. Diese Artefakte -können nicht mit `release_run_id` übernommen werden, auch nicht als qualifizierter -Release. Nach einem Deploymentfehler sind Untersuchung und ein neuer manueller -Lauf nötig. `build_only=true` erlaubt einen Build zur Prüfung, dessen Artefakt -anschließend nicht übernommen werden kann. Ein qualifizierter Release erfordert -weiterhin einen neuen Lauf mit **release_mode=qualified** und vollständiger -quellstandsgebundener Live-Qualifikation. Der Standardpfad **qualified** und dessen -Übernahmebedingungen bleiben unverändert. +**Configurator Release** auf **main** verwenden. **release_mode=skip** (Standard) +wählen, wenn keine neue Live-Qualifikation des Assistant nötig ist; **qualified** +führt die vollständige wiederholte Live-Suite aus. Änderungen an Assistant-Fakten/ +-Fähigkeiten benötigen weiterhin quellgebundene Qualifikation gemäß Beitragsanleitung. +Überspringen behauptet keine Qualifikation und entfernt keine fehlgeschlagenen +Nachweise. + +Für Dev mit anschließendem Prod **build_only=false** und **release_run_id** leer +lassen, Dev-**runner_pool_size** wählen (beispielsweise `2`). Build, Datenbank-/ +Browser-/native Prüfungen und geschützte Buildpack-Veröffentlichung laufen einmal, +danach das manuell freigegebene **lzc-dev-release**-Deployment. Die Assistant- +Laufzeiteinstellung bleibt in beiden Modi erhalten. Kein Kunden-Infrastruktur- +Apply wird dadurch autorisiert. + +Nach Erfolg des **gesamten Laufs** dessen numerische Run-ID in **Configurator +Production Release** auf derselben `main`-Revision verwenden: **publish=true**, +kuratierter Versionstag (aktuell **v2.1.0**) und **derselbe release_mode**. +Veröffentlichung und **lzc-prod-release**-Freigabe verwenden unveränderte Pakete; +Configurator Release nicht nur für einen zusätzlichen Prod-Build erneut starten. +Ist Dev nicht gewünscht, im ersten Lauf **build_only=true** wählen. Produktion +baut nicht neu. + +Ein neues `skip`-Manifest vermerkt umgebungsunabhängigen Umfang, +`assistantQualified=false` und `assistantQualification=skipped`; der Job heißt +**build-skip**. `qualified` verlangt weiter erfolgreiche Live-Qualifikation. +Bestehende Builds lassen sich über **release_run_id** später ohne Neubau nach Dev +übernehmen, unter Quell-/Tag- und Artefaktprüfung. Historische Artefakte mit +**dev-skip-assistant-qualification** bleiben auf Dev beschränkt und nicht +promotierbar. Veröffentlichte **accepted-assistant-limitations**-Releases bleiben +für kompatible erneute Deployments lesbar. Beide alten Modi sind keine neue +Laufauswahl. Eine fehlgeschlagene Qualifikation lässt sich nicht als `skip` +umetikettieren. ### Produktionsrelease und Infrastruktur -[Configurator Production Release](https://github.com/stackitcloud/stackit-landing-zone/actions/workflows/configurator-production.yml) · [Quelle](../.github/workflows/configurator-production.yml) veröffentlicht ein stabiles Release und deployt erst nach manueller Freigabe von `lzc-prod-release`. Eingaben: `version` (Standard `v2.0.0`), `publish` (Standard `true`), `release_run_id` (für Veröffentlichung erforderlich) und `release_mode` (Standard `accepted-assistant-limitations`, alternativ `qualified`). Zuerst **Configurator Release** mit `build_only=true` auf derselben `main`-Revision und mit demselben `release_mode` ausführen. `accepted-assistant-limitations` dokumentiert ausdrücklich den unqualifizierten Assistant und Issue #225; es qualifiziert kein Dev-skip-Artefakt. Alle Prüfungen außerhalb der Inferenz bleiben verpflichtend. +[Configurator Production Release](https://github.com/stackitcloud/stackit-landing-zone/actions/workflows/configurator-production.yml) · [Quelle](../.github/workflows/configurator-production.yml) veröffentlicht ein stabiles Release und deployt erst nach manueller Freigabe von `lzc-prod-release`. Eingaben: `version` (Standard `v2.1.0`), `publish` (Standard `true`), `release_run_id` (für Veröffentlichung erforderlich) und `release_mode` (Standard `skip`, alternativ `qualified`). Einen vollständig erfolgreichen **Configurator Release** von derselben `main`-Revision mit demselben Modus verwenden, unabhängig davon, ob dieser Dev deployt oder `build_only=true` genutzt hat. Ein zweiter Build ist nicht erforderlich. `skip` dokumentiert die übersprungene Assistant-Qualifikation, ohne historische Dev-only-Artefakte umzudeuten. Alle Prüfungen außerhalb der Inferenz bleiben verpflichtend. Ein veröffentlichtes stabiles GitHub Release mit den erforderlichen quellgebundenen Assets startet den Workflow ebenfalls. Veröffentlichung über `GITHUB_TOKEN` setzt im selben Lauf fort und benötigt kein zweites Ereignis. `publish=false` deployt ein bestehendes kompatibles veröffentlichtes Release nach neuer manueller Freigabe. Pre-Releases und beliebige Artefakte werden abgelehnt. Produktion verwendet unveränderliche angehängte Anwendungs-/Runner-Assets, begrenzte CF-Zugänge und Rolling Deployment mit drei Web-Repliken. @@ -148,8 +155,8 @@ Pflichtprüfung, ohne sicherzustellen, dass er für jeden relevanten PR ein Erge | Configurator Bootstrap | Standardmäßig `root=bootstrap` oder `backend`; standardmäßig `apply=false`. `environment=lzc-dev\|lzc-prod`; Apply verwendet das Bootstrap-Apply-Environment der ausgewählten Stage. | | Configurator Platform | `root=platform`; standardmäßig `apply=false`. Benötigt den obigen Plattform-Operatorschalter; `environment=lzc-dev\|lzc-prod`; Apply verwendet das passende Platform-Apply-Environment. | | Configurator Runtime | `root=runtime`; standardmäßig `apply=false`. Benötigt den obigen Laufzeit-Operatorschalter; `environment=lzc-dev\|lzc-prod`; Apply verwendet das passende Runtime-Apply-Environment. | -| Configurator Release | Standardmäßig `release_mode=qualified` und `build_only=false`; leere `release_run_id` bedeutet einen neuen Build im gewählten Modus. Setzen Sie `build_only=true` für einen Build ohne CF-Bereitstellung; die Veröffentlichung des geschützten Tags erfolgt trotzdem; echte Modellaufrufe laufen im Modus `qualified`. Um einen bestehenden qualifizierten Build zu übernehmen, lassen Sie Build-only deaktiviert und geben Sie dessen numerische Run-ID an; das aufbewahrte Artefakt/Tag muss weiterhin gültig sein. | -| Configurator Production Release | `publish=true`, `version=v2.0.0`, `release_run_id` für Veröffentlichung erforderlich; `release_mode=accepted-assistant-limitations` als Standard (alternativ `qualified`). Zuerst Configurator Release mit demselben Modus und `build_only=true` ausführen. `publish=false` nutzt ein bestehendes kompatibles Release ohne Neubau; ein Release-Ereignis verwendet dessen unveränderliche Assets. Prod-Aktivierung erfordert weiterhin die Freigabe von `lzc-prod-release`. | +| Configurator Release | Standardmäßig `release_mode=skip` und `build_only=false`; leere `release_run_id` bedeutet einen neuen Build im gewählten Modus. Setzen Sie `build_only=true` für einen Build ohne CF-Bereitstellung; die Veröffentlichung des geschützten Tags erfolgt trotzdem; echte Modellaufrufe laufen im Modus `qualified`. Um einen bestehenden Build mit skip oder qualified zu übernehmen, lassen Sie Build-only deaktiviert und geben Sie dessen numerische Run-ID an; das aufbewahrte Artefakt/Tag muss weiterhin gültig sein. | +| Configurator Production Release | `publish=true`, `version=v2.1.0`, `release_run_id` des vollständig erfolgreichen Configurator-Release-Laufs; `release_mode=skip` als Standard (alternativ `qualified`, muss zum Build passen). Derselbe Build kann zuvor Dev deployt haben; kein zusätzlicher Build-only-Lauf nötig. `publish=false` verwendet ein bestehendes kompatibles Release ohne Neubau. Prod-Aktivierung erfordert `lzc-prod-release`-Freigabe. | Browser-Abnahme und native Paketierung laufen im Release-Build parallel; die Bereitstellung bereitet Runner, minimales Migrationspaket und Web/API mit getrennten diff --git a/docs/workflows.md b/docs/workflows.md index 08177b4..b4408ef 100644 --- a/docs/workflows.md +++ b/docs/workflows.md @@ -26,7 +26,8 @@ are configured in GitHub, not inferred from the presence of an Environment name. Shared and target-selectable workflows appear once at the top. Separate Dev and Prod delivery rows follow below. **Configurator Release** also builds shared production inputs; its deployment job targets Dev. Production consumes compatible -published assets and does not rebuild. Dev-skip artifacts are never Prod inputs. +published assets and does not rebuild. One skip/qualified build can feed Dev and +Prod; historical Dev-only artifacts remain excluded. The graphic summarizes phases rather than every step or dependency edge. For example, browser acceptance/Runner packaging and CF staging run partly in parallel. Calling **Verify Deployment** entails real test-cloud Apply and cleanup, even @@ -48,35 +49,38 @@ when that call appears in the pre-check phase of **Publish Release**. ### Dev release without live Assistant qualification -During Model Serving outages, select -**release_mode=dev-skip-assistant-qualification** in -**Actions > Configurator Release > Run workflow**, branch **main**. -Leave **build_only** unchecked and **release_run_id** empty; set -**runner_pool_size=1**. Review the exact source/run and approve the existing -**lzc-dev-release** environment after all applicable build/publication checks. -This explicit Dev exception skips only the live Assistant qualification job. -`LZC_ASSISTANT_ENABLED` continues to use the existing environment setting; -the Assistant remains enabled when configured, without a new live qualification -receipt for this release. Model availability still determines whether inference -works. This is not a successful qualification and does not erase earlier failed -receipts. All non-Assistant checks, migrations, protected tags and Dev destination -guards remain in force. Conversations and proposals are preserved; existing -runtime validation, authorization and revision checks remain unchanged. No -production deployment or customer infrastructure Apply is authorized by this mode. - -The manifest records Dev-only scope and `assistantQualified=false`; the build -job is named `build-dev-skip-assistant-qualification`. These artifacts cannot be -promoted using `release_run_id`, including as a qualified release. A deployment -failure requires inspection and a fresh manual run. `build_only=true` may build -this mode for inspection, but its artifact cannot subsequently be promoted. -A qualified release still requires a fresh **release_mode=qualified** run with -the complete source-bound live qualification. The default **qualified** path -and its promotion requirements are unchanged. +Use **Configurator Release** on **main**. Choose **release_mode=skip** (default) +when no new live Assistant qualification is needed, or **qualified** to run the +complete repeated live suite. Changes to Assistant facts/capabilities still need +source-bound qualification according to the contributor guidance. Skipping does +not claim qualification or remove earlier failed receipts. + +For Dev followed by Prod, leave **build_only=false** and **release_run_id** empty; +choose the Dev **runner_pool_size** (for example `2`). Build, database/browser/ +native checks and protected buildpack publication run once, followed by the +manually approved **lzc-dev-release** deployment. The Assistant runtime setting +remains unchanged in either mode. No customer infrastructure Apply is authorized. + +After the **whole run succeeds**, use its numeric run ID in **Configurator +Production Release** on the same `main` revision: **publish=true**, a curated +version tag (currently **v2.1.0**) and the **same release_mode**. Publication and +**lzc-prod-release** approval reuse the immutable packages; do not run Configurator +Release again just to create a Prod-only build. If Dev is not wanted, select +**build_only=true** in the initial run instead. Production does not rebuild. + +A new `skip` manifest records stage-neutral scope, `assistantQualified=false` and +`assistantQualification=skipped`; the job is **build-skip**. `qualified` still +requires successful live qualification. Existing builds can be deployed to Dev +later through **release_run_id** without rebuilding, subject to source/tag and +artifact checks. Historical **dev-skip-assistant-qualification** artifacts remain +Dev-only/non-promotable; published **accepted-assistant-limitations** releases +remain readable for compatible redeployment. Neither legacy mode is a new-run +selection. A failed qualification cannot be relabeled as `skip`. ### Production release and infrastructure -[Configurator Production Release](https://github.com/stackitcloud/stackit-landing-zone/actions/workflows/configurator-production.yml) · [source](../.github/workflows/configurator-production.yml) publishes a stable release and deploys only after manual `lzc-prod-release` approval. It accepts `version` (default `v2.0.0`), `publish` (default `true`), `release_run_id` (required for publication) and `release_mode` (`qualified` or `accepted-assistant-limitations`, default `accepted-assistant-limitations`). Build first with **Configurator Release**, `build_only=true`, on the same `main` revision, using the same `release_mode` as publication. `accepted-assistant-limitations` explicitly records unqualified Assistant status and issue #225; it does not qualify a Dev-skip artifact. All non-inference checks remain mandatory. +[Configurator Production Release](https://github.com/stackitcloud/stackit-landing-zone/actions/workflows/configurator-production.yml) · [source](../.github/workflows/configurator-production.yml) publishes a stable release and deploys only after manual `lzc-prod-release` approval. It accepts `version` (default `v2.1.0`), `publish` (default `true`), `release_run_id` (required for publication) and `release_mode` (`skip` by default, or `qualified`). Reuse a fully successful **Configurator Release** from the same `main` revision and mode, whether it deployed Dev or used `build_only=true`. A second build is unnecessary. `skip` records skipped Assistant qualification without reinterpreting historical Dev-only artifacts. All non-inference checks remain mandatory. A published stable GitHub Release with the required source-bound assets also triggers this workflow. Publication with `GITHUB_TOKEN` continues within the same run, avoiding reliance on another event. `publish=false` redeploys an existing compatible published release under a fresh manual approval. Pre-releases and arbitrary artifacts are rejected. Production uses immutable attached application/Runner assets, scoped CF credentials and rolling deployment of three web replicas. @@ -137,8 +141,8 @@ it reports a result for every relevant PR. | Configurator Bootstrap | `root=bootstrap` by default, or `backend`; `apply=false` by default. `environment=lzc-dev\|lzc-prod`; Apply uses the selected stage's bootstrap-apply Environment. | | Configurator Platform | `root=platform`; `apply=false` by default. Requires the platform operator switch above; `environment=lzc-dev\|lzc-prod`; Apply uses the matching platform-apply Environment. | | Configurator Runtime | `root=runtime`; `apply=false` by default. Requires the runtime operator switch above; `environment=lzc-dev\|lzc-prod`; Apply uses the matching runtime-apply Environment. | -| Configurator Release | `release_mode=qualified` and `build_only=false` by default; `release_run_id` empty means a fresh build under the selected mode. Set `build_only=true` to build without CF deployment; protected tag publication still occurs; live-model calls run in `qualified` mode. To promote an existing qualified build, leave build-only unchecked and enter its numeric run ID; the retained artifact/tag must remain valid. | -| Configurator Production Release | `publish=true`, `version=v2.0.0`, `release_run_id` required for publication, `release_mode=accepted-assistant-limitations` by default (or `qualified`). Build first with the same mode and `build_only=true` in Configurator Release. `publish=false` uses an existing compatible release; no rebuild. A published-release event uses that release’s immutable assets. Production activation still requires `lzc-prod-release` approval. | +| Configurator Release | `release_mode=skip` and `build_only=false` by default; `release_run_id` empty means a fresh build under the selected mode. Set `build_only=true` to build without CF deployment; protected tag publication still occurs; live-model calls run in `qualified` mode. To promote an existing skip/qualified build, leave build-only unchecked and enter its numeric run ID; the retained artifact/tag must remain valid. | +| Configurator Production Release | `publish=true`, `version=v2.1.0`, `release_run_id` of the fully successful Configurator Release run; `release_mode=skip` by default (or `qualified`, matching the build). The same build may already have deployed Dev; no extra build-only run. `publish=false` uses an existing compatible release without rebuilding. Production activation requires `lzc-prod-release` approval. | Release build browser acceptance and native packaging run concurrently; deployment stages Runner, the minimal migration payload and Web/API concurrently with isolated diff --git a/landing-zone-configurator/deploy/cloud-foundry/README.de.md b/landing-zone-configurator/deploy/cloud-foundry/README.de.md index e162ee7..984e887 100644 --- a/landing-zone-configurator/deploy/cloud-foundry/README.de.md +++ b/landing-zone-configurator/deploy/cloud-foundry/README.de.md @@ -29,9 +29,10 @@ des Repositorys **Configurator Release** und dann **Run workflow** auswählen: auf `0` zum Deaktivieren/Abbauen des Pools setzen. Standard ist `0`; zulässig sind `0`–`4`. Jede Reserve benötigt zusätzlich zu aktiven Aufträgen 1 GiB RAM und ein Disk-Budget von 4 GiB. -5. Für normale Releases **release_mode=qualified** beibehalten und den Workflow - starten. Er qualifiziert den echten Assistant, baut und testet beide - Pakete und erstellt anschließend den geschützten, quellgebundenen Buildpack-Tag. +5. **release_mode=skip** (Standard) wählen, wenn keine neue Assistant-Qualifikation + nötig ist; **qualified** führt zusätzlich die wiederholte Live-Suite aus. + Beide Modi bauen/testen dieselben Pakete und veröffentlichen den geschützten + quellgebundenen Buildpack-Tag. 6. Wenn **deploy** auf Prüfung wartet, über **Review deployments** das Environment **lzc-dev-release** mit einem autorisierten Prüferkonto freigeben. 7. Auf den Erfolg des gesamten Laufs warten, einschließlich Runner-Isolation, Engine-Prüfungen, @@ -48,16 +49,16 @@ Ein überholter Branch-HEAD wird abgelehnt, statt stillschweigend eine andere Revision zu deployen. Bei einem gewöhnlichen neuen Release weder Repository-Token-Rechte erweitern noch Tags manuell erstellen. -Für qualifiziertes „jetzt bauen, später deployen“ **release_mode=qualified** beibehalten und **build_only** anhaken. Qualifizierung, Paketierung und Tag- -Veröffentlichung laufen weiterhin, aber es findet kein Cloud-Deployment statt. Später einen **neuen** -manuellen Lauf auf `main` starten, **build_only** nicht anhaken und die ursprüngliche -numerische Build-Run-ID unter **release_run_id** eintragen. Damit wird exakt das qualifizierte -Artefakt promoviert, ohne Qualifizierung/Build zu wiederholen oder einen historischen Commit zu taggen; -es wird nicht der neueste Anwendungsquellstand ausgewählt. Das ursprüngliche Artefakt muss -noch vorhanden und darf nicht abgelaufen sein. +Für „jetzt bauen, später deployen“ **skip** oder **qualified** wählen und +**build_only** anhaken. Beide Modi paketieren und veröffentlichen den geschützten +Tag; nur qualified führt Live-Assistant-Prüfungen aus. Später einen neuen manuellen +Lauf auf `main` mit demselben Modus starten, **build_only** nicht anhaken und +ursprüngliche numerische Build-Run-ID unter **release_run_id** eintragen. Exaktes +Artefakt ohne Qualifikation, Neubau oder historische Tag-Veröffentlichung deployen; +das Artefakt muss noch aufbewahrt sein. Nach einem reinen Deployment-Fehler kann eine neue Promotion den erfolgreichen -qualifizierten Build ebenso wiederverwenden. Nicht **Re-run jobs** verwenden: Release-Versuche +Build mit skip oder qualified ebenso wiederverwenden. Nicht **Re-run jobs** verwenden: Release-Versuche nach dem ersten werden abgelehnt. Vor einem weiteren Lauf den tatsächlichen Fehler prüfen; Fehler bleiben erhalten, und der Workflow führt keine automatische Deployment- Wiederholung durch. Historische Artefakte ohne Buildpack-Tag benötigen den unten beschriebenen @@ -353,32 +354,38 @@ Neuabruf den separaten lokalen Login-Checkpoint ausdrücklich aus. ### Dev-Release ohne Live-Qualifikation des Assistant -Bei Model-Serving-Ausfällen unter -**Actions > Configurator Release > Run workflow** auf Branch **main** ausdrücklich -**release_mode=dev-skip-assistant-qualification** wählen. **build_only** nicht -anhaken, **release_run_id** leer lassen und **runner_pool_size=1** setzen. -Den genauen Quellstand/Lauf prüfen und nach allen anwendbaren Build-/ -Veröffentlichungsprüfungen die bestehende Umgebung **lzc-dev-release** freigeben. -Diese ausdrückliche Dev-Ausnahme überspringt nur den Live-Qualifikationsjob des -Assistant. `LZC_ASSISTANT_ENABLED` übernimmt weiterhin die bestehende -Umgebungseinstellung; ein konfigurierter Assistant bleibt aktiviert, ohne neuen -Live-Qualifikationsnachweis für diesen Release. Ob Inferenz funktioniert, hängt -weiterhin von der Modellverfügbarkeit ab. Dies gilt nicht als erfolgreiche -Qualifikation und löscht keine früheren fehlgeschlagenen Nachweise. Alle übrigen -Prüfungen, Migrationen, geschützten Tags und Dev-Zielprüfungen bleiben erhalten. -Gespräche und Vorschläge bleiben gespeichert; bestehende Laufzeitvalidierung, -Autorisierung und Revisionsprüfungen bleiben unverändert. Der Modus autorisiert -weder Produktion noch Kunden-Infrastruktur-Apply. - -Das Manifest vermerkt die Beschränkung auf Dev und `assistantQualified=false`; -der Build-Job heißt `build-dev-skip-assistant-qualification`. Diese Artefakte -können nicht mit `release_run_id` übernommen werden, auch nicht als qualifizierter -Release. Nach einem Deploymentfehler sind Untersuchung und ein neuer manueller -Lauf nötig. `build_only=true` erlaubt einen Build zur Prüfung, dessen Artefakt -anschließend nicht übernommen werden kann. Ein qualifizierter Release erfordert -weiterhin einen neuen Lauf mit **release_mode=qualified** und vollständiger -quellstandsgebundener Live-Qualifikation. Der Standardpfad **qualified** und dessen -Übernahmebedingungen bleiben unverändert. +**Configurator Release** auf **main** verwenden. **release_mode=skip** (Standard) +wählen, wenn keine neue Live-Qualifikation des Assistant nötig ist; **qualified** +führt die vollständige wiederholte Live-Suite aus. Änderungen an Assistant-Fakten/ +-Fähigkeiten benötigen weiterhin quellgebundene Qualifikation gemäß Beitragsanleitung. +Überspringen behauptet keine Qualifikation und entfernt keine fehlgeschlagenen +Nachweise. + +Für Dev mit anschließendem Prod **build_only=false** und **release_run_id** leer +lassen, Dev-**runner_pool_size** wählen (beispielsweise `2`). Build, Datenbank-/ +Browser-/native Prüfungen und geschützte Buildpack-Veröffentlichung laufen einmal, +danach das manuell freigegebene **lzc-dev-release**-Deployment. Die Assistant- +Laufzeiteinstellung bleibt in beiden Modi erhalten. Kein Kunden-Infrastruktur- +Apply wird dadurch autorisiert. + +Nach Erfolg des **gesamten Laufs** dessen numerische Run-ID in **Configurator +Production Release** auf derselben `main`-Revision verwenden: **publish=true**, +kuratierter Versionstag (aktuell **v2.1.0**) und **derselbe release_mode**. +Veröffentlichung und **lzc-prod-release**-Freigabe verwenden unveränderte Pakete; +Configurator Release nicht nur für einen zusätzlichen Prod-Build erneut starten. +Ist Dev nicht gewünscht, im ersten Lauf **build_only=true** wählen. Produktion +baut nicht neu. + +Ein neues `skip`-Manifest vermerkt umgebungsunabhängigen Umfang, +`assistantQualified=false` und `assistantQualification=skipped`; der Job heißt +**build-skip**. `qualified` verlangt weiter erfolgreiche Live-Qualifikation. +Bestehende Builds lassen sich über **release_run_id** später ohne Neubau nach Dev +übernehmen, unter Quell-/Tag- und Artefaktprüfung. Historische Artefakte mit +**dev-skip-assistant-qualification** bleiben auf Dev beschränkt und nicht +promotierbar. Veröffentlichte **accepted-assistant-limitations**-Releases bleiben +für kompatible erneute Deployments lesbar. Beide alten Modi sind keine neue +Laufauswahl. Eine fehlgeschlagene Qualifikation lässt sich nicht als `skip` +umetikettieren. ## Unveränderlicher Release und Promotion @@ -395,14 +402,14 @@ Bauen und qualifizieren, ohne CF zu verändern: ```sh gh workflow run configurator-release.yml \ - --ref feature/landing-zone-configurator -f build_only=true + --ref main -f release_mode=qualified -f build_only=true ``` Diesen erfolgreichen Build ohne Neubau in das geschützte Dev-Environment promovieren: ```sh gh workflow run configurator-release.yml \ - --ref feature/landing-zone-configurator -f release_run_id= + --ref main -f release_mode=qualified -f release_run_id= ``` Promotion prüft Repository, erlaubten Quellbranch und Event, Workflow, @@ -413,11 +420,10 @@ Runtime-Variablen und Secrets des geschützten Environments. Environment-Freigab Zielbeschränkungen, Migrationsschutz und Dienstprüfungen gelten weiterhin. Artefakte werden 30 Tage aufbewahrt; abgelaufene Artefakte werden nicht stillschweigend neu gebaut. -Derzeit ist nur Dev als Deployment-Ziel aktiviert. Weitere Stages benötigen ihre -eigene geprüfte Zielkonfiguration und geschützte Environments, keine separaten -Anwendungsbuilds oder Authentifizierungsimplementierungen. Das Promovieren älterer Bytes ist -kein automatischer Datenbank-Rollback: Migrationen sind nur vorwärtsgerichtet, und das Zurücksetzen -von Anwendungscode erfordert ausdrückliche Qualifizierung der Schemakompatibilität. +Prod verwendet denselben vollständig erfolgreichen Build über **Configurator +Production Release**, nach Veröffentlichung und geschützter Freigabe. Ein Dev- +Deployment erfordert keinen zusätzlichen Prod-Build. Gleichen Modus und dieselbe +Quellrevision verwenden; siehe [Produktionshandbuch](../../docs/production.de.md). diff --git a/landing-zone-configurator/deploy/cloud-foundry/README.md b/landing-zone-configurator/deploy/cloud-foundry/README.md index 66f014a..eea1f53 100644 --- a/landing-zone-configurator/deploy/cloud-foundry/README.md +++ b/landing-zone-configurator/deploy/cloud-foundry/README.md @@ -24,9 +24,9 @@ page and select **Configurator Release**, then **Run workflow**: 4. Set **runner_pool_size** to `1` for one prepared, one-shot Dev Runner, or `0` to disable/drain the pool. The default is `0`; valid values are `0`–`4`. Each reserve uses 1 GiB RAM and a 4 GiB disk budget, in addition to active jobs. -5. Keep **release_mode=qualified** for a normal release. Start the workflow. - It qualifies the real Assistant, builds and tests both - packages, then creates the protected source-bound buildpack tag. +5. Select **release_mode=skip** (default) when new Assistant qualification is not + needed; **qualified** additionally runs the repeated live suite. Both modes + build/test the same packages and publish the protected source-bound buildpack tag. 6. When **deploy** waits for review, use **Review deployments** to approve **lzc-dev-release** with an authorized reviewer account. 7. Wait for the whole run to succeed, including Runner isolation, engine checks, @@ -42,16 +42,15 @@ a superseded branch HEAD is rejected rather than silently deploying another revision. Do not add broader repository token permissions or manually create tags during an ordinary new release. -For qualified build now/deploy later, keep **release_mode=qualified** and check **build_only**. Qualification, packaging and tag -publication still run, but no cloud deployment occurs. Later start a **new** -manual run on `main`, leave **build_only** unchecked and enter the original -numeric build run ID in **release_run_id**. This promotes that exact qualified -artifact without repeating qualification/build or tagging a historical commit; -it does not select the newest application source. The original artifact must -still exist and must not have expired. +For build now/deploy later, choose **skip** or **qualified** and check +**build_only**. Both modes package and publish the protected tag; only qualified +runs live Assistant checks. Later start a new manual run on `main`, use the same +mode, leave **build_only** unchecked and enter the original numeric build run ID +in **release_run_id**. This deploys the exact artifact without qualification, +rebuild or historical tag publication; the artifact must still be retained. After a deployment-only failure, a new promotion can reuse the successful -qualified build in the same way. Do not use **Re-run jobs**: release attempts +skip/qualified build in the same way. Do not use **Re-run jobs**: release attempts after the first are rejected. Inspect the actual failure before starting another run; failures are retained and the workflow performs no automatic deployment retry. Historical artifacts missing their buildpack tag need the explicit @@ -333,30 +332,33 @@ exclude the separate local login checkpoint before asserting an exact refetch. ### Dev release without live Assistant qualification -During Model Serving outages, select -**release_mode=dev-skip-assistant-qualification** in -**Actions > Configurator Release > Run workflow**, branch **main**. -Leave **build_only** unchecked and **release_run_id** empty; set -**runner_pool_size=1**. Review the exact source/run and approve the existing -**lzc-dev-release** environment after all applicable build/publication checks. -This explicit Dev exception skips only the live Assistant qualification job. -`LZC_ASSISTANT_ENABLED` continues to use the existing environment setting; -the Assistant remains enabled when configured, without a new live qualification -receipt for this release. Model availability still determines whether inference -works. This is not a successful qualification and does not erase earlier failed -receipts. All non-Assistant checks, migrations, protected tags and Dev destination -guards remain in force. Conversations and proposals are preserved; existing -runtime validation, authorization and revision checks remain unchanged. No -production deployment or customer infrastructure Apply is authorized by this mode. - -The manifest records Dev-only scope and `assistantQualified=false`; the build -job is named `build-dev-skip-assistant-qualification`. These artifacts cannot be -promoted using `release_run_id`, including as a qualified release. A deployment -failure requires inspection and a fresh manual run. `build_only=true` may build -this mode for inspection, but its artifact cannot subsequently be promoted. -A qualified release still requires a fresh **release_mode=qualified** run with -the complete source-bound live qualification. The default **qualified** path -and its promotion requirements are unchanged. +Use **Configurator Release** on **main**. Choose **release_mode=skip** (default) +when no new live Assistant qualification is needed, or **qualified** to run the +complete repeated live suite. Changes to Assistant facts/capabilities still need +source-bound qualification according to the contributor guidance. Skipping does +not claim qualification or remove earlier failed receipts. + +For Dev followed by Prod, leave **build_only=false** and **release_run_id** empty; +choose the Dev **runner_pool_size** (for example `2`). Build, database/browser/ +native checks and protected buildpack publication run once, followed by the +manually approved **lzc-dev-release** deployment. The Assistant runtime setting +remains unchanged in either mode. No customer infrastructure Apply is authorized. + +After the **whole run succeeds**, use its numeric run ID in **Configurator +Production Release** on the same `main` revision: **publish=true**, a curated +version tag (currently **v2.1.0**) and the **same release_mode**. Publication and +**lzc-prod-release** approval reuse the immutable packages; do not run Configurator +Release again just to create a Prod-only build. If Dev is not wanted, select +**build_only=true** in the initial run instead. Production does not rebuild. + +A new `skip` manifest records stage-neutral scope, `assistantQualified=false` and +`assistantQualification=skipped`; the job is **build-skip**. `qualified` still +requires successful live qualification. Existing builds can be deployed to Dev +later through **release_run_id** without rebuilding, subject to source/tag and +artifact checks. Historical **dev-skip-assistant-qualification** artifacts remain +Dev-only/non-promotable; published **accepted-assistant-limitations** releases +remain readable for compatible redeployment. Neither legacy mode is a new-run +selection. A failed qualification cannot be relabeled as `skip`. ## Immutable release and promotion @@ -373,14 +375,14 @@ Build and qualify without changing CF: ```sh gh workflow run configurator-release.yml \ - --ref feature/landing-zone-configurator -f build_only=true + --ref main -f release_mode=qualified -f build_only=true ``` Promote that successful build to the protected Dev Environment without rebuilding: ```sh gh workflow run configurator-release.yml \ - --ref feature/landing-zone-configurator -f release_run_id= + --ref main -f release_mode=qualified -f release_run_id= ``` Promotion verifies the repository, allowed source branch and event, workflow, @@ -391,11 +393,10 @@ protected Environment's runtime variables and secrets. Environment approval, destination restrictions, migration guards and service checks still apply. Artifact retention is 30 days; expired artifacts are not silently rebuilt. -Only Dev is currently an enabled deployment target. Additional stages need their -own reviewed destination configuration and protected Environments, not separate -application builds or authentication implementations. Promoting older bytes is -not an automatic database rollback: migrations are forward-only, and reverting -application code requires explicit schema compatibility qualification. +Production consumes the same fully successful build through **Configurator +Production Release**, after publication and protected approval. Deploying Dev +does not require a separate Prod build. Use the same mode and source revision; +see the [production runbook](../../docs/production.md). ## Network verification diff --git a/landing-zone-configurator/docs/production.de.md b/landing-zone-configurator/docs/production.de.md index 430c843..04b6b4e 100644 --- a/landing-zone-configurator/docs/production.de.md +++ b/landing-zone-configurator/docs/production.de.md @@ -175,12 +175,15 @@ nicht veröffentlicht. Patch-Releases beschreiben ihre eigenen Änderungen, stat die Ankündigung des ersten Produktionsrelease zu wiederholen. 1. Geprüfte Quelle nach `main` zusammenführen. -2. **Configurator Release** mit `build_only=true` und ausgewähltem `release_mode` - starten. Alle Prüfungen für Anwendung, Browser, Datenbank, native Verträge und - Paketierung bleiben verpflichtend. Der Build veröffentlicht sein unveränderliches - Artefakt und den geschützten, quellgebundenen Image-Buildpack-Tag. -3. **Configurator Production Release** auf derselben `main`-Revision starten: - `version=v2.0.0`, erfolgreicher Build-Lauf und dessen exakter Release-Modus. +2. **Configurator Release** auf `main` mit `release_mode=skip` (Standard) oder + `qualified` starten. Für gleichzeitigen Dev-Rollout `build_only=false` und + gewünschte Dev-Runner-Reserve wählen; nur für einen Build `build_only=true`. + Alle Prüfungen außerhalb der Live-Inferenz bleiben verpflichtend. Der Build + veröffentlicht unveränderliche Artefakte und geschützten Buildpack-Tag. +3. Nach Erfolg des gesamten Laufs **Configurator Production Release** auf + derselben `main`-Revision starten: `version=v2.1.0`, dessen Build-Run-ID und + exakt derselbe Modus. Kein zweiter Configurator-Build ist nötig, auch wenn der + erste Lauf bereits Dev deployt hat. 4. Der Workflow prüft das Artefakt und veröffentlicht ein stabiles GitHub Release mit kurzen Hinweisen, Prüfsummen, Herkunftsnachweis und dauerhaft verfügbaren Anwendungs-/Runner-Paketen. Anschließend wartet `lzc-prod-release` auf @@ -197,13 +200,16 @@ mit dem geschützten Job fort, da durch `GITHUB_TOKEN` erzeugte Ereignisse keine weiteren Workflow starten. Beliebige Actions-Artefakte, Pre-Releases und Artefakte aus der Dev-Ausnahme können nicht nach Produktion deployt werden. -Beim ersten Release ist `accepted-assistant-limitations` eine ausdrückliche -Betreiberentscheidung: Das Manifest enthält `assistantQualified: false` und -verlinkt [Issue #225](https://github.com/stackitcloud/stackit-landing-zone/issues/225). -Der Assistant ist aktiviert; sporadische HTTP-400-Fehler des Modelldienstes und die -vollständige Qualifikation bleiben offen. Dieser Modus behauptet keine erfolgreiche -Qualifikation. `qualified` erfordert weiterhin die wiederholte Live-Suite. -`dev-skip-assistant-qualification` bleibt auf Dev beschränkt und nicht promotierbar. +`skip` und `qualified` sind die aktuellen Auswahlwerte. `skip` überspringt nur +Live-Assistant-Qualifikation, lässt die Laufzeiteinstellung unverändert und +vermerkt `assistantQualified=false` sowie `assistantQualification=skipped` im +umgebungsunabhängigen Manifest. Bekannte Einschränkungen bleiben in den Notes +sichtbar, derzeit [#225](https://github.com/stackitcloud/stackit-landing-zone/issues/225). +`qualified` verlangt die wiederholte erfolgreiche Live-Suite und ist für betroffene +Assistant-Fakten-/Fähigkeitsänderungen gemäß Beitragsanleitung zu verwenden. +Die alten Modi sind nur für historische Nachweise erhalten: veröffentlichte +`accepted-assistant-limitations`-Releases bleiben kompatibel lesbar; +`dev-skip-assistant-qualification` bleibt Dev-only und nicht promotierbar. ## Wiederherstellung und Rotation diff --git a/landing-zone-configurator/docs/production.md b/landing-zone-configurator/docs/production.md index c6ea46c..65a2348 100644 --- a/landing-zone-configurator/docs/production.md +++ b/landing-zone-configurator/docs/production.md @@ -160,12 +160,15 @@ patch releases must describe their own changes rather than repeat the initial production-release announcement. 1. Merge the checked source to `main`. -2. Run **Configurator Release** with `build_only=true` and the selected - `release_mode`. All non-inference application, browser, database, native and - packaging checks remain mandatory. The build publishes its immutable artifact - and protected source-bound image buildpack tag. -3. Run **Configurator Production Release** on the same `main` revision, supplying - `version=v2.0.0`, that successful build run ID and its exact release mode. +2. Run **Configurator Release** on `main` with `release_mode=skip` (default) or + `qualified`. To deploy Dev too, use `build_only=false` and the desired Dev + Runner reserve; to build only, use `build_only=true`. All non-inference checks + remain mandatory. The build publishes immutable artifacts and a protected + source-bound buildpack tag. +3. After the whole run succeeds, run **Configurator Production Release** on the + same `main` revision with `version=v2.1.0`, that build run ID and exactly the + same mode. No second Configurator build is needed even if the first run + already deployed Dev. 4. The workflow verifies the artifact and publishes a stable GitHub Release with concise notes, checksums, provenance and durable application/Runner assets. It then prepares the `lzc-prod-release` job for **manual approval**. @@ -180,13 +183,16 @@ The in-workflow publication continues directly to the protected job because even created with `GITHUB_TOKEN` do not start another workflow. Arbitrary Actions artifacts, pre-releases and Dev exception artifacts cannot deploy to production. -For the initial release, `accepted-assistant-limitations` is an explicit operator -acceptance: the manifest records `assistantQualified: false` and links -[issue #225](https://github.com/stackitcloud/stackit-landing-zone/issues/225). -The Assistant is enabled; intermittent model-service HTTP 400 failures and full -qualification remain open. This mode never claims successful qualification. -`qualified` still requires the repeated live suite. The existing -`dev-skip-assistant-qualification` mode remains Dev-only and non-promotable. +`skip` and `qualified` are the current choices. `skip` skips only live Assistant +qualification, preserves runtime configuration and records `assistantQualified=false` +and `assistantQualification=skipped` in its stage-neutral manifest. Known limitations +remain visible in release notes, currently +[#225](https://github.com/stackitcloud/stackit-landing-zone/issues/225). +`qualified` requires the repeated successful live suite and applies to affected +Assistant fact/capability changes according to contributor guidance. Legacy modes +remain only for historical provenance: published `accepted-assistant-limitations` +releases remain readable; `dev-skip-assistant-qualification` stays Dev-only and +non-promotable. ## Recovery and rotation diff --git a/landing-zone-configurator/infra/ci/README.de.md b/landing-zone-configurator/infra/ci/README.de.md index 413766e..37369f0 100644 --- a/landing-zone-configurator/infra/ci/README.de.md +++ b/landing-zone-configurator/infra/ci/README.de.md @@ -81,32 +81,38 @@ Die Workflows enthalten alle benötigten Umgebungsvariablen, Vorbereitungsschrit ### Dev-Release ohne Live-Qualifikation des Assistant -Bei Model-Serving-Ausfällen unter -**Actions > Configurator Release > Run workflow** auf Branch **main** ausdrücklich -**release_mode=dev-skip-assistant-qualification** wählen. **build_only** nicht -anhaken, **release_run_id** leer lassen und **runner_pool_size=1** setzen. -Den genauen Quellstand/Lauf prüfen und nach allen anwendbaren Build-/ -Veröffentlichungsprüfungen die bestehende Umgebung **lzc-dev-release** freigeben. -Diese ausdrückliche Dev-Ausnahme überspringt nur den Live-Qualifikationsjob des -Assistant. `LZC_ASSISTANT_ENABLED` übernimmt weiterhin die bestehende -Umgebungseinstellung; ein konfigurierter Assistant bleibt aktiviert, ohne neuen -Live-Qualifikationsnachweis für diesen Release. Ob Inferenz funktioniert, hängt -weiterhin von der Modellverfügbarkeit ab. Dies gilt nicht als erfolgreiche -Qualifikation und löscht keine früheren fehlgeschlagenen Nachweise. Alle übrigen -Prüfungen, Migrationen, geschützten Tags und Dev-Zielprüfungen bleiben erhalten. -Gespräche und Vorschläge bleiben gespeichert; bestehende Laufzeitvalidierung, -Autorisierung und Revisionsprüfungen bleiben unverändert. Der Modus autorisiert -weder Produktion noch Kunden-Infrastruktur-Apply. - -Das Manifest vermerkt die Beschränkung auf Dev und `assistantQualified=false`; -der Build-Job heißt `build-dev-skip-assistant-qualification`. Diese Artefakte -können nicht mit `release_run_id` übernommen werden, auch nicht als qualifizierter -Release. Nach einem Deploymentfehler sind Untersuchung und ein neuer manueller -Lauf nötig. `build_only=true` erlaubt einen Build zur Prüfung, dessen Artefakt -anschließend nicht übernommen werden kann. Ein qualifizierter Release erfordert -weiterhin einen neuen Lauf mit **release_mode=qualified** und vollständiger -quellstandsgebundener Live-Qualifikation. Der Standardpfad **qualified** und dessen -Übernahmebedingungen bleiben unverändert. +**Configurator Release** auf **main** verwenden. **release_mode=skip** (Standard) +wählen, wenn keine neue Live-Qualifikation des Assistant nötig ist; **qualified** +führt die vollständige wiederholte Live-Suite aus. Änderungen an Assistant-Fakten/ +-Fähigkeiten benötigen weiterhin quellgebundene Qualifikation gemäß Beitragsanleitung. +Überspringen behauptet keine Qualifikation und entfernt keine fehlgeschlagenen +Nachweise. + +Für Dev mit anschließendem Prod **build_only=false** und **release_run_id** leer +lassen, Dev-**runner_pool_size** wählen (beispielsweise `2`). Build, Datenbank-/ +Browser-/native Prüfungen und geschützte Buildpack-Veröffentlichung laufen einmal, +danach das manuell freigegebene **lzc-dev-release**-Deployment. Die Assistant- +Laufzeiteinstellung bleibt in beiden Modi erhalten. Kein Kunden-Infrastruktur- +Apply wird dadurch autorisiert. + +Nach Erfolg des **gesamten Laufs** dessen numerische Run-ID in **Configurator +Production Release** auf derselben `main`-Revision verwenden: **publish=true**, +kuratierter Versionstag (aktuell **v2.1.0**) und **derselbe release_mode**. +Veröffentlichung und **lzc-prod-release**-Freigabe verwenden unveränderte Pakete; +Configurator Release nicht nur für einen zusätzlichen Prod-Build erneut starten. +Ist Dev nicht gewünscht, im ersten Lauf **build_only=true** wählen. Produktion +baut nicht neu. + +Ein neues `skip`-Manifest vermerkt umgebungsunabhängigen Umfang, +`assistantQualified=false` und `assistantQualification=skipped`; der Job heißt +**build-skip**. `qualified` verlangt weiter erfolgreiche Live-Qualifikation. +Bestehende Builds lassen sich über **release_run_id** später ohne Neubau nach Dev +übernehmen, unter Quell-/Tag- und Artefaktprüfung. Historische Artefakte mit +**dev-skip-assistant-qualification** bleiben auf Dev beschränkt und nicht +promotierbar. Veröffentlichte **accepted-assistant-limitations**-Releases bleiben +für kompatible erneute Deployments lesbar. Beide alten Modi sind keine neue +Laufauswahl. Eine fehlgeschlagene Qualifikation lässt sich nicht als `skip` +umetikettieren. ## Logs und Secrets diff --git a/landing-zone-configurator/infra/ci/README.md b/landing-zone-configurator/infra/ci/README.md index 886c1a4..15dc01c 100644 --- a/landing-zone-configurator/infra/ci/README.md +++ b/landing-zone-configurator/infra/ci/README.md @@ -75,30 +75,33 @@ The workflows contain all required environment variables, preparation steps and ### Dev release without live Assistant qualification -During Model Serving outages, select -**release_mode=dev-skip-assistant-qualification** in -**Actions > Configurator Release > Run workflow**, branch **main**. -Leave **build_only** unchecked and **release_run_id** empty; set -**runner_pool_size=1**. Review the exact source/run and approve the existing -**lzc-dev-release** environment after all applicable build/publication checks. -This explicit Dev exception skips only the live Assistant qualification job. -`LZC_ASSISTANT_ENABLED` continues to use the existing environment setting; -the Assistant remains enabled when configured, without a new live qualification -receipt for this release. Model availability still determines whether inference -works. This is not a successful qualification and does not erase earlier failed -receipts. All non-Assistant checks, migrations, protected tags and Dev destination -guards remain in force. Conversations and proposals are preserved; existing -runtime validation, authorization and revision checks remain unchanged. No -production deployment or customer infrastructure Apply is authorized by this mode. - -The manifest records Dev-only scope and `assistantQualified=false`; the build -job is named `build-dev-skip-assistant-qualification`. These artifacts cannot be -promoted using `release_run_id`, including as a qualified release. A deployment -failure requires inspection and a fresh manual run. `build_only=true` may build -this mode for inspection, but its artifact cannot subsequently be promoted. -A qualified release still requires a fresh **release_mode=qualified** run with -the complete source-bound live qualification. The default **qualified** path -and its promotion requirements are unchanged. +Use **Configurator Release** on **main**. Choose **release_mode=skip** (default) +when no new live Assistant qualification is needed, or **qualified** to run the +complete repeated live suite. Changes to Assistant facts/capabilities still need +source-bound qualification according to the contributor guidance. Skipping does +not claim qualification or remove earlier failed receipts. + +For Dev followed by Prod, leave **build_only=false** and **release_run_id** empty; +choose the Dev **runner_pool_size** (for example `2`). Build, database/browser/ +native checks and protected buildpack publication run once, followed by the +manually approved **lzc-dev-release** deployment. The Assistant runtime setting +remains unchanged in either mode. No customer infrastructure Apply is authorized. + +After the **whole run succeeds**, use its numeric run ID in **Configurator +Production Release** on the same `main` revision: **publish=true**, a curated +version tag (currently **v2.1.0**) and the **same release_mode**. Publication and +**lzc-prod-release** approval reuse the immutable packages; do not run Configurator +Release again just to create a Prod-only build. If Dev is not wanted, select +**build_only=true** in the initial run instead. Production does not rebuild. + +A new `skip` manifest records stage-neutral scope, `assistantQualified=false` and +`assistantQualification=skipped`; the job is **build-skip**. `qualified` still +requires successful live qualification. Existing builds can be deployed to Dev +later through **release_run_id** without rebuilding, subject to source/tag and +artifact checks. Historical **dev-skip-assistant-qualification** artifacts remain +Dev-only/non-promotable; published **accepted-assistant-limitations** releases +remain readable for compatible redeployment. Neither legacy mode is a new-run +selection. A failed qualification cannot be relabeled as `skip`. ## Logs and secrets diff --git a/landing-zone-configurator/infra/ci/buildpack-source.test.mjs b/landing-zone-configurator/infra/ci/buildpack-source.test.mjs index f228129..afccff6 100644 --- a/landing-zone-configurator/infra/ci/buildpack-source.test.mjs +++ b/landing-zone-configurator/infra/ci/buildpack-source.test.mjs @@ -456,3 +456,25 @@ test("failed deployments remain promotable only when qualification, build and im /Only successful trusted release builds/, ); }); + + +test("the actual workflow allows skip build plus Dev deployment and qualified still requires live success",()=>{ + const workflow=readFileSync(new URL("../../../.github/workflows/configurator-release.yml",import.meta.url),"utf8"); + const build=workflow.split("\n build:\n")[1].split("\n publish_buildpack:\n")[0]; + const assistant=workflow.split("\n assistant:\n")[1].split("\n build:\n")[0]; + const context={always:()=>true,cancelled:()=>false,github:{event_name:"workflow_dispatch",run_attempt:1,ref:"refs/heads/main"},inputs:{release_mode:"skip",build_only:false,release_run_id:""},vars:{LZC_RELEASE_CI_ENABLED:"true"},needs:{assistant:{result:"skipped"},build:{result:"success"},publish_buildpack:{result:"success"}}}; + const allowed=(job,overrides={})=>runInNewContext(job.match(/^\s+if: (.+)$/m)[1],{...context,...overrides}); + assert.equal(allowed(assistant),false); + assert.equal(allowed(build),true);assert.equal(allowed(publisher),true);assert.equal(allowed(deploy),true); + assert.equal(allowed(build,{inputs:{...context.inputs,build_only:true}}),true); + assert.equal(allowed(deploy,{inputs:{...context.inputs,build_only:true}}),false); + assert.equal(allowed(build,{github:{...context.github,ref:"refs/heads/feature/landing-zone-configurator"}}),false); + for(const result of ["failure","cancelled","skipped"]){ + assert.equal(allowed(build,{inputs:{...context.inputs,release_mode:"qualified"},needs:{...context.needs,assistant:{result}}}),false); + } + assert.equal(allowed(build,{inputs:{...context.inputs,release_mode:"qualified"},needs:{...context.needs,assistant:{result:"success"}}}),true); + const production=readFileSync(new URL("../../../.github/workflows/configurator-production.yml",import.meta.url),"utf8"); + assert.match(production,/options: \[skip, qualified\]/); + assert.doesNotMatch(production,/inputs\.build_only/); + assert.match(production,/environment:\n name: lzc-prod-release/); +}); diff --git a/landing-zone-configurator/infra/ci/prepare-release.mjs b/landing-zone-configurator/infra/ci/prepare-release.mjs index 71a527d..3286157 100644 --- a/landing-zone-configurator/infra/ci/prepare-release.mjs +++ b/landing-zone-configurator/infra/ci/prepare-release.mjs @@ -10,7 +10,8 @@ import { deploymentStage } from "./stages.mjs"; import { releaseMode } from "./release-artifact.mjs"; const stage=deploymentStage(process.env.LZC_ENVIRONMENT??"lzc-dev"); if(stage.name==="lzc-prod" && (process.env.LZC_PUBLISHED_RELEASE !== "true" || !(process.env.GITHUB_REF==="refs/heads/main" || process.env.GITHUB_EVENT_NAME==="release" && /^refs\/tags\/v(?:[2-9]|[1-9][0-9]+)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/.test(process.env.GITHUB_REF??"")) || process.env.LZC_RELEASE_MODE === "dev-skip-assistant-qualification")) throw new Error("Production requires an approved published release from main"); -const unqualifiedAssistantRelease=releaseMode(process.env.LZC_RELEASE_MODE)==="dev-skip-assistant-qualification"; +const selectedReleaseMode=releaseMode(process.env.LZC_RELEASE_MODE); +const unqualifiedAssistantRelease=selectedReleaseMode==="dev-skip-assistant-qualification" || selectedReleaseMode==="skip" && stage.name==="lzc-dev"; if(unqualifiedAssistantRelease && process.env.GITHUB_REF!=="refs/heads/main")throw new Error("Unqualified Assistant release requires Dev main source"); const mode=process.argv[2]; if(!["backend","application","runner"].includes(mode)) throw new Error("Expected backend or application"); diff --git a/landing-zone-configurator/infra/ci/prepare-release.test.mjs b/landing-zone-configurator/infra/ci/prepare-release.test.mjs index 7208eee..f9f866a 100644 --- a/landing-zone-configurator/infra/ci/prepare-release.test.mjs +++ b/landing-zone-configurator/infra/ci/prepare-release.test.mjs @@ -46,15 +46,15 @@ test("validation and release both execute native template and stateful platform assert.match(workflow,/^\s+npm run test:common-contract$|run: npm run test:common-contract/m); } }); -test("release builds require repeated live model qualification and retain multi-turn failures",()=>{ +test("qualified releases require repeated live qualification while explicit skip retains runtime settings",()=>{ const release=readFileSync(new URL("../../../.github/workflows/configurator-release.yml",import.meta.url),"utf8"); const live=readFileSync(new URL("../../../.github/workflows/assistant-live.yml",import.meta.url),"utf8"); assert.match(release,/uses: \.\/\.github\/workflows\/assistant-live\.yml/); assert.match(release,/topic: all\n\s+repetitions: 2/); assert.match(release,/needs: assistant/); - assert.ok(release.includes("inputs.release_mode != 'dev-skip-assistant-qualification' && needs.assistant.result == 'success'")); - assert.ok(release.includes("inputs.release_mode == 'dev-skip-assistant-qualification' && github.ref == 'refs/heads/main' && needs.assistant.result == 'skipped'")); - assert.match(release,/default: qualified/); + assert.ok(release.includes("inputs.release_mode == 'qualified' && needs.assistant.result == 'success'")); + assert.ok(release.includes("inputs.release_mode == 'skip' && github.ref == 'refs/heads/main' && needs.assistant.result == 'skipped'")); + assert.match(release,/default: skip/); assert.equal(release.split("LZC_ASSISTANT_ENABLED: ${{ vars.LZC_ASSISTANT_ENABLED }}").length,3); assert.doesNotMatch(release,/continue-on-error:/); assert.match(live,/workflow_call:/); @@ -269,6 +269,12 @@ test("release uses private inputs, rejects wrong destinations and omits privileg assert.equal(run("application").status,0); assert.equal(JSON.parse(readFileSync(vars)).LZC_ASSISTANT_ENABLED,"false","Skipping qualification also preserves opt-out"); env.LZC_ASSISTANT_ENABLED="true"; + env.LZC_RELEASE_MODE="skip"; + env.GITHUB_REF="refs/heads/feature/landing-zone-configurator"; + assert.notEqual(run("application").status,0,"Skipped qualification requires main"); + env.GITHUB_REF="refs/heads/main"; + assert.equal(run("application").status,0); + assert.equal(JSON.parse(readFileSync(vars)).LZC_ASSISTANT_ENABLED,"true","Stage-neutral skip preserves Assistant runtime configuration"); env.LZC_RELEASE_MODE="qualified"; assert.equal(run("application").status,0); assert.equal(JSON.parse(readFileSync(vars)).LZC_ASSISTANT_ENABLED,"true"); diff --git a/landing-zone-configurator/infra/ci/production-release.mjs b/landing-zone-configurator/infra/ci/production-release.mjs index 303143a..ef2dfde 100644 --- a/landing-zone-configurator/infra/ci/production-release.mjs +++ b/landing-zone-configurator/infra/ci/production-release.mjs @@ -7,7 +7,22 @@ export function productionRelease(metadata, release, revision) { if (!/^v(?:[2-9]|[1-9][0-9]+)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/.test(release?.tag_name ?? "") || release.draft || release.prerelease || !release.published_at) throw new Error("Production requires a published stable GitHub Release"); if (metadata?.schemaVersion !== 1 || metadata.repository !== "stackitcloud/stackit-landing-zone" || metadata.tag !== release.tag_name || metadata.revision !== revision || !/^[a-f0-9]{40}$/.test(revision ?? "") || !/^[1-9][0-9]*$/.test(String(metadata.runId))) throw new Error("Published release source binding is invalid"); const mode = releaseMode(metadata.mode); - if (!["qualified", "accepted-assistant-limitations"].includes(mode)) throw new Error("Dev exception artifacts cannot enter production"); + if (!["qualified", "skip", "accepted-assistant-limitations"].includes(mode)) throw new Error("Dev exception artifacts cannot enter production"); + return metadata; +} +export function verifyProductionBuild(run, jobs, metadata, revision) { + const mode = releaseMode(metadata.mode); + if (!["qualified", "skip", "accepted-assistant-limitations"].includes(mode)) + throw new Error("Dev exception artifacts cannot enter production"); + const names = mode === "qualified" + ? ["build", "assistant / assistant-live-qualification"] + : mode === "skip" ? ["build-skip"] : ["build-accepted-assistant-limitations"]; + if (run.head_sha !== revision || run.path !== ".github/workflows/configurator-release.yml" || + run.head_branch !== "main" || run.event !== "workflow_dispatch" || + run.run_attempt !== 1 || run.conclusion !== "success" || + run.head_repository?.full_name !== "stackitcloud/stackit-landing-zone" || + !names.every(name => jobs.some(job => job.name === name && job.conclusion === "success"))) + throw new Error("Published assets do not originate from a successful trusted build"); return metadata; } if (process.argv[2] === "metadata") { @@ -32,7 +47,6 @@ if (process.argv[2] === "metadata") { gh(["attestation","verify",".local/production-release.json","--repo",repo,"--signer-workflow",`${repo}/.github/workflows/configurator-production.yml`,"--source-ref","refs/heads/main","--source-digest",ref.sha,"--signer-digest",ref.sha,"--deny-self-hosted-runners"]); const run=JSON.parse(gh(["api",`repos/${repo}/actions/runs/${metadata.runId}`])); const jobs=JSON.parse(gh(["api",`repos/${repo}/actions/runs/${metadata.runId}/jobs?per_page=100`])); - const names=metadata.mode==="qualified"?["build","assistant / assistant-live-qualification"]:["build-accepted-assistant-limitations"]; - if(run.head_sha!==ref.sha || run.path!==".github/workflows/configurator-release.yml" || run.head_branch!=="main" || run.event!=="workflow_dispatch" || run.run_attempt!==1 || run.conclusion!=="success" || run.head_repository?.full_name!==repo || !names.every(name=>jobs.jobs.some(job=>job.name===name&&job.conclusion==="success"))) throw new Error("Published assets do not originate from a successful trusted build"); + verifyProductionBuild(run, jobs.jobs, metadata, ref.sha); appendFileSync(process.env.GITHUB_OUTPUT,`revision=${metadata.revision}\nrun_id=${metadata.runId}\nmode=${metadata.mode}\n`); } diff --git a/landing-zone-configurator/infra/ci/production.test.mjs b/landing-zone-configurator/infra/ci/production.test.mjs index 7fb410c..a88b584 100644 --- a/landing-zone-configurator/infra/ci/production.test.mjs +++ b/landing-zone-configurator/infra/ci/production.test.mjs @@ -4,7 +4,7 @@ import {mkdtempSync,writeFileSync,readFileSync,rmSync,mkdirSync,symlinkSync,exis import {tmpdir} from "node:os"; import {join} from "node:path"; import {spawnSync} from "node:child_process"; -import {productionRelease} from "./production-release.mjs"; +import {productionRelease,verifyProductionBuild} from "./production-release.mjs"; import {productionBindings,validateProductionBindings,runtimeKeys} from "./production-bindings.mjs"; import {createReleaseManifest,verifyReleaseManifest,approvedReleaseSource} from "./release-artifact.mjs"; const id="11111111-2222-4333-8444-555555555555",runnerId="22222222-2222-4333-8444-555555555555"; @@ -89,6 +89,11 @@ test("production preparation uses scoped bindings, exact PKCE origin and three r assert.equal(prepared.LZC_APP_INSTANCES,3);assert.equal(prepared.LZC_APP_ROUTE,"app.landing-zone.runs.onstackit.cloud");assert.equal(prepared.LZC_ASSISTANT_ENABLED,"true");assert.equal(prepared.LZC_RUNNER_CF_USERNAME,"runner-space-deployer"); assert.ok(!JSON.stringify(prepared).includes("org-manager"));assert.equal(existsSync(join(directory,"lzc-release/platform.backend.hcl")),false); env.LZC_STACKIT_REDIRECT_URI="https://lzc-dev-configurator.apps.01.cf.eu01.stackit.cloud/auth/stackit/callback";assert.notEqual(run("application").status,0); + env.LZC_STACKIT_REDIRECT_URI="https://app.landing-zone.runs.onstackit.cloud/auth/stackit/callback"; + env.LZC_RELEASE_MODE="skip"; + assert.equal(run("backend").status,0); + assert.equal(run("application").status,0); + assert.equal(JSON.parse(readFileSync(join(directory,"lzc-release/app-vars.json"),"utf8")).LZC_ASSISTANT_ENABLED,"true"); env.LZC_PUBLISHED_RELEASE="false";assert.notEqual(run("backend").status,0); env.LZC_PUBLISHED_RELEASE="true";env.LZC_RELEASE_MODE="dev-skip-assistant-qualification";assert.notEqual(run("backend").status,0); }finally{rmSync(directory,{recursive:true,force:true});} @@ -104,8 +109,61 @@ test("space-scoped account creation waits for its provisioning principal's devel }); test("patch release notes describe their changes and unknown versions require curation",()=>{ - const run=tag=>spawnSync(process.execPath,[new URL("./release-notes.mjs",import.meta.url).pathname],{env:{...process.env,LZC_RELEASE_TAG:tag,LZC_RELEASE_MODE:"accepted-assistant-limitations"},encoding:"utf8"}); + const run=(tag,mode="accepted-assistant-limitations")=>spawnSync(process.execPath,[new URL("./release-notes.mjs",import.meta.url).pathname],{env:{...process.env,LZC_RELEASE_TAG:tag,LZC_RELEASE_MODE:mode},encoding:"utf8"}); const patch=run("v2.0.1");assert.equal(patch.status,0,patch.stderr);assert.match(patch.stdout,/obsolete Development badge/);assert.match(patch.stdout,/all three API replicas/);assert.match(patch.stdout,/#225/);assert.doesNotMatch(patch.stdout,/First production release/);assert.ok(patch.stdout.split(/\s+/).length<150); assert.match(run("v2.0.0").stdout,/First production release/); + const feature=run("v2.1.0","skip");assert.equal(feature.status,0,feature.stderr);assert.match(feature.stdout,/notification inbox/);assert.match(feature.stdout,/Build once/);assert.match(feature.stdout,/#225/);assert.ok(feature.stdout.split(/\s+/).length<180); + assert.doesNotMatch(run("v2.1.0","qualified").stdout,/not fully qualified/); const future=run("v2.0.2");assert.notEqual(future.status,0);assert.match(future.stderr,/Curated release notes required/); }); + + +test("one stage-neutral skip build is promotable to Dev and Prod without qualifying legacy Dev artifacts",()=>{ + const source={revision:"a".repeat(40),runId:"123",mode:"skip"}; + const run={id:123,run_attempt:1,path:".github/workflows/configurator-release.yml",head_sha:source.revision,head_repository:{full_name:"stackitcloud/stackit-landing-zone"},head_branch:"main",event:"workflow_dispatch"}; + const jobs=[{name:"build-skip",status:"completed",conclusion:"success"},{name:"assistant",status:"completed",conclusion:"skipped"}]; + const artifacts=[{id:456,name:"configurator-release-123",expired:false,workflow_run:{id:123,head_sha:source.revision}}]; + for(const caller of ["123","999"]){ + assert.equal(approvedReleaseSource(run,jobs,artifacts,source.runId,"skip",caller).runId,"123"); + } + const metadata={schemaVersion:1,repository:run.head_repository.full_name,tag:"v2.1.0",revision:source.revision,runId:source.runId,mode:"skip"}; + const release={tag_name:metadata.tag,draft:false,prerelease:false,published_at:"2026-11-16T00:00:00Z"}; + assert.equal(productionRelease(metadata,release,source.revision),metadata); + const completed={...run,conclusion:"success"}; + assert.equal(verifyProductionBuild(completed,jobs,metadata,source.revision),metadata); + for(const conclusion of [undefined,null,"failure","cancelled"]){ + assert.throws(()=>verifyProductionBuild({...completed,conclusion},jobs,metadata,source.revision)); + } + for(const change of [{head_sha:"b".repeat(40)},{path:".github/workflows/foreign.yml"},{head_branch:"feature"},{event:"push"},{run_attempt:2},{head_repository:{full_name:"foreign/repository"}}]){ + assert.throws(()=>verifyProductionBuild({...completed,...change},jobs,metadata,source.revision)); + } + assert.throws(()=>verifyProductionBuild(completed,[{...jobs[0],conclusion:"failure"}],metadata,source.revision)); + assert.throws(()=>verifyProductionBuild(completed,[{...jobs[0],name:"build-dev-skip-assistant-qualification"}],metadata,source.revision)); + assert.throws(()=>verifyProductionBuild(completed,jobs,{...metadata,mode:"qualified"},source.revision)); + assert.throws(()=>verifyProductionBuild(completed,jobs,{...metadata,mode:"dev-skip-assistant-qualification"},source.revision)); + for(const change of [{head_branch:"feature"},{event:"push"},{run_attempt:2},{head_repository:{full_name:"foreign/repository"}}]){ + assert.throws(()=>approvedReleaseSource({...run,...change},jobs,artifacts,"123","skip","999")); + } + for(const conclusion of ["failure","cancelled","success"]){ + assert.throws(()=>approvedReleaseSource(run,[jobs[0],{...jobs[1],conclusion}],artifacts,"123","skip","999")); + } + assert.throws(()=>approvedReleaseSource(run,[{...jobs[0],name:"build-dev-skip-assistant-qualification"},jobs[1]],artifacts,"123","skip","999")); + assert.throws(()=>approvedReleaseSource(run,jobs,artifacts,"123","qualified","999")); + assert.throws(()=>approvedReleaseSource(run,jobs,[{...artifacts[0],expired:true}],"123","skip","999")); + const directory=mkdtempSync(join(tmpdir(),"lzc-skip-shared-artifact-")); + try{ + for(const name of ["release.tar.gz","runner.tar.gz"])writeFileSync(join(directory,name),"same-immutable-bundle"); + const manifest=createReleaseManifest(directory,source); + assert.equal(manifest.schemaVersion,4);assert.equal(manifest.target,"stage-neutral");assert.equal(manifest.assistantQualified,false);assert.equal(manifest.assistantQualification,"skipped"); + assert.deepEqual(verifyReleaseManifest(directory,source),manifest); + assert.throws(()=>verifyReleaseManifest(directory,{...source,mode:"qualified"})); + assert.throws(()=>verifyReleaseManifest(directory,{...source,mode:"dev-skip-assistant-qualification"})); + for(const change of [{schemaVersion:1},{releaseMode:"qualified"},{target:"lzc-dev"},{assistantQualified:true},{assistantQualification:"passed"},{knownLimitations:[]},{releaseRunId:"456"}]){ + writeFileSync(join(directory,"release-manifest.json"),JSON.stringify({...manifest,...change})); + assert.throws(()=>verifyReleaseManifest(directory,source)); + } + writeFileSync(join(directory,"release-manifest.json"),JSON.stringify(manifest)); + writeFileSync(join(directory,"runner.tar.gz"),"tampered"); + assert.throws(()=>verifyReleaseManifest(directory,source),/checksum/); + }finally{rmSync(directory,{recursive:true,force:true});} +}); diff --git a/landing-zone-configurator/infra/ci/release-artifact.mjs b/landing-zone-configurator/infra/ci/release-artifact.mjs index d5090e8..b5e22e4 100644 --- a/landing-zone-configurator/infra/ci/release-artifact.mjs +++ b/landing-zone-configurator/infra/ci/release-artifact.mjs @@ -11,7 +11,7 @@ function checksum(path) { } export function releaseMode(value = "qualified") { - if (!["qualified", "dev-skip-assistant-qualification", "accepted-assistant-limitations"].includes(value)) + if (!["qualified", "skip", "dev-skip-assistant-qualification", "accepted-assistant-limitations"].includes(value)) throw new Error("Unknown release mode"); return value; } @@ -29,7 +29,8 @@ function validSource(source) { export function createReleaseManifest(directory, source) { validSource(source); const manifest = { - schemaVersion: source.mode === "accepted-assistant-limitations" ? 3 : source.mode === "dev-skip-assistant-qualification" ? 2 : 1, + schemaVersion: source.mode === "skip" ? 4 : source.mode === "accepted-assistant-limitations" ? 3 : source.mode === "dev-skip-assistant-qualification" ? 2 : 1, + ...(source.mode === "skip" ? { releaseMode: "skip", target: "stage-neutral", assistantQualified: false, assistantQualification: "skipped", knownLimitations: ["https://github.com/stackitcloud/stackit-landing-zone/issues/225"] } : {}), ...(source.mode === "accepted-assistant-limitations" ? { releaseMode: source.mode, target: "lzc-prod", assistantQualified: false, knownLimitations: ["https://github.com/stackitcloud/stackit-landing-zone/issues/225"] } : {}), ...(source.mode === "dev-skip-assistant-qualification" ? { @@ -58,7 +59,9 @@ export function verifyReleaseManifest(directory, source) { readFileSync(resolve(directory, "release-manifest.json"), "utf8"), ); if ( - (source.mode === "accepted-assistant-limitations" + (source.mode === "skip" + ? manifest.schemaVersion !== 4 || manifest.releaseMode !== "skip" || manifest.target !== "stage-neutral" || manifest.assistantQualified !== false || manifest.assistantQualification !== "skipped" || JSON.stringify(manifest.knownLimitations) !== JSON.stringify(["https://github.com/stackitcloud/stackit-landing-zone/issues/225"]) + : source.mode === "accepted-assistant-limitations" ? manifest.schemaVersion !== 3 || manifest.releaseMode !== source.mode || manifest.target !== "lzc-prod" || manifest.assistantQualified !== false || JSON.stringify(manifest.knownLimitations) !== JSON.stringify(["https://github.com/stackitcloud/stackit-landing-zone/issues/225"]) : source.mode === "dev-skip-assistant-qualification" ? manifest.schemaVersion !== 2 || @@ -102,7 +105,7 @@ export function approvedReleaseSource( throw new Error( "Unqualified Assistant builds are Dev-only fresh releases, never promotions", ); - if (mode === "accepted-assistant-limitations" && (run.head_branch !== "main" || run.event !== "workflow_dispatch" || jobs.some(job => job.name.startsWith("assistant") && job.conclusion !== "skipped"))) throw new Error("Accepted Assistant limitations require a fresh main build with explicit provenance"); + if (["skip", "accepted-assistant-limitations"].includes(mode) && (run.head_branch !== "main" || run.event !== "workflow_dispatch" || jobs.some(job => job.name.startsWith("assistant") && job.conclusion !== "skipped"))) throw new Error("Skipped Assistant qualification requires a main build with explicit provenance"); validSource({ revision: run.head_sha, runId }); if ( run.id !== Number(runId) || @@ -114,7 +117,7 @@ export function approvedReleaseSource( !( unqualified ? ["build-dev-skip-assistant-qualification"] - : mode === "accepted-assistant-limitations" ? ["build-accepted-assistant-limitations"] : ["build", "assistant / assistant-live-qualification"] + : mode === "skip" ? ["build-skip"] : mode === "accepted-assistant-limitations" ? ["build-accepted-assistant-limitations"] : ["build", "assistant / assistant-live-qualification"] ).every((name) => jobs.some( (job) => diff --git a/landing-zone-configurator/infra/ci/release-notes.mjs b/landing-zone-configurator/infra/ci/release-notes.mjs index 8c769ad..62c20c9 100644 --- a/landing-zone-configurator/infra/ci/release-notes.mjs +++ b/landing-zone-configurator/infra/ci/release-notes.mjs @@ -10,6 +10,16 @@ const notes={ "Shared foundations, Application Landing Zone upgrades and audit-log integration.", ], }, + "v2.1.0": { + introduction:"Notifications and workspace management for the Landing Zone Configurator.", + changes:[ + "Add the notification inbox and branded German/English MailOut emails with per-user topic preferences.", + "Refresh member and invitation management with clear recipients and delivery status.", + "Use explicit workspaces, improve English interface coverage and correct bodyless deletion requests.", + "Show organization verification consistently in workspace selection.", + "Build once and reuse the same immutable package for Dev and manually approved production, with optional Assistant qualification.", + ], + }, "v2.0.1": { introduction:"Production fixes for the Landing Zone Configurator.", changes:[ @@ -21,5 +31,6 @@ const notes={ }; const selected=notes[tag]; if(!selected)throw new Error("Curated release notes required for this version"); -const limitations=process.env.LZC_RELEASE_MODE==="accepted-assistant-limitations"; -console.log(`${selected.introduction}\n\n${selected.changes.map(change=>`- ${change}`).join("\n")}\n\n${limitations?"Known limitation: the enabled Assistant is not fully qualified; intermittent model-service HTTP 400 errors remain under investigation in #225.":"Assistant qualification is recorded in the attached source-bound release manifest."}\n\nOperator setup, credential rotation and recovery: [production runbook](https://github.com/stackitcloud/stackit-landing-zone/blob/${tag}/landing-zone-configurator/docs/production.md).`); +const limitations=["skip","accepted-assistant-limitations"].includes(process.env.LZC_RELEASE_MODE); +const qualificationNote=process.env.LZC_RELEASE_MODE==="skip"?"Assistant live qualification was skipped for this release; known intermittent model-service HTTP 400 errors remain tracked in #225.":limitations?"Known limitation: the enabled Assistant is not fully qualified; intermittent model-service HTTP 400 errors remain under investigation in #225.":"Assistant qualification is recorded in the attached source-bound release manifest."; +console.log(`${selected.introduction}\n\n${selected.changes.map(change=>`- ${change}`).join("\n")}\n\n${qualificationNote}\n\nOperator setup, credential rotation and recovery: [production runbook](https://github.com/stackitcloud/stackit-landing-zone/blob/${tag}/landing-zone-configurator/docs/production.md).`);