Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add etcd key compatibility test #9126

Merged
merged 37 commits into from
Mar 18, 2025
Merged

Conversation

okJiang
Copy link
Member

@okJiang okJiang commented Mar 10, 2025

What problem does this PR solve?

Issue Number: Ref #9127

What is changed and how does it work?

This PR introduces a new etcd key compatibility test, with its test data based on release 8.5. It is only for reviewing the code of this test, so I have not enabled it. In the next PR, I will fix the changes to the etcd keys from release 8.5 to master and provide source explanations for those changes. I has updated the test data using master code, and enable this test.

Code Overview: I used failpoint to collect the operation of keys during the test and saved the results to a file. If the results from the new code do not match those in the file, it indicates that the operations on the keys have changed during testing. This compels us to pay attention to changes in the keys.

Check List

Tests

  • Unit test
  • Integration test

Please refer to the test results here; they are based on test data generated from the release-8.5 code.

Release note

None.

ti-chi-bot and others added 25 commits November 7, 2024 07:24
close tikv#8823

Signed-off-by: Ryan Leung <[email protected]>

Co-authored-by: Ryan Leung <[email protected]>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
tikv#8772)

ref tikv#4257

Signed-off-by: baurine <[email protected]>

Co-authored-by: baurine <[email protected]>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
…ikv#8963) (tikv#8974)

close tikv#8962

Signed-off-by: okJiang <[email protected]>

Co-authored-by: okJiang <[email protected]>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
…fig (tikv#8981) (tikv#8985)

close tikv#8980

server/config: completely remove the deprecated field from the PD server config

Signed-off-by: nolouch <[email protected]>

Co-authored-by: nolouch <[email protected]>
close tikv#9020

Signed-off-by: lhy1024 <[email protected]>

Co-authored-by: lhy1024 <[email protected]>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Copy link
Contributor

ti-chi-bot bot commented Mar 10, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. labels Mar 10, 2025
@okJiang
Copy link
Member Author

okJiang commented Mar 10, 2025

/retest

@okJiang okJiang changed the title [draft] test: add etcd key compatibility test test: add etcd key compatibility test Mar 10, 2025
@okJiang okJiang marked this pull request as ready for review March 10, 2025 08:30
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 10, 2025
@okJiang
Copy link
Member Author

okJiang commented Mar 10, 2025

/retest

okJiang added 3 commits March 10, 2025 18:10
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
okJiang added 5 commits March 12, 2025 17:08
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
func InjectFailToCollectTestEtcdKey(key, op string) {
failpoint.Inject("CollectEtcdKey", func(val failpoint.Value) {
file := val.(string)
fmt.Println("collect etcd key", file, key, op)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to output it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,75 @@
get
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these files necessary? How will we maintain them?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding a script to generate it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be print after execute ./scripts/ci-subtask.sh {group_id}. So we can see it in the github action
image

BTW: the code is in https://github.com/okJiang/pd/blob/7025e1f6144f5f6e40546246e97b452e11d1329f/tools/pd-ut/ut.go#L419. If diff exists, it will also print https://github.com/okJiang/pd/blob/7025e1f6144f5f6e40546246e97b452e11d1329f/tools/pd-ut/ut.go#L421-L437

How will we maintain them?

If the ci failed, we can copy the log to the xxxx.etcdkey

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Mar 17, 2025
Copy link
Contributor

ti-chi-bot bot commented Mar 18, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lhy1024, nolouch

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

The pull request process is described 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 Mar 18, 2025
Copy link
Contributor

ti-chi-bot bot commented Mar 18, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-03-17 09:52:34.121835591 +0000 UTC m=+262847.806071682: ☑️ agreed by nolouch.
  • 2025-03-18 05:44:13.686642327 +0000 UTC m=+334347.370878423: ☑️ agreed by lhy1024.

@ti-chi-bot ti-chi-bot bot merged commit 65a3377 into tikv:master Mar 18, 2025
24 of 25 checks passed
@okJiang okJiang deleted the master-etcd-test branch March 18, 2025 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants