Skip to content

controlbridge, sqlreplay: fix Go lint and flaky TestS3DirWatcher on rust - #1390

Merged
ti-chi-bot[bot] merged 1 commit into
pingcap:rustfrom
bb7133:fix/rust-go-ci
Oct 21, 2026
Merged

ti-chi-bot[bot] merged 1 commit into
pingcap:rustfrom
bb7133:fix/rust-go-ci

Conversation

@bb7133

@bb7133 bb7133 commented Oct 20, 2026

Copy link
Copy Markdown
Member

What problem does this PR solve?

Issue Number: ref #1388

Problem Summary:

Every PR against the rust branch currently fails two Go CI jobs for reasons unrelated to its diff (seen on #1388):

  • pull-check: golangci-lint unused reports 11 errors in pkg/controlbridge/helpers_test.go. The recordingHandler test double lost its last callers when the legacy Go route path was deleted, and the fork's CI never ran Go lint, so it went unnoticed.
  • pull-unit-test: TestS3DirWatcher is timing-sensitive. The S3 mock is capped at MaxTimes(4) while the watcher polls every 10ms; on a slow runner the expectation runs out, the watcher stops seeing the new directory, and the Eventually (3 poll intervals = 30ms) fails.

What is changed and how it works:

  • Remove recordingHandler and its now-unused imports.
  • TestS3DirWatcher: allow any number of ListObjectsV2 calls, wait up to 5s instead of 30ms (returns as soon as the condition holds), and lock the files map that the watcher goroutine writes while the test reads it.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Local: golangci-lint v1.64.8 (make lint config) clean on the whole module (base rust reports the 11 unused errors); go test -race -count=20 -run 'TestS3DirWatcher$' ./pkg/sqlreplay/store/ passes; go test ./pkg/controlbridge/... passes.

Notable changes

  • Has configuration change
  • Has HTTP API interfaces change
  • Has tiproxyctl change
  • Other user behavior changes

Release note

None

🤖 Generated with Claude Code

- controlbridge: remove the unused recordingHandler test double. Its last
  callers were deleted with the legacy Go route path, and golangci-lint's
  `unused` check now fails pull-check on every PR against rust.
- sqlreplay/store: TestS3DirWatcher capped the S3 mock at MaxTimes(4)
  while polling every 10ms, so a slow CI runner exhausted the expectation
  and the watcher stopped seeing new dirs. Allow any number of calls, wait
  up to 5s instead of 3 poll intervals, and guard the files map that the
  watcher goroutine writes while the test reads it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ti-chi-bot
ti-chi-bot Bot requested review from YangKeao and djshow832 October 20, 2026 18:57
@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review: 1
  • release-*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c675a68f-dec1-4027-8d89-c87ebf0c854b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-20T18:58:38.758578Z e3c289b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ti-chi-bot ti-chi-bot Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 20, 2026
@bb7133

bb7133 commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

/retest

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (rust@b8dbe7b). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             rust    #1390   +/-   ##
=======================================
  Coverage        ?   58.58%           
=======================================
  Files           ?      214           
  Lines           ?    29850           
  Branches        ?        0           
=======================================
  Hits            ?    17488           
  Misses          ?    10876           
  Partials        ?     1486           
Flag Coverage Δ
unit 58.58% <ø> (?)

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@ti-chi-bot ti-chi-bot Bot added the lgtm label Oct 20, 2026
@ti-chi-bot

ti-chi-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: djshow832

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 commented Oct 20, 2026

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2026-10-20 23:59:36.980184854 +0000 UTC m=+148389.240271781: ☑️ agreed by djshow832.

@ti-chi-bot ti-chi-bot Bot added the approved label Oct 20, 2026
@ti-chi-bot
ti-chi-bot Bot merged commit 2e51931 into pingcap:rust Oct 21, 2026
78 of 83 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants