Skip to content

ci: Notify the Go SDK validation failure and fix the release failure handler - #1550

Draft
lantoli wants to merge 2 commits into
mainfrom
CLOUDP-458828-sdk-validation-notification
Draft

lantoli wants to merge 2 commits into
mainfrom
CLOUDP-458828-sdk-validation-notification

Conversation

@lantoli

@lantoli lantoli commented Oct 14, 2026

Copy link
Copy Markdown
Member

Proposed changes

Jira ticket: CLOUDP-458828

Adds a Slack notification to @apix-devops-integrations-help in #cloud-apix-devops-integrations-notifications when the go-sdk-validation step fails during an OpenAPI spec release, and fixes the release failure handler's duplicate-issue detection.

Notification:

  • New Notify the Go SDK validation failure step in required-spec-validations.yml, keyed to steps.go-sdk-validation.outcome == 'failure'. A failure in an earlier setup step (Node, npm, artifact download, Spectral, Go, SDK checkout) leaves that outcome empty, so setup failures do not notify.
  • Runs only on the first attempt after the automatic retries are exhausted (github.run_attempt == 3, the release retry cap in release-spec.yml), so the extra reruns the retry handler already queued do not duplicate the alert.
  • New .github/scripts/notify_sdk_validation_failure.sh posts the environment, the run URL, and the help usergroup mention. It reports delivery failures and the case where the bot is not in the channel.
  • The existing SLACK_BEARER_TOKEN secret is threaded explicitly through release-spec-runner.yml to release-spec.yml to required-spec-validations.yml.

Failure handler:

  • Corrected the duplicate-issue query: (${TARGET_ENV}}) became (${TARGET_ENV}).
  • Replaced return 0 / return 1 with exit 0 / exit 1. A run: step cannot return, so the step exited 2 and failed the job whenever an open failed-release issue already existed. That is what failed the handler on attempt 4 of run 36420941422.

Notes:

  • The channel ID and usergroup ID are not sensitive, so they are inline; only the repository owner can manage repository secrets. They can move to a secret or variable if preferred.
  • The bot must be a member of the notifications channel, and the usergroup mention must resolve.
  • Verified locally: actionlint passes on the changed workflows and the new script parses with bash -n. ShellCheck is not installed locally; the shellcheck workflow will lint the new script.

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works

Changes to Spectral

  • I have read the README file for Spectral Updates

Further comments

Post a Slack message to the APIx DevOps Integrations help usergroup when the go-sdk-validation step fails during an OpenAPI spec release. The step is keyed to steps.go-sdk-validation.outcome, so a failure in an earlier setup step does not notify, and it runs once per incident after the automatic release retries are exhausted.
Correct the duplicate-issue query (an extra brace after the environment made it (dev}) instead of (dev)) and replace the top-level return statements with exit. A run step cannot return, so the step exited 2 and failed the job whenever an open failed-release issue already existed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant