Add auto-retry for flaky PyPerf test to improve CI stability#1006
Closed
mlim19 wants to merge 2 commits into
Closed
Add auto-retry for flaky PyPerf test to improve CI stability#1006mlim19 wants to merge 2 commits into
mlim19 wants to merge 2 commits into
Conversation
…dk image The openjdk:11-jdk Docker image has been deprecated and removed from Docker Hub, causing test failures in test-container-x64 jobs across all Python versions. Replace openjdk:11-jdk with eclipse-temurin:11-jdk, which is the official successor and actively maintained by the Eclipse Foundation. This is consistent with other JDK images already used in the test suite. Fixes: - test_collect_default_jvm_flags[hotspot-jdk-11-expected_flags1-True] - test_collect_cmdline_and_env_jvm_flags[hotspot-jdk-11-expected_flags1-True--XX:SelfDestructTimer=5--XX:+PrintCodeCache] 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The test_dso_name_in_pyperf_profile test occasionally fails due to PyPerf timeouts, particularly with Python 2.7. This is caused by timing issues in CI environments where PyPerf may not generate profile files within the 5-second timeout. Changes: - Add pytest-rerunfailures==15.0 to dev-requirements.txt - Mark test_dso_name_in_pyperf_profile with @pytest.mark.flaky(reruns=3, reruns_delay=2) The test will now automatically retry up to 3 times with a 2-second delay between attempts, which should handle sporadic timeout issues while still catching genuine failures. Related issue: Sporadic test failure observed in CI runs Example failure: https://github.com/intel/gprofiler/actions/runs/19146096101/job/54734480910 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Author
|
Closing this PR as it included changes from multiple branches. Creating a new clean PR with only the auto-retry changes: #1007 |
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.
Summary
This PR adds automatic retry functionality for the
test_dso_name_in_pyperf_profiletest, which occasionally fails due to PyPerf timeouts in CI environments.Problem
The test
test_dso_name_in_pyperf_profile[2.7-glibc-python-True-pyperf-True]sporadically fails with:This occurs when PyPerf cannot generate profile files within the 5-second timeout, particularly:
Example failure: https://github.com/intel/gprofiler/actions/runs/19146096101/job/54734480910
Solution
Implement auto-retry using the
pytest-rerunfailuresplugin:pytest-rerunfailures==15.0todev-requirements.txt@pytest.mark.flaky(reruns=3, reruns_delay=2)decoratorThe test will now:
Impact
test_dso_name_in_pyperf_profile(4 parameter combinations)Test Plan
🤖 Generated with Claude Code