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 docs YAML generation setting "kubernetes" for "swarm" #802

Merged
merged 1 commit into from
Jan 11, 2018

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Jan 11, 2018

Due to a copy/paste error, commands annotated with "swarm" were incorrectly setting the "kubernetes" property.

This was introduced in f1b1161 (#721)

- Description for the changelog

* Fix wrong orchestrator attribute being set in docs YAML [docker/cli#802](https://github.com/docker/cli/pull/802)

ping @silvin-lubecki @MistyHacks @dnephin PTAL

Due to a copy/paste error, commands annotated with "swarm"
were incorrectly setting the "kubernetes" property.

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

codecov-io commented Jan 11, 2018

Codecov Report

Merging #802 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master    #802      +/-   ##
=========================================
+ Coverage   50.89%   50.9%   +<.01%     
=========================================
  Files         237     237              
  Lines       15338   15338              
=========================================
+ Hits         7807    7808       +1     
+ Misses       7029    7028       -1     
  Partials      502     502

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

Easy to miss this kind of thing in a huge PR :)

@@ -123,7 +123,7 @@ func GenYamlCustom(cmd *cobra.Command, w io.Writer) error {
cliDoc.Kubernetes = true
}
if _, ok := curr.Annotations["swarm"]; ok && !cliDoc.Swarm {
cliDoc.Kubernetes = true
cliDoc.Swarm = true
Copy link
Contributor

Choose a reason for hiding this comment

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

Something still looks weird here.

It shouldn't need to check !cliDoc.Swarm because if it's true, setting it to true again doesn't hurt. Is this just an unnecessary statement that can be removed?

I guess all the checks above are the same, so maybe it was just copied?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, was looking at that as well, but didn't want to change without going through the whole logic. I can look at it for a follow-up 👍

Copy link
Contributor

@mdlinville mdlinville left a comment

Choose a reason for hiding this comment

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

+1 applied this locally to build the 18.01 CLI refs

@thaJeztah
Copy link
Member Author

author LGTM, let's merge this 👍

@thaJeztah thaJeztah merged commit 41368a8 into docker:master Jan 11, 2018
@GordonTheTurtle GordonTheTurtle added this to the 18.02.0 milestone Jan 11, 2018
@thaJeztah thaJeztah deleted the fix-yaml-generation branch January 11, 2018 18:56
@mdlinville
Copy link
Contributor

@andrewhsu this is needed in 18.01 docker/docker-ce ASAP.

@silvin-lubecki
Copy link
Contributor

Sorry guys... 😕
I was a little bit on "cargo cult" on this part.

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.

6 participants