Skip to content

Skip resolve-targets for targeted dashboard refreshes - #168

Merged
trask merged 1 commit into
open-telemetry:mainfrom
trask:dashboard-skip-resolve-targets-for-targeted-runs
Jul 30, 2026
Merged

Skip resolve-targets for targeted dashboard refreshes#168
trask merged 1 commit into
open-telemetry:mainfrom
trask:dashboard-skip-resolve-targets-for-targeted-runs

Conversation

@trask

@trask trask commented Jul 28, 2026

Copy link
Copy Markdown
Member

Webhook refreshes already know their single target repository and pull request, yet every one of them pays for a separate resolve-targets job whose real work takes about ten seconds. Measured on 2026-07-28, that job waited a median of 2.8 min (p90 6.1 min) just to acquire a runner, so it is a large share of end-to-end refresh latency on the highest volume path.

Targeted runs now call the reusable per-repository workflow directly. To make that possible, pull-request-dashboard-repo.yml resolves its own entry from repositories.json instead of receiving eight configuration values as inputs, and it also takes over the pull request number validation and the initial-backfill precondition that resolve-targets used to perform. resolve-targets remains for backfills, where a matrix genuinely has to be resolved up front, and now emits only repository names.

A repository is now identified by its bare repositories.json name everywhere. This matters because the reusable workflow's update-dashboard and publish-dashboard concurrency groups are evaluated before any step runs, so they can only key off the raw input, while the state branch, cache keys and app token scope use the resolved entry. A second accepted spelling would place two dispatches for the same repository in different concurrency groups while both wrote the same state branch. The open-telemetry/-prefixed form that resolve-targets has accepted since #2 is therefore dropped rather than propagated: the webhook bridge splits full_name and dispatches the short name, and the dispatch contract in WEBHOOK_SETUP.md has always specified the short name, so nothing was sending it.

Verified locally that an empty input still selects all 17 configured repositories, that each configured name resolves to the same values previously passed as inputs, and that a prefixed name and an unconfigured name both fail.

One deliberate behavior change: trigger_event is validated only on the backfill path now, since targeted runs no longer pass through resolve-targets. The Netlify webhook bridge already drops unknown event names before it dispatches anything, so the only remaining source of an arbitrary value is a manual workflow_dispatch, where the value is used solely to build the concurrency group string and never reaches a shell. repository and pr_number are still validated on both paths. The dispatch contract in WEBHOOK_SETUP.md claimed the central workflow validates every documented input, so it is updated to say which ones.

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

Routes targeted dashboard refreshes directly to the per-repository workflow, reducing webhook latency while preserving matrix resolution for backfills.

Changes:

  • Bypasses resolve-targets for targeted refreshes.
  • Moves repository configuration, PR validation, and backfill checks into the reusable workflow.
  • Normalizes repository names for tokens, state processing, and cache keys.

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.yml Separates targeted refreshes from matrix-based backfills.
.github/workflows/pull-request-dashboard-repo.yml Resolves repository configuration and validates targeted runs locally.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Jul 28, 2026

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-07-30 19:23 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@trask
trask force-pushed the dashboard-skip-resolve-targets-for-targeted-runs branch from befa1fb to 84251b3 Compare July 30, 2026 15:23
@trask
trask requested a review from Copilot July 30, 2026 15:24

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

.github/workflows/pull-request-dashboard.yml:118

  • The reusable workflow builds both its update and publish concurrency groups from the raw inputs.repository, while its state branch and cache keys now use the normalized name. Because this call accepts both repo and open-telemetry/repo, equivalent targeted dispatches can enter different concurrency groups and no longer coalesce even though they operate on the same repository state. Normalize the repository before every concurrency key, or reject the prefixed form at this boundary.
      repository: ${{ inputs.repository }}

@trask
trask force-pushed the dashboard-skip-resolve-targets-for-targeted-runs branch from 84251b3 to c2f9629 Compare July 30, 2026 15:47
@trask
trask requested a review from Copilot July 30, 2026 15:47

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@trask
trask force-pushed the dashboard-skip-resolve-targets-for-targeted-runs branch from c2f9629 to f8c7f4c Compare July 30, 2026 15:56
@trask
trask requested a review from Copilot July 30, 2026 15:57

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

.github/workflows/pull-request-dashboard.yml:112

  • Targeted dispatches now bypass Resolve trigger inputs, so trigger_event is no longer validated on this path. This leaves the dispatch contract in .github/scripts/pull-request-dashboard/WEBHOOK_SETUP.md:167 inaccurate because it still states that the central workflow validates all documented inputs. Please update that contract to describe the targeted-path exception (or retain validation elsewhere).
    if: inputs.repository != '' && inputs.pr_number != ''

@trask
trask force-pushed the dashboard-skip-resolve-targets-for-targeted-runs branch from f8c7f4c to 57cc760 Compare July 30, 2026 17:03
@trask
trask requested a review from Copilot July 30, 2026 17:03

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@trask
trask marked this pull request as ready for review July 30, 2026 17:23
@trask
trask requested a review from a team as a code owner July 30, 2026 17:23
@trask
trask requested a review from mx-psi July 30, 2026 17:23
@trask
trask merged commit c48a0e1 into open-telemetry:main Jul 30, 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