ci(refactor-release): correlate publisher runs by release identifier - #12783
DariuszPorowski wants to merge 4 commits into
Conversation
5867aff to
5399f34
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves how Radius CI dispatches and monitors publishing workflows in the external azure-octo/radius-publisher repo by correlating runs via a stable release identifier (rather than a time window), enabling safe reuse of already-successful or currently-running publisher jobs and more reliable retries.
Changes:
- Reworked
.github/scripts/monitor-remote-workflow.mjsto (a) dispatch with arelease_identifierembedded in the payload, (b) find runs by exactdisplay_title, and (c) add bounded retry/backoff and a single end-to-end deadline. - Updated the release + publisher-dispatching workflows to pass
EVENT_TYPE,RELEASE_IDENTIFIER, and JSON-escapedCLIENT_PAYLOADinto the monitor script (and increased job timeouts accordingly). - Added hermetic Node.js tests for the dispatch/monitor protocol and wired them into
make test.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
build/test.mk |
Adds a Node.js unit test target and includes it in the test aggregate. |
.github/workflows/release.yaml |
Switches DE publishing to the correlated dispatch/monitor script using a stable identifier. |
.github/workflows/publish-de-image.yaml |
Switches the legacy DE image publishing bridge to the correlated dispatch/monitor script. |
.github/workflows/__build-bicep-types.yaml |
Switches Bicep types publishing to the correlated dispatch/monitor script and adds release metadata outputs. |
.github/scripts/monitor-remote-workflow.mjs |
Implements identifier-based correlation, retry/backoff, bounded history scan, and uncertain-dispatch reconciliation. |
.github/scripts/monitor-remote-workflow_test.mjs |
Adds Node.js tests for correlation behavior, retries, timeouts, and workflow caller wiring. |
Suppressed comments (1)
.github/scripts/monitor-remote-workflow.mjs:89
- If '+' is accepted in release identifiers (SemVer build metadata), the validation error message should mention it so failures are actionable.
if (!RELEASE_IDENTIFIER_PATTERN.test(releaseIdentifier)) {
throw new Error(
"Release identifier must contain 1-200 letters, numbers, dots, underscores, or hyphens",
);
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| /** @param {{ github: any, core: any }} param0 */ | ||
| export default async ({ github, core }) => { | ||
| const RELEASE_IDENTIFIER_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]{0,199}$/; |
8afdae9 to
7bfb276
Compare
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned Files
|
Unit Tests 2 files 459 suites 7m 9s ⏱️ Results for commit 33e4aa9. ♻️ This comment has been updated with latest results. |
7bfb276 to
2520e04
Compare
2520e04 to
b2b742a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dp/idempotent-tag-reconciliation #12783 +/- ##
=================================================================
Coverage 59.52% 59.52%
=================================================================
Files 772 772
Lines 45060 45060
=================================================================
+ Hits 26822 26823 +1
+ Misses 18238 18237 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
b2b742a to
da71854
Compare
da71854 to
60ce522
Compare
5e7b876 to
6893a16
Compare
6893a16 to
c7b68b3
Compare
79449df to
d9a62f3
Compare
d9a62f3 to
b7dd4c8
Compare
b7dd4c8 to
9956917
Compare
9956917 to
94e08d3
Compare
Query publisher runs by an exact version-and-source identifier before dispatching, then reuse successful or active work and retry failed work without changing App scopes. Add bounded transient API retries, caller wiring checks, and queue-aware timeout budgets. Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
Emit dispatch payload values with toJSON so an externally supplied image, tag, or ref cannot break out of the JSON it is placed in. Bound the correlated run lookup to a fixed page budget, reset per retry, so a long publisher history cannot cost an unbounded number of API calls. Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
Summary
This is PR 10 in GitHub stack #12738 and depends on #12770; see the GoReleaser release lifecycle implementation plan.
display_title, reusing successful or active work and retrying failed work under the same identifierCompanion dependency: azure-octo/radius-publisher#25 adds identifier-based
run-nameand concurrency groups and must merge before this PR.Reason for change
Time-window run discovery can select the wrong publisher run when releases overlap. Exact release identifiers make each source run monitor only its own remote work and let reruns reconcile completed or in-progress publication before dispatching again.
How to test
make test-monitor-remote-workflow(19 tests)actionlintandyamllinton the three modified workflowsghalint runon the three modified workflowsprettier --checkon the controller and testzizmor --pedantic --min-severity mediumon the three modified workflowsA live paired-dispatch exercise requires publisher PR #25 to be deployed first.
File change summary
.github/scripts/monitor-remote-workflow.mjs.github/scripts/monitor-remote-workflow_test.mjs.github/workflows/__build-bicep-types.yaml.github/workflows/publish-de-image.yaml.github/workflows/release.yamlbuild/test.mkeng/design-notes/tools/2026-09-goreleaser-stack-review/pr-10-release-identifier-correlation.md