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

Refactor the stack services command to be uniform [carry 2131] #2167

Merged
merged 1 commit into from
Oct 30, 2019

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Oct 25, 2019

carries #2131
closes #2131

depends on:

- What I did

Running docker stack services <STACK> --orchestrator swarm would yield the message "Noting found in stack: asdf" with an exit code 0. The same command with kubernetes orchestrator would yield "nothing found in stack: adsf" (note the lower-case "nothing") and a non-zero exit code. This change makes the stack services command uniform for both orchestrators. The logic of getting and printing services is split to reuse the same formatting code.

- How to verify it

Run:

$ docker stack services unknown --orchestrator swarm
$ docker stack services unknown --orchestrator kubernetes

Both commands should return 0 and show the error message Noting found in stack: unknown.

- Description for the changelog
Stack services will return the same exit code for all orchestrators.

- A picture of a cute animal (not mandatory but encouraged)
image

Running `docker stack services <STACK> --orchestrator swarm would yield
the message "Noting found in stack: asdf" with an exit code 0. The same
command with kubernetes orchestrator would yield "nothing found in
stack: adsf" (note the lower-case "nothing") and a non-zero exit code.
This change makes the `stack services` command uniform for both
orchestrators. The logic of getting and printing services is split to
reuse the same formatting code.

Signed-off-by: Djordje Lukic <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah force-pushed the carry_refactor_stack_services branch from 4cdc783 to 568ea3a Compare October 29, 2019 14:58
@thaJeztah thaJeztah marked this pull request as ready for review October 29, 2019 14:58
@thaJeztah
Copy link
Member Author

@rumpl @silvin-lubecki @chris-crone PTAL this should be an easy review now

Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

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

LGTM

@rumpl
Copy link
Member

rumpl commented Oct 29, 2019

👍

Copy link
Member Author

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

thanks for reviewing! I'll "LGTM" and merge

@thaJeztah thaJeztah merged commit 6318939 into docker:master Oct 30, 2019
@thaJeztah thaJeztah deleted the carry_refactor_stack_services branch October 30, 2019 07:47
@thaJeztah thaJeztah added this to the next milestone Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants