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

Allow --detach and --quiet flags when using --rollback #144

Merged
merged 1 commit into from
Jun 1, 2017

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Jun 1, 2017

Commit 78c204e (moby/moby@f9bd8ec / moby/moby#31108 in the moby repo) added a validation to prevent --rollback from being used in combination with other flags that update the service spec.

This validation was not taking into account that some flags only affect the CLI behavior, and are okay to be used when rolling back.

This patch updates the validation, and adds --quiet and --detach to the list of allowed flags.

relates to moby/moby#33444 (comment)

Commit 78c204e added
(f9bd8ec in the moby repo)
a validation to prevent `--rollback` from being used
in combination with other flags that update the
service spec.

This validation was not taking into account that
some flags only affect the CLI behavior, and
are okay to be used when rolling back.

This patch updates the validation, and adds
`--quiet` and `--detach` to the list of allowed
flags.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@aaronlehmann
Copy link
Contributor

LGTM

Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-io
Copy link

codecov-io commented Jun 1, 2017

Codecov Report

Merging #144 into master will not change coverage.
The diff coverage is 0%.

@@           Coverage Diff           @@
##           master     #144   +/-   ##
=======================================
  Coverage   44.96%   44.96%           
=======================================
  Files         169      169           
  Lines       11378    11378           
=======================================
  Hits         5116     5116           
  Misses       5970     5970           
  Partials      292      292

@cpuguy83
Copy link
Collaborator

cpuguy83 commented Jun 1, 2017

Kind of stinks we can't specify the rollback order when rolling back.

@aaronlehmann
Copy link
Contributor

@cpuguy83: For the swarm manager to know it's doing a rollback, the rollback has to happen server-side instead of the client just submitting PreviousSpec as the new spec. But if the spec is being rolled back on the server side, there is no mechanism to tell the swarm manager "use the previous spec, except change X and Y and Z".

@thaJeztah
Copy link
Member Author

Also related to this; #142

For the swarm manager to know it's doing a rollback, the rollback has to happen server-side instead of the client just submitting PreviousSpec as the new spec.

Perhaps a PATCH request could be used to allow updating the spec while rolling back (i.e., just allow setting some options)? Anyway, that's a different discussion 😄

Copy link
Collaborator

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

LGTM 🐸

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.

None yet

7 participants