ci: fix platform-api cloud-release webhook trigger and signature - #3313
Conversation
The Azure DevOps Incoming WebHook service connection reads the HMAC signature from the `x-webhook-checksum` header and expects the bare hex digest, not GitHub's `X-Hub-Signature: sha1=<hex>` format. The mismatched header name caused the webhook to reject requests with `RequiredHeaderSignatureNotFound` (HTTP 500). Send the checksum under the correct header and drop the `sha1=` prefix so Azure can verify the payload. Signed-off-by: Renuka Fernando <renukapiyumal@gmail.com>
Switch the Platform API cloud-release trigger from `pull_request: [closed]` to `push` on the release branches. A pull_request run for a PR opened from a fork gets no repository secrets, so merges of fork PRs failed with the webhook secrets unset. A push (which a merge produces) runs with full secret access and executes the workflow version on the pushed branch. Drop the now-unneeded merged-PR `if:` guard and the pull_request-specific BRANCH/COMMIT expressions in favour of github.ref_name / github.sha. Signed-off-by: Renuka Fernando <renukapiyumal@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe release workflow now runs on pushes to ChangesRelease workflow delivery
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized workflow change updates the cloud-release trigger and webhook signature handling; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Description checkExplanation The description explains the purpose, implementation approach, related issues and PRs, validation steps, and key security information. It omits or only partially covers several template sections, including Goals, User stories, Documentation, FindSecurityBugs verification, Samples, and Test environment, but the core information is complete for this CI-only change. Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Purpose
Bring the
Platform API Cloud Releaseworkflow fixes already landed on (or in flight for)platform-api/v0.10.xover tomain, so a merge intomaintriggers the Azure DevOps build correctly. The workflow header comment requires this file to stay identical across the release branches it lists. Onmaintoday it still has two problems:x-webhook-checksumheader and expects the bare hex digest, but the workflow sent GitHub'sX-Hub-Signature: sha1=<hex>, so Azure rejected requests withRequiredHeaderSignatureNotFound(HTTP 500).pull_request: [closed]trigger gives no repository secrets to runs for PRs opened from forks, so those merges failed the pre-flight secret check.Approach
x-webhook-checksumheader and drop thesha1=prefix (bare hex digest).pull_request: [closed]topushon the release branches (main,platform-api/v0.10.x); a merge produces a push, which runs with full secret access and executes the workflow version on the pushed branch.if:guard and replace thepull_request-specificBRANCH/COMMITexpressions withgithub.ref_name/github.sha.Related Issues
N/A
Related PRs
platform-api/v0.10.x)platform-api/v0.10.x)Automation tests
N/A — CI workflow change only. Verified against the Azure DevOps webhook with a manual
curlmatching the header/checksum format, and via a manualworkflow_dispatchrun.Security checks
secrets.AZURE_WEBHOOK_SECRET.Checklist