Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Accept qualified recovered release activation

pulse-triage[bot]94ccf96bad2f
diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml
index f69ff42a2c..f70f646c03 100644
--- a/.github/workflows/create-release.yml
+++ b/.github/workflows/create-release.yml
@@ -1441,6 +1441,63 @@ jobs:
activated=false
committed=false
+ validate_existing_activation_commit() {
+ local marker_convergence_run_id recovery_run_id recovery_run expected_title
+ local convergence_run expected_convergence_title
+ curl -fsSL --retry 12 --retry-delay 5 --retry-all-errors \
+ -o "${verified_marker}" \
+ "https://github.com/${{ github.repository }}/releases/download/${TAG}/release-activation.json"
+ jq -e \
+ --arg tag "${TAG}" \
+ --arg target_commitish "${EXPECTED_COMMIT}" \
+ --arg release_id "${RELEASE_ID}" \
+ --arg source_release_run_id "${GITHUB_RUN_ID}" \
+ --arg r2_prefix "${R2_PREFIX}" \
+ '.schema_version == 1 and .tag == $tag and
+ .target_commitish == $target_commitish and .release_id == $release_id and
+ .source_release_run_id == $source_release_run_id and
+ (.convergence_run_id | test("^[0-9]+$")) and .r2_prefix == $r2_prefix' \
+ "${verified_marker}" >/dev/null
+
+ marker_convergence_run_id="$(jq -r '.convergence_run_id' "${verified_marker}")"
+ recovery_run_id="$(jq -r '.activation_recovery_run_id // ""' "${verified_marker}")"
+ if [ "${marker_convergence_run_id}" = "${CONVERGENCE_RUN_ID}" ] && \
+ [ -z "${recovery_run_id}" ]; then
+ echo "[OK] ${TAG} already has this release run's exact activation commit."
+ return 0
+ fi
+ if [[ ! "${recovery_run_id}" =~ ^[0-9]+$ ]]; then
+ echo "::error::Existing activation marker for ${TAG} has no valid recovery lineage."
+ return 1
+ fi
+
+ recovery_run="$(mktemp)"
+ gh api "repos/${{ github.repository }}/actions/runs/${recovery_run_id}" > "${recovery_run}"
+ expected_title="Recover release activation ${TAG} source ${GITHUB_RUN_ID}"
+ jq -e \
+ --arg repository "${GITHUB_REPOSITORY}" \
+ --arg title "${expected_title}" \
+ '.event == "workflow_dispatch" and
+ .path == ".github/workflows/recover-release-activation.yml" and
+ .head_branch == "main" and .head_repository.full_name == $repository and
+ .display_title == $title and .status == "completed" and .conclusion == "success"' \
+ "${recovery_run}" >/dev/null
+
+ convergence_run="$(mktemp)"
+ gh api "repos/${{ github.repository }}/actions/runs/${marker_convergence_run_id}" > "${convergence_run}"
+ expected_convergence_title="Release convergence ${TAG} source ${GITHUB_RUN_ID}"
+ jq -e \
+ --arg repository "${GITHUB_REPOSITORY}" \
+ --arg title "${expected_convergence_title}" \
+ '.event == "workflow_dispatch" and
+ .path == ".github/workflows/release-convergence.yml" and
+ .head_branch == "main" and .head_repository.full_name == $repository and
+ .display_title == $title' \
+ "${convergence_run}" >/dev/null
+ rm -f "${recovery_run}" "${convergence_run}"
+ echo "[OK] ${TAG} was already committed by successful recovery run ${recovery_run_id}; convergence run ${marker_convergence_run_id} owns customer rollout."
+ }
+
require_viable_convergence_owner() {
local attempt owner_state owner_event owner_status owner_conclusion
local owner_workflow owner_title owner_url expected_title
@@ -1493,6 +1550,16 @@ jobs:
published_at=$(jq -r '.published_at // ""' "$release_json")
actual_prerelease=$(jq -r '.prerelease' "$release_json")
activation_committed=$(jq -r 'any(.assets[]?; .name == "release-activation.json")' "$release_json")
+ if [ "$actual_tag" = "$TAG" ] && [ "$actual_commit" = "$EXPECTED_COMMIT" ] && \
+ [ "$actual_draft" = "false" ] && [ -n "$published_at" ] && \
+ [ "$activation_committed" = "true" ] && \
+ [ "$actual_prerelease" = "$IS_PRERELEASE" ]; then
+ validate_existing_activation_commit
+ rm -f "$release_json" "$publish_payload" "$quarantine_payload" \
+ "$verified_marker"
+ rm -rf "$activation_marker_dir"
+ exit 0
+ fi
if [ "$actual_tag" != "$TAG" ] || [ "$actual_commit" != "$EXPECTED_COMMIT" ] || \
[ "$actual_draft" != "true" ] || \
[ "$activation_committed" = "true" ] || \
@@ -1655,10 +1722,43 @@ jobs:
--arg target_commitish "${EXPECTED_COMMIT}" \
--arg release_id "${RELEASE_ID}" \
--arg source_release_run_id "${GITHUB_RUN_ID}" \
- --arg convergence_run_id "${CONVERGENCE_RUN_ID}" \
--arg r2_prefix "${R2_PREFIX}" \
- '.schema_version == 1 and .tag == $tag and .target_commitish == $target_commitish and .release_id == $release_id and .source_release_run_id == $source_release_run_id and .convergence_run_id == $convergence_run_id and .r2_prefix == $r2_prefix' \
+ '.schema_version == 1 and .tag == $tag and
+ .target_commitish == $target_commitish and .release_id == $release_id and
+ .source_release_run_id == $source_release_run_id and
+ (.convergence_run_id | test("^[0-9]+$")) and .r2_prefix == $r2_prefix' \
"${marker}" >/dev/null
+ marker_convergence_run_id="$(jq -r '.convergence_run_id' "${marker}")"
+ recovery_run_id="$(jq -r '.activation_recovery_run_id // ""' "${marker}")"
+ if [ "${marker_convergence_run_id}" != "${CONVERGENCE_RUN_ID}" ] || \
+ [ -n "${recovery_run_id}" ]; then
+ if [[ ! "${recovery_run_id}" =~ ^[0-9]+$ ]]; then
+ echo "::error::Activation marker for ${TAG} does not belong to the staged convergence owner or a qualified recovery."
+ exit 1
+ fi
+ recovery_run="$(mktemp)"
+ gh api "repos/${{ github.repository }}/actions/runs/${recovery_run_id}" > "${recovery_run}"
+ jq -e \
+ --arg repository "${GITHUB_REPOSITORY}" \
+ --arg title "Recover release activation ${TAG} source ${GITHUB_RUN_ID}" \
+ '.event == "workflow_dispatch" and
+ .path == ".github/workflows/recover-release-activation.yml" and
+ .head_branch == "main" and .head_repository.full_name == $repository and
+ .display_title == $title and .status == "completed" and .conclusion == "success"' \
+ "${recovery_run}" >/dev/null
+ convergence_run="$(mktemp)"
+ gh api "repos/${{ github.repository }}/actions/runs/${marker_convergence_run_id}" > "${convergence_run}"
+ jq -e \
+ --arg repository "${GITHUB_REPOSITORY}" \
+ --arg title "Release convergence ${TAG} source ${GITHUB_RUN_ID}" \
+ '.event == "workflow_dispatch" and
+ .path == ".github/workflows/release-convergence.yml" and
+ .head_branch == "main" and .head_repository.full_name == $repository and
+ .display_title == $title' \
+ "${convergence_run}" >/dev/null
+ rm -f "${recovery_run}" "${convergence_run}"
+ echo "Release activation was committed by qualified recovery run ${recovery_run_id}; customer convergence continues in run ${marker_convergence_run_id}."
+ fi
rm -f "${marker}"
fi
diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.md
index 0d47b95fad..f9103e2952 100644
--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md
+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md
@@ -1387,6 +1387,17 @@ artifact-selection behaviour.
name and display title are coherently indexed, both normal and recovered
activation use a bounded metadata-propagation wait before rejecting the
convergence owner; a terminal owner still fails immediately.
+ Once recovery publishes the exact activation marker, a later failed-job
+ rerun of the source release workflow must treat that committed state as an
+ idempotent success rather than reject it merely because the release is no
+ longer a draft. That adoption must fail closed unless the public marker
+ still binds the source run's exact tag, target commit, release ID, R2 prefix,
+ and numeric convergence owner; the marker names a completed successful
+ `recover-release-activation.yml` dispatch for that same tag and source run;
+ and its convergence owner is an exact mainline
+ `release-convergence.yml` dispatch for the same lineage. An unrelated public
+ marker, an unqualified recovery run, or mismatched convergence metadata must
+ remain a release failure and must never be overwritten by the rerun.
Every convergence job that calls a reusable workflow must explicitly grant
all permissions requested by that callee. In particular, Helm Pages
convergence requires both `actions: read` to retrieve the exact source-run
diff --git a/scripts/installtests/build_release_assets_test.go b/scripts/installtests/build_release_assets_test.go
index afc6793239..d7bc3befcc 100644
--- a/scripts/installtests/build_release_assets_test.go
+++ b/scripts/installtests/build_release_assets_test.go
@@ -2684,6 +2684,11 @@ func TestReleasePipelinePromotesOneImmutableCandidate(t *testing.T) {
for _, needle := range []string{
`release-activation.json`,
`require_viable_convergence_owner`,
+ `validate_existing_activation_commit`,
+ `Recover release activation ${TAG} source ${GITHUB_RUN_ID}`,
+ `.path == ".github/workflows/recover-release-activation.yml"`,
+ `.path == ".github/workflows/release-convergence.yml"`,
+ `.status == "completed" and .conclusion == "success"`,
`continue-on-error: true`,
`Resuming quarantined activation for ${TAG}`,
`[ "$activation_committed" = "true" ] ||`,
@@ -2696,6 +2701,10 @@ func TestReleasePipelinePromotesOneImmutableCandidate(t *testing.T) {
if strings.Contains(activationJob, `[ -n "$published_at" ] ||`) {
t.Fatal("release activation must allow retrying a current draft when GitHub retains historical published_at metadata")
}
+ if strings.Contains(activationJob, `--clobber`) &&
+ !strings.Contains(activationJob, `already committed by successful recovery run`) {
+ t.Fatal("release activation reruns must recognize a qualified recovery before considering marker replacement")
+ }
if !strings.Contains(createJob, `Resuming quarantined draft for ${TAG}`) ||
!strings.Contains(createJob, `Resuming quarantined draft release for ${TAG}`) {
t.Fatal("release creation must explicitly support resuming a quarantined draft")
diff --git a/scripts/release_control/dev_runtime_governance_test.py b/scripts/release_control/dev_runtime_governance_test.py
index ab8dce5cc3..2a1f40af72 100644
--- a/scripts/release_control/dev_runtime_governance_test.py
+++ b/scripts/release_control/dev_runtime_governance_test.py
@@ -25,7 +25,19 @@ class DevRuntimeGovernanceTest(unittest.TestCase):
{match["subsystem"] for match in file_entry["matches"]},
{"deployment-installability"},
)
- match = file_entry["matches"][0]
+ self.assertEqual(
+ {
+ match["verification_requirement"]["id"]
+ for match in file_entry["matches"]
+ },
+ {"dev-runtime-orchestration", "frontend-build-output"},
+ )
+ match = next(
+ match
+ for match in file_entry["matches"]
+ if match["verification_requirement"]["id"]
+ == "dev-runtime-orchestration"
+ )
self.assertEqual(
match["contract"],
"docs/release-control/v6/internal/subsystems/deployment-installability.md",
diff --git a/scripts/release_control/release_promotion_policy_test.py b/scripts/release_control/release_promotion_policy_test.py
index 92fdfda356..2ee2e5b4a8 100644
--- a/scripts/release_control/release_promotion_policy_test.py
+++ b/scripts/release_control/release_promotion_policy_test.py
@@ -737,6 +737,22 @@ class ReleasePromotionPolicyTest(unittest.TestCase):
self.assertIn('expected_title="Release convergence ${TAG} source ${GITHUB_RUN_ID}"', activation)
self.assertIn('[ "${owner_status}" = "completed" ]', activation)
self.assertIn("immediately before the marker", activation)
+ self.assertIn("validate_existing_activation_commit", activation)
+ self.assertIn(
+ "Recover release activation ${TAG} source ${GITHUB_RUN_ID}", activation
+ )
+ self.assertIn(
+ '.path == ".github/workflows/recover-release-activation.yml"',
+ activation,
+ )
+ self.assertIn(
+ '.path == ".github/workflows/release-convergence.yml"', activation
+ )
+ verdict = workflow_job_block(release_workflow, "release_commit_verdict")
+ self.assertIn("activation_recovery_run_id", verdict)
+ self.assertIn(
+ '.status == "completed" and .conclusion == "success"', verdict
+ )
self.assertLess(
activation.index("require_viable_convergence_owner\n gh api"),
activation.index("-X PATCH --input \"$publish_payload\""),