CI pipeline monitor label fixes#128501
Open
kg wants to merge 8 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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-optionaltogh issue createinvocations 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.pyruns.
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. |
Member
Author
|
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. |
…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
| 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 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 |
| 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 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cc @JulieLeeMSFT