-
Notifications
You must be signed in to change notification settings - Fork 540
CI: set --clean-durations
for pytest-split
#4341
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
Conversation
Signed-off-by: Jinzhe Zeng <[email protected]> (cherry picked from commit 9af5267)
📝 WalkthroughWalkthroughThe pull request updates the GitHub Actions workflow for testing Python applications. Key modifications include adding the Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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
🧹 Outside diff range and nitpick comments (1)
.github/workflows/test_python.yml (1)
Line range hint
89-93
: Consider adding error handling for the duration file mergeThe artifact merging looks good, but consider adding error checking for the
jq
merge operation to handle cases where some duration files might be missing or malformed.Consider this more robust approach:
- - name: Combine test durations - run: jq -s add .test_durations_* > .test_durations + - name: Combine test durations + run: | + if ! ls .test_durations_* >/dev/null 2>&1; then + echo "No duration files found!" + exit 1 + fi + if ! jq -s add .test_durations_* > .test_durations; then + echo "Failed to merge duration files!" + exit 1 + fi
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
.github/workflows/test_python.yml
(1 hunks)
🔇 Additional comments (1)
.github/workflows/test_python.yml (1)
57-57
: Addition of --clean-durations
looks good!
The flag addition aligns well with the PR objective of managing duration file sizes and integrates correctly with the existing pytest-split configuration.
Let's verify the behavior in failure scenarios:
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## devel #4341 +/- ##
=======================================
Coverage 84.35% 84.35%
=======================================
Files 593 593
Lines 55899 55899
Branches 3388 3388
=======================================
Hits 47154 47154
Misses 7635 7635
Partials 1110 1110 ☔ View full report in Codecov by Sentry. |
I noticed that the CI is broken in several PRs. The duration files are not generated correctly and become larger and larger, causing out-of-memory.
Summary by CodeRabbit