From 70092b432ec8c18e8fcacd72dc3f1c0dc197d147 Mon Sep 17 00:00:00 2001 From: Nico Alba Date: Thu, 28 May 2026 00:19:23 +0000 Subject: [PATCH 1/3] fix drift alert: add schedule field to event JSON to prevent KeyError in mattermost action The action routes to addPushDetails() when no schedule field is present, then crashes on the missing 'forced' key. Mirroring the notify-mattermost job's pattern fixes the routing. Co-Authored-By: Claude Sonnet 4.6 --- unified-doc/scripts/build-drift-alert-context.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/unified-doc/scripts/build-drift-alert-context.sh b/unified-doc/scripts/build-drift-alert-context.sh index 4f190d8..bf7b7a2 100755 --- a/unified-doc/scripts/build-drift-alert-context.sh +++ b/unified-doc/scripts/build-drift-alert-context.sh @@ -44,6 +44,7 @@ EVENT_JSON=$(jq -cn \ avatar_url: "https://raw.githubusercontent.com/netfoundry/branding/refs/heads/main/images/png/icon/netfoundry-icon-color.png" }, action: $action, + schedule: "0 2 * * *", run_url: $run_url }') From 7b41d9dece2e7a5d20d068a4445e0ee82d66531d Mon Sep 17 00:00:00 2001 From: Nico Alba Date: Thu, 28 May 2026 00:19:23 +0000 Subject: [PATCH 2/3] fix drift alert: restrict send-drift-alert step to schedule events only The action reads GITHUB_EVENT_NAME from the environment to route event handling. On push-triggered builds it calls addPushDetails(), which requires push-specific fields (forced, commits, ref, compare) that our custom drift-context JSON does not provide. Push failures are visible to the pusher in CI; the unattended nightly schedule is what needs the alert. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a14a31b..dab8f95 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -155,7 +155,7 @@ jobs: run: unified-doc/scripts/build-drift-alert-context.sh "$GITHUB_REPOSITORY" "$GITHUB_RUN_ID" "$GITHUB_OUTPUT" - name: Send drift alert - if: failure() && steps.drift-ctx.outputs.has_drift == 'true' + if: failure() && steps.drift-ctx.outputs.has_drift == 'true' && github.event_name == 'schedule' uses: openziti/ziti-mattermost-action-py@v1 with: zitiId: ${{ secrets.ZITI_MATTERMOST_IDENTITY }} From 83cb2623e49d0db8aed13493f1dff643811bc2a8 Mon Sep 17 00:00:00 2001 From: Nico Alba Date: Thu, 28 May 2026 00:36:01 +0000 Subject: [PATCH 3/3] remove spurious schedule field from drift alert context Left over from an earlier wrong fix attempt. Co-Authored-By: Claude Sonnet 4.6 --- unified-doc/scripts/build-drift-alert-context.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/unified-doc/scripts/build-drift-alert-context.sh b/unified-doc/scripts/build-drift-alert-context.sh index bf7b7a2..4f190d8 100755 --- a/unified-doc/scripts/build-drift-alert-context.sh +++ b/unified-doc/scripts/build-drift-alert-context.sh @@ -44,7 +44,6 @@ EVENT_JSON=$(jq -cn \ avatar_url: "https://raw.githubusercontent.com/netfoundry/branding/refs/heads/main/images/png/icon/netfoundry-icon-color.png" }, action: $action, - schedule: "0 2 * * *", run_url: $run_url }')