ci(refactor-release): correlate publisher runs by release identifier - #12783
ci(refactor-release): correlate publisher runs by release identifier#12783DariuszPorowski wants to merge 2 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}$/; |
| pagesRead >= MAX_LOOKUP_PAGES || | ||
| (matched && page.length === 0) | ||
| ) { | ||
| done(); | ||
| } |
8afdae9 to
7bfb276
Compare
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned Files
|
Unit Tests 2 files 461 suites 8m 48s ⏱️ Results for commit 60ce522. ♻️ This comment has been updated with latest results. |
Functional Tests - upgrade-noncloud1 tests 0 ✅ 5m 5s ⏱️ For more details on these failures, see this check. Results for commit 60ce522. ♻️ 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.82%
===================================================================
Files ? 779
Lines ? 46058
Branches ? 0
===================================================================
Hits ? 27552
Misses ? 18506
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
b2b742a to
da71854
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>
da71854 to
60ce522
Compare
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
Functional Tests - corerp-noncloud190 tests 186 ✅ 1h 9m 10s ⏱️ For more details on these failures, see this check. Results for commit 60ce522. |
Summary
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(13 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.mk