test: stabilize sync_diff_inspector checkpoint test#12559
test: stabilize sync_diff_inspector checkpoint test#12559joechenrh wants to merge 2 commits intopingcap:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request stabilizes the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request aims to stabilize a checkpoint test by replacing brittle regex checks with more robust parsing and assertions in a shell script. The changes are a good improvement. I've suggested a couple of refactorings to simplify the new parsing logic and remove leftover debugging code, making the script cleaner and more idiomatic.
sync_diff_inspector/tests/sync_diff_inspector/checkpoint/run.sh
Outdated
Show resolved
Hide resolved
sync_diff_inspector/tests/sync_diff_inspector/checkpoint/run.sh
Outdated
Show resolved
Hide resolved
|
/severity minor |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Makes sense, simplified both blocks in joechenrh@9b0ed66 . Replaced with a single |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (53.3562%) is below the target coverage (60.0000%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. @@ Coverage Diff @@
## master #12559 +/- ##
================================================
+ Coverage 49.4757% 53.3562% +3.8804%
================================================
Files 486 1010 +524
Lines 70677 139860 +69183
================================================
+ Hits 34968 74624 +39656
- Misses 32951 59624 +26673
- Partials 2758 5612 +2854 🚀 New features to boost your workflow:
|
|
@joechenrh: 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. |
What problem does this PR solve?
Issue Number: close #12553
What is changed and how it works?
The checkpoint integration test (
checkpoint/run.sh) was flaky because it pre-computed abucket_index_right(orbucket_index_left-bucket_index_right) from the last run and then usedcheck_contains_regexto match a fullindexCodepattern in the resumed run's first chunk. When chunks are created in parallel, multiple resumed chunks can share the same lower bound, so the selected first chunk may carry a different—but equally valid—indexCode, causing the regex match to fail nondeterministically.Changes (bucket splitter, cases 1 & 2):
bucket_index_right/bucket_index_leftvariables that were derived from the previous run's index.indexCodestring with a regex, we now parse the resumed first chunk'sindexCodeinto an array and assert only the structurally stable fields:chunkIndex == 0.chunkIndex == lastChunkIndex + 1andchunkCount == lastChunkCount.Changes (random splitter, case 1):
check_contains_regexassertion onindexCodeentirely, because the random splitter may re-split the remaining range after resuming, making theindexCodeunstable across runs.Check List
Tests
Questions
Will it cause performance regression or break compatibility?
No. This is a test-only change.
Do you need to update user documentation, design documentation or monitoring documentation?
No.
Release note