-
Notifications
You must be signed in to change notification settings - Fork 142
Add duplicate issue cleanup to CI failure doctor workflow #14396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -32,6 +32,7 @@ safe-outputs: | |||||||||
| title-prefix: "[CI Failure Doctor] " | ||||||||||
| labels: [cookie] | ||||||||||
| add-comment: | ||||||||||
| update-issue: | ||||||||||
| noop: | ||||||||||
| messages: | ||||||||||
| footer: "> 🩺 *Diagnosis provided by [{workflow_name}]({run_url})*" | ||||||||||
|
|
@@ -124,18 +125,31 @@ You are the CI Failure Doctor, an expert investigative agent that analyzes faile | |||||||||
| 2. **Update Pattern Database**: Enhance knowledge with new findings by updating pattern files | ||||||||||
| 3. **Save Artifacts**: Store detailed logs and analysis in the cached directories | ||||||||||
|
|
||||||||||
| ### Phase 6: Looking for existing issues | ||||||||||
|
|
||||||||||
| 1. **Convert the report to a search query** | ||||||||||
| - Use any advanced search features in GitHub Issues to find related issues | ||||||||||
| - Look for keywords, error messages, and patterns in existing issues | ||||||||||
| 2. **Judge each match issues for relevance** | ||||||||||
| - Analyze the content of the issues found by the search and judge if they are similar to this issue. | ||||||||||
| 3. **Add issue comment to duplicate issue and finish** | ||||||||||
| - If you find a duplicate issue, add a comment with your findings and close the investigation. | ||||||||||
| - Do NOT open a new issue since you found a duplicate already (skip next phases). | ||||||||||
|
|
||||||||||
| ### Phase 6: Reporting and Recommendations | ||||||||||
| ### Phase 6: Looking for existing issues and closing older ones | ||||||||||
|
|
||||||||||
| 1. **Search for existing CI failure doctor issues** | ||||||||||
| - Use GitHub Issues search to find issues with label "cookie" and title prefix "[CI Failure Doctor]" | ||||||||||
| - Look for both open and recently closed issues (within the last 7 days) | ||||||||||
| - Search for keywords, error messages, and patterns from the current failure | ||||||||||
| 2. **Judge each match for relevance** | ||||||||||
| - Analyze the content of found issues to determine if they are similar to the current failure | ||||||||||
| - Check if they describe the same root cause, error pattern, or affected components | ||||||||||
| - Identify truly duplicate issues vs. unrelated failures | ||||||||||
| 3. **Close older duplicate issues** | ||||||||||
| - If you find older open issues that are duplicates of the current failure: | ||||||||||
| - Add a comment explaining this is a duplicate of the new investigation | ||||||||||
| - Use the `update-issue` tool with `state: "closed"` and `state_reason: "not_planned"` to close them | ||||||||||
|
Comment on lines
+140
to
+141
|
||||||||||
| - Add a comment explaining this is a duplicate of the new investigation | |
| - Use the `update-issue` tool with `state: "closed"` and `state_reason: "not_planned"` to close them | |
| - Add a comment explaining this is a duplicate of the new investigation and why you're closing it | |
| - Use the `update-issue` tool with `status: "closed"` to close them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
safe-outputs.update-issue:is enabled but not configured to actually allow any updates. In this codebase, update permissions are granted by the presence ofstatus:,title:, and/orbody:keys, and the default target istriggering(which will be skipped for this workflow since it runs onworkflow_run). To make duplicate-closure possible, configureupdate-issuewith at leaststatus:enabled and settarget: "*"(so the agent can specifyissue_number), and consider raisingmaxabove 1 if you expect closing multiple duplicates per run.