-
Notifications
You must be signed in to change notification settings - Fork 294
jobrunaggregator: treat informing tests as always passing #4902
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
base: main
Are you sure you want to change the base?
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
WalkthroughIntroduces a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (2)
🧰 Additional context used📓 Path-based instructions (1)**⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (2)
✏️ Tip: You can disable this entire section by setting Comment |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: smg247, stbenjam The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pkg/jobrunaggregator/jobrunaggregatoranalyzer/junit.go (1)
234-236: Pre-existing bug: error is silently ignored.This is not introduced by your PR, but Line 235 returns
nilinstead oferr, silently discarding the marshal error.🐛 Suggested fix
detailsYaml, err := yaml.Marshal(currDetails) if err != nil { - return nil + return err }
🧹 Nitpick comments (1)
pkg/jobrunaggregator/jobrunaggregatoranalyzer/pass_fail.go (1)
552-556: LGTM! Consider extracting the "informing" literal to a constant.The early return logic correctly bypasses aggregation evaluation for informing tests. The placement before
testShouldAlwaysPassis appropriate.Optional: The string
"informing"is also used in the aggregation layer. Consider defining a package-level constant to avoid magic strings and ensure consistency.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (4)
pkg/jobrunaggregator/jobrunaggregatoranalyzer/junit.gopkg/jobrunaggregator/jobrunaggregatoranalyzer/pass_fail.gopkg/jobrunaggregator/jobrunaggregatorlib/junit.gopkg/junit/types.go
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file
-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.
Files:
pkg/jobrunaggregator/jobrunaggregatorlib/junit.gopkg/jobrunaggregator/jobrunaggregatoranalyzer/junit.gopkg/jobrunaggregator/jobrunaggregatoranalyzer/pass_fail.gopkg/junit/types.go
🔇 Additional comments (3)
pkg/junit/types.go (1)
71-74: LGTM!The
Lifecyclefield is well-documented and correctly annotated with the XML attribute tag. Theomitemptyensures backward compatibility with JUnit XML that doesn't include this attribute.pkg/jobrunaggregator/jobrunaggregatorlib/junit.go (1)
11-13: LGTM!The
Lifecyclefield addition toTestCaseDetailsmirrors the field injunit.TestCaseand is correctly documented. This enables lifecycle data to propagate through the aggregation pipeline.pkg/jobrunaggregator/jobrunaggregatoranalyzer/junit.go (1)
196-200: LGTM!The lifecycle propagation is correctly placed before the pass/fail/skip handling. The non-empty check ensures we don't overwrite existing lifecycle data with empty strings.
Note: If the same test appears in multiple job runs with different lifecycle values, later runs will overwrite earlier values. This should be fine in practice since lifecycle is expected to be consistent for a given test across runs.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Tests with lifecycle="informing" in the JUnit XML do not impact aggregation results. This change parses the lifecycle attribute and treats informing tests as always passing in the pass/fail calculation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
061d456 to
665c8a2
Compare
|
New changes are detected. LGTM label has been removed. |
|
@stbenjam: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Tests with lifecycle="informing" in the JUnit XML do not impact aggregation results. This change parses the lifecycle attribute and treats informing tests as always passing in the pass/fail calculation.