Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

What problem does this PR solve?

Issue Number: close #64313

Problem Summary: (*Domain).EtcdClient() and (*Domain).GetEtcdClient() are duplicates serving identical purposes.

What changed and how does it work?

Removed EtcdClient() method and migrated all call sites to GetEtcdClient():

  • pkg/domain/domain.go: Removed duplicate EtcdClient() method definition
  • Updated 4 call sites in pkg/ddl/schema_test.go, pkg/session/sync_upgrade.go, pkg/session/bootstrap_test.go, and tests/realtikvtest/brietest/pitr_test.go

GetEtcdClient() chosen as standard (14 existing usages vs 4 for EtcdClient()).

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@ti-chi-bot ti-chi-bot bot added do-not-merge/invalid-title do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Nov 6, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Nov 6, 2025

Hi @copilot. Thanks for your PR.

I'm waiting for a pingcap 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.

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.

@ti-chi-bot ti-chi-bot bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Nov 6, 2025
@tiprow
Copy link

tiprow bot commented Nov 6, 2025

Hi @copilot. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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.

@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 6, 2025
Copilot AI changed the title [WIP] Remove duplicate EtcdClient method in Domain package pkg/domain: remove duplicate EtcdClient() method Nov 6, 2025
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/invalid-title do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Nov 6, 2025
Copilot AI requested a review from lance6716 November 6, 2025 14:03
Copilot finished work on behalf of lance6716 November 6, 2025 14:03
@lance6716
Copy link
Contributor

/ok-to-test

@ti-chi-bot ti-chi-bot bot added ok-to-test Indicates a PR is ready to be tested. and removed needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Nov 6, 2025
@lance6716 lance6716 marked this pull request as ready for review November 6, 2025 14:04
@ti-chi-bot ti-chi-bot bot removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/needs-linked-issue do-not-merge/needs-triage-completed labels Nov 6, 2025
@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.9262%. Comparing base (5541db5) to head (c3dc20f).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #64328        +/-   ##
================================================
+ Coverage   72.7218%   74.9262%   +2.2044%     
================================================
  Files          1861       1884        +23     
  Lines        504726     512811      +8085     
================================================
+ Hits         367046     384230     +17184     
+ Misses       115367     104898     -10469     
- Partials      22313      23683      +1370     
Flag Coverage Δ
integration 48.1935% <0.0000%> (?)
unit 72.5633% <100.0000%> (+0.2748%) ⬆️

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

Components Coverage Δ
dumpling 52.8700% <ø> (ø)
parser ∅ <ø> (∅)
br 62.8769% <ø> (+16.6879%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Nov 7, 2025
@lance6716
Copy link
Contributor

/retest

@wuhuizuo
Copy link
Contributor

wuhuizuo commented Nov 7, 2025

@copilot please keep html comment elements in pull request description according to the pull request template!.

Copy link
Contributor Author

Copilot AI commented Nov 7, 2025

@copilot please keep html comment elements in pull request description according to the pull request template!.

Updated the PR description to preserve all HTML comment elements from the template.

Copilot AI requested a review from wuhuizuo November 7, 2025 03:00
Copilot finished work on behalf of wuhuizuo November 7, 2025 03:00
@lance6716
Copy link
Contributor

/cc @D3Hunter

@ti-chi-bot ti-chi-bot bot requested a review from D3Hunter November 7, 2025 03:00
@lance6716
Copy link
Contributor

/cc @yudongusa

@ti-chi-bot
Copy link

ti-chi-bot bot commented Nov 7, 2025

@lance6716: GitHub didn't allow me to request PR reviews from the following users: yudongusa.

Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @yudongusa

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.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Nov 7, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: D3Hunter, zimulala
Once this PR has been reviewed and has the lgtm label, please assign benmeadowcroft for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

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

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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 7, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Nov 7, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-11-07 02:30:51.083623867 +0000 UTC m=+410100.526653746: ☑️ agreed by zimulala.
  • 2025-11-07 07:58:46.183286531 +0000 UTC m=+429775.626316409: ☑️ agreed by D3Hunter.

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

Labels

lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(*Domain).EtcdClient() is duplicated with (*Domain).GetEtcdClient()

5 participants