Skip to content

Use per-repo PR dashboard state branches#53

Merged
trask merged 1 commit into
open-telemetry:mainfrom
trask:pr-dashboard-per-repo-state-branches
Jul 8, 2026
Merged

Use per-repo PR dashboard state branches#53
trask merged 1 commit into
open-telemetry:mainfrom
trask:pr-dashboard-per-repo-state-branches

Conversation

@trask

@trask trask commented Jul 8, 2026

Copy link
Copy Markdown
Member

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:

  1. Delete the old flat state branch: git push upstream --delete otelbot/pull-request-dashboard-state.
  2. Trigger an unfiltered manual Pull request dashboard backfill with empty repository and empty pr_number.
  3. Let that backfill bootstrap the new per-repo state branches.

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_BRANCHDASHBOARD_STATE_BRANCH_PREFIX and construct ${PREFIX}/${REPO_NAME} in all three jobs (also added set -euo pipefail to the publish step).
  • Updated RATIONALE.md to 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 with dashboard.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.

@trask trask marked this pull request as ready for review July 8, 2026 17:32
@trask trask requested a review from a team as a code owner July 8, 2026 17:33
@trask trask merged commit ea1f81a into open-telemetry:main Jul 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants