X Tutup
Skip to content

[18.06] backport "Fix help message flags on docker stack commands and sub-commands"#1267

Merged
silvin-lubecki merged 2 commits intodocker:18.06from
thaJeztah:18.06-backport-fix-stack-help-command
Aug 3, 2018
Merged

[18.06] backport "Fix help message flags on docker stack commands and sub-commands"#1267
silvin-lubecki merged 2 commits intodocker:18.06from
thaJeztah:18.06-backport-fix-stack-help-command

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Aug 3, 2018

Backport #1251 and #1222 for 18.06

fixes #1243 for 18.06

git checkout -b 18.06-backport-fix-stack-help-command upstream/18.06
git cherry-pick -s -S -x 2c7822b0361dd3e78bb0745a5c03f741bc21821e
git cherry-pick -s -S -x 21cce52b3060414aa76b89d4d401ada74b178789
git push -u origin

cherry-pick was clean; no conflicts

PersistentPreRunE needs to be called within the help function to initialize all the flags (notably the orchestrator flag) Add an e2e test as regression test

@silvin-lubecki
Copy link
Contributor

A test is failing

11:58:08 --- FAIL: TestStackDeployHelp (0.32s)
11:58:08     --- FAIL: TestStackDeployHelp/Swarm (0.16s)
11:58:08     	help_test.go:23: assertion failed: 
11:58:08     		--- expected
11:58:08     		+++ actual
11:58:08     		@@ -9,6 +9,5 @@
11:58:08     		 Options:
11:58:08     		       --bundle-file string     Path to a Distributed Application Bundle file
11:58:08     		-  -c, --compose-file strings   Path to a Compose file, or "-" to read
11:58:08     		-                               from stdin
11:58:08     		+  -c, --compose-file strings   Path to a Compose file
11:58:08     		       --orchestrator string    Orchestrator to use (swarm|kubernetes|all)
11:58:08     		       --prune                  Prune services that are no longer referenced
11:58:08     		
11:58:08     --- FAIL: TestStackDeployHelp/Kubernetes (0.17s)
11:58:08     	help_test.go:23: assertion failed: 
11:58:08     		--- expected
11:58:08     		+++ actual
11:58:08     		@@ -8,6 +8,5 @@
11:58:08     		 
11:58:08     		 Options:
11:58:08     		-  -c, --compose-file strings   Path to a Compose file, or "-" to read
11:58:08     		-                               from stdin
11:58:08     		+  -c, --compose-file strings   Path to a Compose file
11:58:08     		       --kubeconfig string      Kubernetes config file
11:58:08     		       --namespace string       Kubernetes namespace to use

Which is really weird 🤔

@thaJeztah
Copy link
Member Author

Oh! I know why; flag description was slightly changed on master; I'll add that change

thaJeztah and others added 2 commits August 3, 2018 19:27
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2c7822b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
PersistentPreRunE needs to be called within the help function to initialize all the flags (notably the orchestrator flag)
Add an e2e test as regression test

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 21cce52)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the 18.06-backport-fix-stack-help-command branch from f8405a2 to 911e86c Compare August 3, 2018 17:27
@thaJeztah
Copy link
Member Author

Added #1222

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, thank you @thaJeztah for the fix!

@silvin-lubecki silvin-lubecki merged commit 3dbd9ea into docker:18.06 Aug 3, 2018
@thaJeztah thaJeztah deleted the 18.06-backport-fix-stack-help-command branch August 3, 2018 21:08
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.

3 participants

X Tutup