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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Bootstrap absent promotion lease ref
pulse-triage[bot]5981892dfe09
diff --git a/scripts/installtests/build_release_assets_test.go b/scripts/installtests/build_release_assets_test.goindex d59b5c72af..b2bd1c8a45 100644--- a/scripts/installtests/build_release_assets_test.go+++ b/scripts/installtests/build_release_assets_test.go@@ -2476,6 +2476,15 @@ func TestReleasePipelinePromotesOneImmutableCandidate(t *testing.T) {convergenceWorkflow := string(convergenceBytes)recoveryWorkflow := string(recoveryBytes)leaseScript := string(leaseScriptBytes)+ for _, needle := range []string{+ `"repos/${GITHUB_REPOSITORY}/git/refs"`,+ `Bootstrapped absent customer-promotion lease ref`,+ `git push origin "${lock_commit}:${LOCK_REF}"`,+ } {+ if !strings.Contains(leaseScript, needle) {+ t.Fatalf("customer-promotion lease missing absent-ref bootstrap contract: %s", needle)+ }+ }createJob := workflowJobBlock(t, createWorkflow, "create_release")prepareJob := workflowJobBlock(t, createWorkflow, "prepare")frontendBundleJob := workflowJobBlock(t, createWorkflow, "frontend_bundle")diff --git a/scripts/release_control/customer_promotion_lease.sh b/scripts/release_control/customer_promotion_lease.shindex 1e694f4a64..4d1be8174a 100755--- a/scripts/release_control/customer_promotion_lease.sh+++ b/scripts/release_control/customer_promotion_lease.sh@@ -44,7 +44,25 @@ acquire() {local observed_shaobserved_sha="$(git ls-remote origin "${LOCK_REF}" | awk '{print $1}')"if [[ ! "${observed_sha}" =~ ^[0-9a-f]{40}$ ]]; then- echo "Customer-promotion lease changed while acquiring; retrying."+ # GitHub's Actions token can fast-forward this lease ref but may reject+ # creating it with git push. Seed the absent ref at the checked-out+ # release-control commit so every contender still has to win the normal+ # fast-forward push of its owner commit. A concurrent creator returning+ # 422 is harmless; the next loop observes whichever contender won.+ local bootstrap_sha+ bootstrap_sha="$(git rev-parse HEAD)"+ if jq -n \+ --arg ref "${LOCK_REF}" \+ --arg sha "${bootstrap_sha}" \+ '{ref: $ref, sha: $sha}' | \+ gh api \+ --method POST \+ "repos/${GITHUB_REPOSITORY}/git/refs" \+ --input - >/dev/null 2>&1; then+ echo "Bootstrapped absent customer-promotion lease ref at ${bootstrap_sha}."+ else+ echo "Customer-promotion lease changed while acquiring; retrying."+ fisleep 15continuefidiff --git a/scripts/release_control/release_promotion_policy_test.py b/scripts/release_control/release_promotion_policy_test.pyindex 409b4b8892..ac627c118c 100644--- a/scripts/release_control/release_promotion_policy_test.py+++ b/scripts/release_control/release_promotion_policy_test.py@@ -629,6 +629,8 @@ class ReleasePromotionPolicyTest(unittest.TestCase):self.assertIn("customer_promotion_lease.sh acquire", lease)self.assertIn("refs/heads/release-customer-promotion-lock", lease_script)self.assertIn("git push origin \"${lock_commit}:${LOCK_REF}\"", lease_script)+ self.assertIn('"repos/${GITHUB_REPOSITORY}/git/refs"', lease_script)+ self.assertIn("Bootstrapped absent customer-promotion lease ref", lease_script)self.assertIn("--force-with-lease=\"${LOCK_REF}:${observed_sha}\"", lease_script)self.assertIn("owner_status", lease_script)self.assertIn("sort -Vr", lease)