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

add args commandPayload for manual failover/takeover api/cmd then pass to hooks #959

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

Conversation

MOON-CLJ
Copy link
Contributor

A Pull Request should be associated with an Issue.

Related issue: #955

In case this PR introduced Go code changes:

  • contributed code is using same conventions as original code
  • code is formatted via gofmt (please avoid goimports)
  • code is built via ./build.sh
  • code is tested via go test ./go/...

cc @yangeagle

Copy link
Collaborator

@shlomi-noach shlomi-noach left a comment

Choose a reason for hiding this comment

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

This will only work correctly if invoked from the orchestrator cli; using the API or orchestrator-client this has no effect. Correct?
I wonder if we can make this consistent across all methods.

@MOON-CLJ
Copy link
Contributor Author

MOON-CLJ commented Aug 15, 2019

using the API or orchestrator-client this has no effect. Correct?

yes, i know。 for orchestrator-client, not works。
orchestrator-client need one character flag for the new commandPayload args。what's your suggestion, which character one should we use? :)

"-C" ?

@MOON-CLJ
Copy link
Contributor Author

@shlomi-noach

using the API or orchestrator-client this has no effect. Correct?

For API, i should works,see https://github.com/github/orchestrator/pull/959/files#diff-fbdc8cde28a71961e53c2e83e2483c9a

for now just orchestrator-client not works。

@MOON-CLJ
Copy link
Contributor Author

MOON-CLJ commented Aug 16, 2019

orchestrator-client need one character flag for the new commandPayload args。what's your suggestion, which character one should we use? :)

or we can use getopt instead of getopts,but introduce some minor change of the usage 。

ignore, it's a bad idea. getopt's behavior is not consistent between macos and linux.

@MOON-CLJ
Copy link
Contributor Author

MOON-CLJ commented Aug 26, 2019

@shlomi-noach i add -C --command-payload in orchestrator-client, pls review。

i also test in local, when "orchestrator-client .... --command-payload username:clj,a:b .....",
i can got "ORC_COMMAND_PAYLOAD=username:clj,a:b" in environment variable。

@shlomi-noach
Copy link
Collaborator

Sorry about the delay; I expect to look into & merge a bunch of community PRs during the first two weeks of October.

@MOON-CLJ
Copy link
Contributor Author

thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants