Skip to content

Keep PR dashboard webhook updates scoped to one pull request#139

Open
trask wants to merge 4 commits into
open-telemetry:mainfrom
trask:fix/targeted-status-delivery
Open

Keep PR dashboard webhook updates scoped to one pull request#139
trask wants to merge 4 commits into
open-telemetry:mainfrom
trask:fix/targeted-status-delivery

Conversation

@trask

@trask trask commented Jul 22, 2026

Copy link
Copy Markdown
Member

Keep webhook-triggered dashboard updates focused on the pull request that changed instead of allowing each event to start or continue repository-wide status-comment delivery. This avoids multiplying long-running jobs and overwhelming GitHub Actions when many pull requests change at once or a dashboard comment format change must be applied to every open pull request. The hourly dashboard run remains the bounded path for repository-wide rollout and recovery.

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

Separates targeted webhook delivery from repository-wide status-comment rollouts while retaining bulk backfill behavior.

Changes:

  • Adds targeted PR delivery through the workflow and delivery CLI.
  • Limits targeted status-comment and Slack processing to the triggering PR.
  • Adds regression tests for targeted delivery and state preservation.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/pull-request-dashboard-repo.yml Passes the target PR to delivery.
.github/scripts/pull-request-dashboard/delivery.py Adds targeted delivery routing.
.github/scripts/pull-request-dashboard/pr_status_comment.py Drains only the targeted comment update.
.github/scripts/pull-request-dashboard/notify_slack.py Merges targeted notification state.
.github/scripts/pull-request-dashboard/test_delivery.py Tests targeted orchestration.
.github/scripts/pull-request-dashboard/test_pr_status_comment.py Tests targeted rollout behavior.
.github/scripts/pull-request-dashboard/test_notify_slack.py Tests preservation of unrelated history.

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

Comment thread .github/scripts/pull-request-dashboard/notify_slack.py Outdated
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Jul 22, 2026

Copy link
Copy Markdown

Pull request dashboard status

Status last refreshed: 2026-07-25 23:59:53 UTC.

  • Waiting on: Maintainers
  • Next step: Merge when ready.

This automated status or its linked feedback items may be incorrect. If something looks wrong, please report it with the result you expected.

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 7 out of 7 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

.github/scripts/pull-request-dashboard/notify_slack.py:73

  • When notification state is uninitialized, last_notification_state is None, so the branch that defines target_pr_keys is skipped. The targeted merge below then raises UnboundLocalError instead of preserving the bootstrap behavior; the new uninitialized-state test will fail. Define the key set for every targeted call and only guard the filtering on the state being non-None.
    if target_pr_numbers is not None:

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 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread .github/scripts/pull-request-dashboard/pr_status_comment.py
Comment thread .github/scripts/pull-request-dashboard/notify_slack.py

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 8 out of 8 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

.github/scripts/pull-request-dashboard/notify_slack.py:67

  • When notification state is uninitialized, last_notification_state is None, so this branch never assigns target_pr_keys; the targeted merge below then raises UnboundLocalError instead of preserving the bootstrap sentinel. Define the target keys whenever targeted delivery is requested, and only guard the filtering on the state being non-None. This also makes the newly added bootstrap regression test pass.
    if target_pr_numbers is not None and last_notification_state is not None:
        target_pr_keys = {str(number) for number in target_pr_numbers}
        last_notification_state = {
            str(number): notification
            for number, notification in last_notification_state.items()
            if str(number) in target_pr_keys
        }

@trask
trask marked this pull request as ready for review July 22, 2026 21:10
@trask
trask requested a review from a team as a code owner July 22, 2026 21:10
@trask
trask requested a review from maryliag July 22, 2026 21:10
@trask trask changed the title Separate targeted status comment delivery Keep PR dashboard webhook updates scoped to one pull request Jul 22, 2026
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