Move pull request dashboard rendering to publish#58
Conversation
There was a problem hiding this comment.
Pull request overview
This PR restructures the pull-request-dashboard workflow so that markdown rendering happens in the publish-dashboard job rather than in the state-update jobs. State-update jobs now push only structured state (dashboard-state.json), while the publish job re-derives the issue body from accepted state plus the target repository's current open PR list. This makes state-branch compare-and-swap (CAS) retries cheaper: targeted PR retries reuse the already-computed PR result and only re-run the latest-state merge and save, instead of re-rendering the whole dashboard.
Changes:
- Moved rendering (
render_pr_tables,dashboard_markdown_pathwriting, and theLARGE_REPO_MAX_ROWS_PER_SECTION/--large-repopreset) out ofdashboard.pyintopublish_dashboard.py's newrender_dashboard_markdown. - Refactored
dashboard.pyupdate paths to save state only, splitting the oldrender_and_save_dashboardintosave_dashboard_update_state+reject_failed_dashboard_result, and hoisting the expensive targeted-PR computation out of the CAS retry loop (build_targeted_dashboard_update/apply_targeted_dashboard_update). - Updated the workflow:
--large-repoandpermission-pull-requests: readmoved to the publish job, and the publish job'scancel-in-progressset totrueso newer publishes supersede older ones.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/pull-request-dashboard-repo.yml |
Moves --large-repo to publish, adds permission-pull-requests: read for PR listing at publish, sets publish cancel-in-progress: true. |
.github/scripts/pull-request-dashboard/publish_dashboard.py |
Adds render_dashboard_markdown and --large-repo; publish now renders from accepted state + open PRs before editing the issue. |
.github/scripts/pull-request-dashboard/dashboard.py |
Removes in-update rendering; refactors save/failure logic and moves targeted-PR computation outside the CAS retry loop. |
.github/scripts/pull-request-dashboard/RATIONALE.md |
Documents the render-at-publish model and cheaper CAS retry semantics. |
I reviewed the refactor closely, including the equivalence of the new reject_failed_dashboard_result (trigger-only) check versus the previous all-results check, the preserved draft/closed-PR removal behavior via merge_dashboard_update_with_latest_state, the removal of now-unused imports/parameters, and the new concurrency semantics. I did not find blocking correctness issues, and there are no automated Python tests in this directory, so no test-coverage feedback applies. However, the change alters production workflow concurrency behavior (cancel-in-progress: true) and non-trivial CAS retry/state-management control flow across coordinated jobs, which is operationally sensitive and warrants human verification.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Addressing some sporadic failures, e.g. https://github.com/open-telemetry/shared-workflows/actions/runs/28976742994/job/85990708996
Move pull request dashboard markdown rendering out of state update jobs and into the publish job. Dashboard updates now push structured state only, while publishing renders from accepted dashboard state plus the current open PR list, reducing targeted refresh work under state-branch CAS retries.