Cleaned up trigger_cd payload to send artifact identity only#26721
Cleaned up trigger_cd payload to send artifact identity only#26721
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis pull request modifies the continuous integration workflow in 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #26721 +/- ##
=======================================
Coverage 73.24% 73.24%
=======================================
Files 1534 1534
Lines 120760 120760
Branches 14610 14610
=======================================
Hits 88445 88445
+ Misses 31300 31284 -16
- Partials 1015 1031 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ref https://linear.app/ghost/project/ghost-cicd-e70bca221364 The trigger_cd dispatch was sending deployment policy fields (dry_run, should_rollout, environment) alongside artifact identity, which meant Ghost CI was dictating how Moya should deploy. This made it impossible to change deployment defaults without modifying Ghost. Stripped the payload to identity fields only (sha, ref, image_tag, pr_number, admin artifact IDs). Added a `deploy` flag that signals when the deploy-to-staging label is present — this is a fact about the PR, not a policy decision. Moya derives dry_run and should_rollout from pr_number presence and the deploy flag.
5800a0f to
c693d5c
Compare
The trigger_cd dispatch was sending deployment policy fields (
dry_run,should_rollout,environment) alongside artifact identity. This meant Ghost CI was dictating how Moya should deploy — making it impossible to change deployment defaults without pushing a change to the public Ghost repo.This strips the payload down to artifact identity and a single fact flag. The new payload sends:
ref(commit SHA),pr_number,deploy(whether deploy-to-staging label is present),admin_artifact_id, andadmin_artifact_run_id. The previoussha,image_tag,dry_run,should_rollout, andenvironmentfields are all removed — Moya now derives everything it needs fromref,pr_number, anddeploy.The
deployflag replaces the old dry_run/should_rollout booleans. It's a fact about the PR (the deploy-to-staging label is set and the user is authorized), not a policy decision. Moya interprets it: PR builds without the flag are dry runs, main merges publish and rollout to all sites, and the deploy flag triggers publish + rollout to a fixed set of test sites.Companion PR in Ghost-Moya (TryGhost/Ghost-Moya#177) updates the orchestrator to interpret the new payload shape. The Moya change is backwards-compatible — it handles both old and new payloads during the transition, so this can be merged second without coordination issues.