Skip to content

test: stabilize flaky TestLoadLargeRules#10938

Open
flaky-claw wants to merge 1 commit into
tikv:masterfrom
flaky-claw:flakyfixer/case_ac41bf0af124-a3
Open

test: stabilize flaky TestLoadLargeRules#10938
flaky-claw wants to merge 1 commit into
tikv:masterfrom
flaky-claw:flakyfixer/case_ac41bf0af124-a3

Conversation

@flaky-claw

@flaky-claw flaky-claw commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #10346

Problem Summary:
Flaky test TestLoadLargeRules in github.com/tikv/pd/pkg/mcs/scheduling/server/rule intermittently fails, so this PR stabilizes that path.

What changed and how does it work?

Root Cause

Durable embedded-etcd setup writes could consume the test budget before the watcher load assertion was reached.

Fix

Setting UnsafeNoFsync removes irrelevant unit-test disk durability cost while preserving etcd-backed bulk setup and watcher loading.

Verification

Spec:

  • target: github.com/tikv/pd/pkg/mcs/scheduling/server/rule :: TestLoadLargeRules
  • strategy: pd.issue_scoped.v1
  • plan mode: BASELINE_ONLY
  • requirements: required case must execute; no skip; repeat count = 1
  • baseline gates: required_flaky_gate, build_safety_gate, intent_guard_gate
  • feedback surface source: baseline_only

Observed result:

  • status: passed
  • required case executed: yes
  • submission decision: ALLOWED
  • note: Required flaky case executed during validation.
    Required flaky case was not skipped.
    target_flaky_corrected passed.

Gate checklist:

  • diagnostic_timing_repro: SKIPPED
  • target_flaky_corrected: PASS
  • supplied_path_mismatch: SKIPPED
  • package_surface: SKIPPED
  • build: SKIPPED
  • external_ci: SKIPPED

Commands:

  • go test -json ./pkg/mcs/scheduling/server/rule -run '^TestLoadLargeRules$' -count=1

Release note

None

Fixes #10346

Summary by CodeRabbit

  • Tests
    • Updated the in-process test storage configuration for watcher-related checks to run faster by changing the durability setting.
    • No user-facing behavior or product functionality was changed.

@ti-chi-bot ti-chi-bot Bot added release-note-none Denotes a PR that doesn't merit a release note. contribution This PR is from a community contributor. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. dco-signoff: no Indicates the PR's author has not signed dco. labels Jun 24, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Hi @flaky-claw. Thanks for your PR.

I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ace9895f-da1f-4eed-8cdb-bf35d6cefcfd

📥 Commits

Reviewing files that changed from the base of the PR and between eb91e20 and 85c6938.

📒 Files selected for processing (1)
  • pkg/mcs/scheduling/server/rule/watcher_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/mcs/scheduling/server/rule/watcher_test.go

📝 Walkthrough

Walkthrough

The watcher test helper enables UnsafeNoFsync for embedded etcd before startup. Watcher initialization and rule-loading logic are unchanged.

Changes

Watcher test setup

Layer / File(s) Summary
Embedded etcd config
pkg/mcs/scheduling/server/rule/watcher_test.go
prepare sets cfg.UnsafeNoFsync = true before starting the embedded etcd instance.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested labels: lgtm, ok-to-test

Suggested reviewers: bufferflies, rleungx

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: stabilizing TestLoadLargeRules.
Description check ✅ Passed The description covers the problem, fix, verification, and release note, with the required issue reference present.
Linked Issues check ✅ Passed The change addresses #10346 by reducing embedded-etcd test overhead to prevent the test timeout.
Out of Scope Changes check ✅ Passed The PR only changes the test etcd setup, with no unrelated code or scope creep evident.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ti-chi-bot ti-chi-bot Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 24, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lhy1024

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jul 8, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

[LGTM Timeline notifier]

Timeline:

  • 2026-07-08 11:46:51.765596933 +0000 UTC m=+195797.801691979: ☑️ agreed by lhy1024.

@ti-chi-bot ti-chi-bot Bot added the approved label Jul 8, 2026
Signed-off-by: Ryan Leung <rleungx@gmail.com>
@rleungx rleungx force-pushed the flakyfixer/case_ac41bf0af124-a3 branch from eb91e20 to 85c6938 Compare July 16, 2026 02:44
@ti-chi-bot ti-chi-bot Bot added dco-signoff: yes Indicates the PR's author has signed the dco. and removed dco-signoff: no Indicates the PR's author has not signed dco. labels Jul 16, 2026
@rleungx

rleungx commented Jul 16, 2026

Copy link
Copy Markdown
Member

/retest

@ti-chi-bot

ti-chi-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

@flaky-claw: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-unit-test-next-gen-3 85c6938 link true /test pull-unit-test-next-gen-3

Full PR test history. Your PR dashboard.

Details

Instructions 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.

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.27%. Comparing base (51f4146) to head (85c6938).
⚠️ Report is 37 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10938      +/-   ##
==========================================
+ Coverage   79.18%   79.27%   +0.09%     
==========================================
  Files         540      541       +1     
  Lines       74894    75983    +1089     
==========================================
+ Hits        59307    60239     +932     
- Misses      11414    11501      +87     
- Partials     4173     4243      +70     
Flag Coverage Δ
unittests 79.27% <ø> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved contribution This PR is from a community contributor. dco-signoff: yes Indicates the PR's author has signed the dco. needs-1-more-lgtm Indicates a PR needs 1 more LGTM. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TestLoadLargeRules is flaky

3 participants