-
Notifications
You must be signed in to change notification settings - Fork 68
feat: add INFRASTRUCTURE classification and environment info to analysis prompts #4732
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
Open
rnetser
wants to merge
1
commit into
RedHatQE:main
Choose a base branch
from
rnetser:feat/add-infrastructure-classification
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+166
−26
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| <!-- To be used with https://github.com/myk-org/rootcoz | ||
| Complements the main analysis prompt — history-aware classification. | ||
| --> | ||
|
|
||
| # Pre-Classification Check: Did a Previous Test Break the Cluster? | ||
|
|
||
| ## MANDATORY: Before classifying any failure, answer this question first: | ||
|
|
||
| **Did an earlier test in this job run modify cluster resources and fail to clean them up?** | ||
|
|
||
| If yes → the current failure is likely a side effect of that earlier test's failed | ||
| teardown, not an independent issue. | ||
|
|
||
| ## How to Check | ||
|
|
||
| 1. **Scan the console log for teardown failures BEFORE the current test.** | ||
| Look for: | ||
| - `TimeoutExpiredError` during teardown or fixture cleanup | ||
| - `ERROR` in teardown/finalizer of a preceding test | ||
| - `teardown_module`, `teardown_class`, or fixture `yield` cleanup failures | ||
|
|
||
| 2. **Identify what the failed teardown was supposed to revert.** | ||
| Look for any test that patches, modifies, or reconfigures cluster-scoped resources: | ||
| operators, subscriptions, CRDs, node labels/taints, network configurations, or | ||
| cluster-level CRs (HyperConverged, KubeVirt, NetworkAddonsConfig, etc.). | ||
| If the teardown of such a test failed, the cluster may be left in a modified state. | ||
|
|
||
| 3. **Check if the current failure matches the expected impact.** | ||
| For example: pods stuck in Pending, operators degraded, nodes not schedulable, | ||
| feature gates in wrong state, network policies broken — any symptom consistent | ||
| with the resource that was not reverted. | ||
|
|
||
| ## Classification | ||
|
|
||
| - **The test whose teardown failed**: Classify based on why its teardown failed — | ||
| CODE ISSUE if the cleanup logic is wrong, PRODUCT BUG if the product blocked | ||
| the revert, INFRASTRUCTURE if an environmental issue (node outage, storage | ||
| failure, etc.) prevented cleanup. | ||
| - **All other tests that failed after it**: Use the **same classification** as the | ||
| root-cause test. In the reason, state: "Caused by [test_name] teardown failure — | ||
| [resource] was not reverted." | ||
|
|
||
| ## When This Check Does NOT Apply | ||
|
|
||
| - The current test is the **first failure** in the run | ||
| - No teardown errors appear before the current test in the console log | ||
| - The failure has a clearly independent root cause (e.g., wrong assertion value, | ||
| import error, syntax error) | ||
| - The failure occurs during **pytest collection** (e.g., `ModuleNotFoundError`, | ||
| `SyntaxError`, missing fixture) — collection happens before any test runs | ||
| - The cluster was already broken **before any test ran** (e.g., deployment failure, | ||
| cluster not provisioned, operators not installed) | ||
| - The failure is in a completely **unrelated area** to what the previous test modified | ||
| (e.g., previous test changed storage config, current test fails on CPU topology) | ||
| - The same failure pattern appears in **previous job runs** where no teardown failure | ||
| preceded it — this indicates a recurring issue independent of teardown cascades | ||
|
|
||
| In these cases, proceed with normal classification rules. |
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
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.
Uh oh!
There was an error while loading. Please reload this page.