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
Fix release validation draft metadata preservation
rcourtman54378a14e504
diff --git a/.github/workflows/validate-release-assets.yml b/.github/workflows/validate-release-assets.ymlindex 828ac63cb8..fb1fd0f522 100644--- a/.github/workflows/validate-release-assets.yml+++ b/.github/workflows/validate-release-assets.yml@@ -305,11 +305,26 @@ jobs:$CURRENT_BODY"- curl -X PATCH \+ RELEASE_JSON=$(curl --fail-with-body --silent --show-error -X PATCH \-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \-H "Accept: application/vnd.github+json" \"https://api.github.com/repos/${{ github.repository }}/releases/${{ steps.context.outputs.release_id }}" \- -d "$(jq -n --arg body "$NEW_BODY" '{body: $body}')"+ -d "$(jq -n \+ --arg body "$NEW_BODY" \+ --arg tag "${{ steps.context.outputs.tag }}" \+ --arg target_commitish "${{ steps.context.outputs.target_commitish }}" \+ '{body: $body, tag_name: $tag, target_commitish: $target_commitish}')")++ ACTUAL_RELEASE_TAG=$(echo "$RELEASE_JSON" | jq -r '.tag_name // empty')+ ACTUAL_TARGET_COMMITISH=$(echo "$RELEASE_JSON" | jq -r '.target_commitish // empty')+ if [ "$ACTUAL_RELEASE_TAG" != "${{ steps.context.outputs.tag }}" ]; then+ echo "::error::Validation release body update detached release tag ${ACTUAL_RELEASE_TAG}; expected ${{ steps.context.outputs.tag }}."+ exit 1+ fi+ if [ "$ACTUAL_TARGET_COMMITISH" != "${{ steps.context.outputs.target_commitish }}" ]; then+ echo "::error::Validation release body update changed target_commitish ${ACTUAL_TARGET_COMMITISH}; expected ${{ steps.context.outputs.target_commitish }}."+ exit 1+ fi- name: Set commit status - Failureif: steps.context.outputs.should_run == 'true' && (failure() || steps.validate.outputs.validation_passed == 'false')@@ -333,11 +348,24 @@ jobs:INITIAL_STATE="${{ steps.context.outputs.draft }}"if [ "$INITIAL_STATE" != "true" ]; thenecho "Release was published; reverting to draft before deleting assets..."- curl -X PATCH \+ RELEASE_JSON=$(curl --fail-with-body --silent --show-error -X PATCH \-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \-H "Accept: application/vnd.github+json" \"https://api.github.com/repos/${{ github.repository }}/releases/${{ steps.context.outputs.release_id }}" \- -d '{"draft": true}'+ -d "$(jq -n \+ --arg tag "${{ steps.context.outputs.tag }}" \+ --arg target_commitish "${{ steps.context.outputs.target_commitish }}" \+ '{draft: true, tag_name: $tag, target_commitish: $target_commitish}')")+ ACTUAL_RELEASE_TAG=$(echo "$RELEASE_JSON" | jq -r '.tag_name // empty')+ ACTUAL_TARGET_COMMITISH=$(echo "$RELEASE_JSON" | jq -r '.target_commitish // empty')+ if [ "$ACTUAL_RELEASE_TAG" != "${{ steps.context.outputs.tag }}" ]; then+ echo "::error::Validation failure draft update detached release tag ${ACTUAL_RELEASE_TAG}; expected ${{ steps.context.outputs.tag }}."+ exit 1+ fi+ if [ "$ACTUAL_TARGET_COMMITISH" != "${{ steps.context.outputs.target_commitish }}" ]; then+ echo "::error::Validation failure draft update changed target_commitish ${ACTUAL_TARGET_COMMITISH}; expected ${{ steps.context.outputs.target_commitish }}."+ exit 1+ fiecho "Release marked as draft to block downloads during remediation."sleep 5fi@@ -434,11 +462,26 @@ jobs:$CURRENT_BODY"- curl -X PATCH \+ RELEASE_JSON=$(curl --fail-with-body --silent --show-error -X PATCH \-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \-H "Accept: application/vnd.github+json" \"https://api.github.com/repos/${{ github.repository }}/releases/${{ steps.context.outputs.release_id }}" \- -d "$(jq -n --arg body "$NEW_BODY" '{body: $body}')"+ -d "$(jq -n \+ --arg body "$NEW_BODY" \+ --arg tag "${{ steps.context.outputs.tag }}" \+ --arg target_commitish "${{ steps.context.outputs.target_commitish }}" \+ '{body: $body, tag_name: $tag, target_commitish: $target_commitish}')")++ ACTUAL_RELEASE_TAG=$(echo "$RELEASE_JSON" | jq -r '.tag_name // empty')+ ACTUAL_TARGET_COMMITISH=$(echo "$RELEASE_JSON" | jq -r '.target_commitish // empty')+ if [ "$ACTUAL_RELEASE_TAG" != "${{ steps.context.outputs.tag }}" ]; then+ echo "::error::Validation failure body update detached release tag ${ACTUAL_RELEASE_TAG}; expected ${{ steps.context.outputs.tag }}."+ exit 1+ fi+ if [ "$ACTUAL_TARGET_COMMITISH" != "${{ steps.context.outputs.target_commitish }}" ]; then+ echo "::error::Validation failure body update changed target_commitish ${ACTUAL_TARGET_COMMITISH}; expected ${{ steps.context.outputs.target_commitish }}."+ exit 1+ fi- name: Fail the workflowif: steps.context.outputs.should_run == 'true' && (failure() || steps.validate.outputs.validation_passed == 'false')diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.mdindex 7866e686f6..994ffc5381 100644--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md@@ -450,6 +450,12 @@ That same reusable-validation call boundary also owns permission handoff.`.github/workflows/validate-release-assets.yml` call the write scopes itrequests (`contents: write` and `issues: write`), rather than inheriting therelease pipeline's top-level read-only default and failing at workflow startup.+That same validation status boundary must preserve release identity when it+annotates a draft or failed release. Every release-body or draft-state PATCH+from `.github/workflows/validate-release-assets.yml` must carry the intended+`tag_name` and `target_commitish`, then verify the API response still matches+those values, so validation status updates cannot detach a draft release back+onto GitHub's generated `untagged-*` placeholder.That same governed release boundary also owns unpublished draft retryreconciliation. Re-running `.github/workflows/create-release.yml` for the sameunpublished tag must locate the existing draft release, retarget its git tagdiff --git a/scripts/installtests/build_release_assets_test.go b/scripts/installtests/build_release_assets_test.goindex 6bf7e0494b..431ac7bc2e 100644--- a/scripts/installtests/build_release_assets_test.go+++ b/scripts/installtests/build_release_assets_test.go@@ -165,6 +165,12 @@ func TestCreateReleaseUploadsPowerShellInstaller(t *testing.T) {`statuses: write`,`curl --fail-with-body --silent --show-error -X POST`,`"context": "Release Asset Validation"`,+ `--arg tag "${{ steps.context.outputs.tag }}"`,+ `--arg target_commitish "${{ steps.context.outputs.target_commitish }}"`,+ `{body: $body, tag_name: $tag, target_commitish: $target_commitish}`,+ `{draft: true, tag_name: $tag, target_commitish: $target_commitish}`,+ `Validation release body update detached release tag`,+ `Validation release body update changed target_commitish`,}for _, needle := range validationRequired {if !strings.Contains(validationWorkflow, needle) {diff --git a/scripts/release_control/release_promotion_policy_test.py b/scripts/release_control/release_promotion_policy_test.pyindex 6bd872ade5..a6ea7227e4 100644--- a/scripts/release_control/release_promotion_policy_test.py+++ b/scripts/release_control/release_promotion_policy_test.py@@ -384,6 +384,12 @@ class ReleasePromotionPolicyTest(unittest.TestCase):self.assertIn("statuses: write", validation_workflow)self.assertIn("curl --fail-with-body --silent --show-error -X POST", validation_workflow)self.assertIn('"context": "Release Asset Validation"', validation_workflow)+ self.assertIn('--arg tag "${{ steps.context.outputs.tag }}"', validation_workflow)+ self.assertIn('--arg target_commitish "${{ steps.context.outputs.target_commitish }}"', validation_workflow)+ self.assertIn("{body: $body, tag_name: $tag, target_commitish: $target_commitish}", validation_workflow)+ self.assertIn("{draft: true, tag_name: $tag, target_commitish: $target_commitish}", validation_workflow)+ self.assertIn("Validation release body update detached release tag", validation_workflow)+ self.assertIn("Validation release body update changed target_commitish", validation_workflow)self.assertIn('ACTUAL_RELEASE_TAG=$(echo "$RELEASE_JSON" | jq -r \'.tag_name // empty\')', content)self.assertIn('ACTUAL_TARGET_COMMITISH=$(echo "$RELEASE_JSON" | jq -r \'.target_commitish // empty\')',