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

etcd/path: change leaderPath/dcLocationPath/memberPath/allocalIDPath to absolute path #8789

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

okJiang
Copy link
Member

@okJiang okJiang commented Nov 7, 2024

What problem does this PR solve?

Issue Number: Ref #8582

What is changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
@ti-chi-bot ti-chi-bot bot added 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 Nov 7, 2024
@okJiang okJiang changed the title etcd: change leaderPath/dcLocationPath/memberPath/allocalIDPath to absolute path etcd/path: change leaderPath/dcLocationPath/memberPath/allocalIDPath to absolute path Nov 7, 2024
@ti-chi-bot ti-chi-bot bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 7, 2024
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
@okJiang okJiang marked this pull request as draft November 7, 2024 09:49
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 7, 2024
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 7, 2024
Signed-off-by: okJiang <[email protected]>
@okJiang
Copy link
Member Author

okJiang commented Nov 8, 2024

/retest

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 97.61905% with 2 lines in your changes missing coverage. Please review.

Project coverage is 75.19%. Comparing base (40ae26c) to head (f1d54d3).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8789      +/-   ##
==========================================
- Coverage   75.21%   75.19%   -0.02%     
==========================================
  Files         459      460       +1     
  Lines       71843    71867      +24     
==========================================
+ Hits        54035    54042       +7     
- Misses      14351    14369      +18     
+ Partials     3457     3456       -1     
Flag Coverage Δ
unittests 75.19% <97.61%> (-0.02%) ⬇️

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

@okJiang okJiang marked this pull request as ready for review November 8, 2024 06:12
@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 Nov 8, 2024
@okJiang
Copy link
Member Author

okJiang commented Nov 8, 2024

/retest

@@ -488,17 +484,9 @@ func (m *EmbeddedEtcdMember) SetMemberDeployPath(id uint64) error {
return nil
}

func (m *EmbeddedEtcdMember) getMemberGitHashPath(id uint64) string {
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 add a test to check if the changes produce the same results as before? For example, we could output the path from the old version as a dataset for the new code test.

Copy link
Member Author

Choose a reason for hiding this comment

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

All I can think of is to verify the consistency of the paths through manual testing. There doesn't seem to be any good testing methods to automate🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can use fixed testdata from your manual testing.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am trying

Copy link
Contributor

@nolouch nolouch left a comment

Choose a reason for hiding this comment

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

lgtm!

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

ti-chi-bot bot commented Nov 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

Copy link
Contributor

ti-chi-bot bot commented Nov 15, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-15 06:46:20.23215123 +0000 UTC m=+597942.423020223: ☑️ agreed by nolouch.

@ti-chi-bot ti-chi-bot bot added the approved label Nov 15, 2024
@@ -28,6 +28,8 @@ tidb_download_url="${file_server_url}/download/builds/pingcap/tidb/${tidb_sha1}/
tikv_download_url="${file_server_url}/download/builds/pingcap/tikv/${tikv_sha1}/centos7/tikv-server.tar.gz"
tiflash_download_url="${file_server_url}/download/builds/pingcap/tiflash/${branch}/${tiflash_sha1}/centos7/tiflash.tar.gz"

ETCD_VERSION=v3.5.9
Copy link
Member

Choose a reason for hiding this comment

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

why 3.5.9?

Copy link
Member Author

Choose a reason for hiding this comment

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

No special meaning

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 is used to download etcdctl

Copy link
Member

Choose a reason for hiding this comment

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

It should be 3.5.15?

Copy link
Member Author

Choose a reason for hiding this comment

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

They are all ok for me

"/pd//raft/r/",
"/pd//raft/s/",
"/pd//raft/status/raft_bootstrap_time",
"/pd//region_label/keyspaces/",
Copy link
Member

Choose a reason for hiding this comment

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

Can you explain the difference between // and /?

Copy link
Member Author

@okJiang okJiang Nov 15, 2024

Choose a reason for hiding this comment

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

To ensure consistency in each test, I removed the numerical parts from the key

Copy link
Member Author

Choose a reason for hiding this comment

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

image

}

// LeaderPath returns the leader path.
func LeaderPath(p *MsParam) string {
Copy link
Member

Choose a reason for hiding this comment

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

How about making the parameter optional?

Copy link
Member Author

Choose a reason for hiding this comment

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

I prefer to keeping this way. Because it is only called in a few places, and it is wrapped by its upper layer yet.

Signed-off-by: okJiang <[email protected]>
@okJiang
Copy link
Member Author

okJiang commented Nov 15, 2024

/retest

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. needs-1-more-lgtm Indicates a PR needs 1 more LGTM. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants