Use per-repo PR dashboard state branches#53
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the pull-request dashboard from a single shared git state branch to per-target-repository state branches at otelbot/pull-request-dashboard-state/<repository>. The goal is to stop unrelated repositories from contending on the same git ref during scheduled and webhook-driven runs, while preserving the existing same-repository --force-with-lease compare-and-swap behavior. The change is mechanical: the update-dashboard, notify-slack, and publish-dashboard jobs each derive their state branch from a new prefix env var plus REPO_NAME, and the RATIONALE.md design notes are updated to match.
Changes:
- Renamed the workflow env var
DASHBOARD_STATE_BRANCH→DASHBOARD_STATE_BRANCH_PREFIXand construct${PREFIX}/${REPO_NAME}in all three jobs (also addedset -euo pipefailto the publish step). - Updated
RATIONALE.mdto document per-repo state branches, same-repository CAS scope, and the "missing branch bootstrapped by next non-PR backfill / targeted PR runs skip" behavior (consistent withdashboard.py:1127).
Note: pull-request-dashboard/README.md (lines 100–101) still describes a single "shared state branch configured by DASHBOARD_STATE_BRANCH", which is now stale after this rename. That file is outside this PR's diff, so it can't be flagged with an inline comment, but it should be updated as part of this migration to stay consistent with RATIONALE.md. The migration also has an ordering dependency (the old flat branch must be deleted before per-repo branches can be created, due to a git directory/file ref conflict) which is correctly captured in the PR description.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/pull-request-dashboard-repo.yml |
Renames the state-branch env var to a prefix and builds a per-repo --state-branch for the update, notify, and publish jobs; adds set -euo pipefail to the publish step. |
.github/scripts/pull-request-dashboard/RATIONALE.md |
Updates design rationale to describe per-repository state branches, same-repository CAS scope, and missing-branch bootstrap/skip behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Use per-target-repository dashboard state branches under
otelbot/pull-request-dashboard-state/<repository>for update, notification, and publish jobs. This keeps unrelated repositories from contending on the same git ref while preserving the existing same-repository CAS behavior.Migration after merge:
git push upstream --delete otelbot/pull-request-dashboard-state.Pull request dashboardbackfill with emptyrepositoryand emptypr_number.Until that backfill initializes a repository branch, targeted webhook refreshes for that repository may skip or fail publish because initial dashboard state is not present yet.