Skip to content

CI pipeline monitor label fixes#128501

Open
kg wants to merge 8 commits into
dotnet:mainfrom
kg:ci-pipeline-monitor-label-fixes
Open

CI pipeline monitor label fixes#128501
kg wants to merge 8 commits into
dotnet:mainfrom
kg:ci-pipeline-monitor-label-fixes

Conversation

@kg
Copy link
Copy Markdown
Member

@kg kg commented May 22, 2026

  • Ensure that when the CI pipeline monitor updater script generates a new issue, it applies blocking-clean-ci-optional
  • Ensure that during validation we check to make sure all assigned labels are real labels. In a previous run I had generating an issue fail because one of the labels was wrong.

cc @JulieLeeMSFT

Copilot AI review requested due to automatic review settings May 22, 2026 19:12
@github-actions github-actions Bot added the area-skills Agent Skills label May 22, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates the CI pipeline monitor GitHub-issue publishing flow to (1) always apply a default “blocking-clean-ci-optional” label when creating new issues, and (2) add a validation step that checks failure-suggested labels against the live set of labels in the dotnet/runtime repo.

Changes:

  • Add blocking-clean-ci-optional to gh issue create invocations for newly filed issues.
  • Add a validator step that fetches repo labels from the GitHub REST API and flags invalid failure labels before update_github.py runs.

Reviewed changes

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

File Description
.github/skills/ci-pipeline-monitor/scripts/validate_results.py Adds a new “validate labels exist in dotnet/runtime” check by querying the GitHub labels API.
.github/skills/ci-pipeline-monitor/scripts/update_github.py Adds blocking-clean-ci-optional label when creating a new GitHub issue via gh.

Comment thread .github/skills/ci-pipeline-monitor/scripts/validate_results.py Outdated
Comment thread .github/skills/ci-pipeline-monitor/scripts/validate_results.py Outdated
Comment thread .github/skills/ci-pipeline-monitor/scripts/validate_results.py Outdated
Comment thread .github/skills/ci-pipeline-monitor/scripts/validate_results.py
@kg
Copy link
Copy Markdown
Member Author

kg commented May 22, 2026

One problem with doing this is that the github REST API has a limit of 60 queries per hour. So running this script more than a few times will hit the rate limit, as I just have and no longer can test it until later on today.

kg added 2 commits May 22, 2026 12:23
…nt to use for fixes

Address copilot feedback
…s will succeed even if we hit a rate limit, as long as one validation run has succeeded
Copilot AI review requested due to automatic review settings May 22, 2026 19:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 5 comments.

import urllib.request

LABELS_API_ENDPOINT = "https://api.github.com/repos/dotnet/runtime/labels"
LABELS_CACHE_FILE = os.path.join(__file__, "..", "cached_labels.json")
Comment thread .github/skills/ci-pipeline-monitor/scripts/validate_results.py Outdated
Comment thread .github/skills/ci-pipeline-monitor/scripts/validate_results.py Outdated
Comment thread .github/skills/ci-pipeline-monitor/scripts/validate_results.py
Comment on lines 87 to 90
gh_issue_command.append("create")
gh_issue_command.append("--label")
gh_issue_command.append("blocking-clean-ci-optional")
creating_new_issue = True
Copilot AI review requested due to automatic review settings May 22, 2026 20:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 4 comments.

import urllib.request

LABELS_API_ENDPOINT = "https://api.github.com/repos/dotnet/runtime/labels"
LABELS_CACHE_FILE = os.path.join(__file__, "..", "cached_labels.json")
Comment thread .github/skills/ci-pipeline-monitor/scripts/validate_results.py
Comment on lines 93 to 98
if creating_new_issue:
for label in fail["labels"].split(','):
stripped_label = label.strip()
if stripped_label:
if stripped_label and (stripped_label != "blocking-clean-ci-optional"):
gh_issue_command.append('--label')
gh_issue_command.append(stripped_label)
Comment thread .github/skills/ci-pipeline-monitor/.gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants