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

*: fix urls cannot take effect when setting in the config file #6189

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Mar 21, 2023

What problem does this PR solve?

Issue Number: Fixes #6190.

What is changed and how does it work?

This PR fixes the problem accidentally introduced by #6004.

Check List

Tests

  • Manual test

config.toml:

client-urls = "http://127.0.0.1:22379"
peer-urls = "http://127.0.0.1:22380"
bin/pd-server --config=config.toml

Release note

None.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Mar 21, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • binshi-bing
  • lhy1024

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. labels Mar 21, 2023
@rleungx rleungx changed the title *: fix config setting by mistake *: fix urls cannot take effect when setting in the config file Mar 21, 2023
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 21, 2023
Copy link
Contributor

@binshi-bing binshi-bing left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -122,9 +122,9 @@ func addFlags(cmd *cobra.Command) {
cmd.Flags().BoolP("config-check", "", false, "check config file validity and exit")
cmd.Flags().StringP("name", "", "", "human-readable name for this pd member")
cmd.Flags().StringP("data-dir", "", "", "path to the data directory (default 'default.${name}')")
cmd.Flags().StringP("client-urls", "", "http://127.0.0.1:2379", "url for client traffic")
cmd.Flags().StringP("client-urls", "", "", "url for client traffic")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cmd.Flags().StringP("client-urls", "", "", "url for client traffic")
cmd.Flags().StringP("client-urls", "", "", "urls for client traffic")

cmd.Flags().StringP("advertise-client-urls", "", "", "advertise url for client traffic (default '${client-urls}')")
cmd.Flags().StringP("peer-urls", "", "http://127.0.0.1:2380", "url for peer traffic")
cmd.Flags().StringP("peer-urls", "", "", "url for peer traffic")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cmd.Flags().StringP("peer-urls", "", "", "url for peer traffic")
cmd.Flags().StringP("peer-urls", "", "", "urls for peer traffic")

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 21, 2023
@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.13 ⚠️

Comparison is base (af5b019) 74.71% compared to head (d10edb6) 74.59%.

❗ Current head d10edb6 differs from pull request most recent head a1f6231. Consider uploading reports for the commit a1f6231 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6189      +/-   ##
==========================================
- Coverage   74.71%   74.59%   -0.13%     
==========================================
  Files         394      394              
  Lines       38662    38662              
==========================================
- Hits        28887    28840      -47     
- Misses       7237     7273      +36     
- Partials     2538     2549      +11     
Flag Coverage Δ
unittests 74.59% <ø> (-0.13%) ⬇️

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

see 25 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Ryan Leung <rleungx@gmail.com>
@rleungx
Copy link
Member Author

rleungx commented Mar 21, 2023

/merge

@ti-chi-bot
Copy link
Member

@rleungx: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

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 ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: a1f6231

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 21, 2023
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.

What if

./pd-server 

?

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.0: #6191.

@rleungx rleungx deleted the fix-cmd branch March 21, 2023 05:54
@rleungx
Copy link
Member Author

rleungx commented Mar 21, 2023

What if

./pd-server 

?

It will use 127.0.0.1:2379 and 2380 as the default value.

ti-chi-bot added a commit that referenced this pull request Mar 21, 2023
#6191)

ref #6004, ref #6189, fixes #6190

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: Ryan Leung <rleungx@gmail.com>
Co-authored-by: lhy1024 <admin@liudos.us>
CabinfeverB pushed a commit to ti-chi-bot/pd that referenced this pull request Mar 22, 2023
…6189) (tikv#6191)

ref tikv#6004, ref tikv#6189, fixes tikv#6190

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: Ryan Leung <rleungx@gmail.com>
Co-authored-by: lhy1024 <admin@liudos.us>
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
CabinfeverB pushed a commit to ti-chi-bot/pd that referenced this pull request Mar 22, 2023
…6189) (tikv#6191)

ref tikv#6004, ref tikv#6189, fixes tikv#6190

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: Ryan Leung <rleungx@gmail.com>
Co-authored-by: lhy1024 <admin@liudos.us>
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-7.0 release-note-none Denotes a PR that doesn't merit a release note. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fail to start PD when using config file to set urls
5 participants