Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

[WIP] APP-214 Enable 'docker app validate' for experimental mode only - #625

Merged
rumpl merged 2 commits into
docker-archive-public:masterfrom
aiordache:app-214_experimental_validate
Nov 12, 2019
Merged

[WIP] APP-214 Enable 'docker app validate' for experimental mode only#625
rumpl merged 2 commits into
docker-archive-public:masterfrom
aiordache:app-214_experimental_validate

Conversation

@aiordache

@aiordacheaiordache commented Sep 20, 2019

Copy link
Copy Markdown
Contributor

Signed-off-by: Anca Iordache anca.iordache@docker.com

Fixes APP-214

Requires PR-2095

- What I did
Enabled validate command only for experimental mode

- How I did it
Added validate command to the list of commands only if experimental flag is on.
- How to verify it

$ DOCKER_CLI_EXPERIMENTAL="disabled" docker app --help
Usage:	docker app COMMAND
Commands:
...
run Run an App from an App image
update Update a running App
$ DOCKER_CLI_EXPERIMENTAL="enabled" docker app --help
Usage:	docker app COMMAND
Commands:
...
run Run an App from an App image
update Update a running App
validate Check that an App definition (.dockerapp) is syntactically correct
$ DOCKER_CLI_EXPERIMENTAL="enabled" docker app validate
Validated "/home/anca/go/src/github.com/docker/app/examples/test.dockerapp"
$ DOCKER_CLI_EXPERIMENTAL="disabled" docker app validate
"validate" is not a docker app command
See 'docker app --help'

- Description for the changelog
Add validate to the list of docker app commands only in experimental mode.

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

@thaJeztah

Copy link
Copy Markdown
Contributor

looks like there's a merge-conflict, so might need a rebase.

@aiordache
aiordacheforce-pushed the app-214_experimental_validate branch 2 times, most recently from 2ab8657 to 1687455CompareSeptember 20, 2019 18:28
Comment threadinternal/commands/root.go Outdated

isExperimentalMode := dockerCli.ClientInfo().HasExperimental
for _, ccmd := range listOfCommands {
value, ok := ccmd.Annotations["experimental"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What do you think of:

switchccmd.Annotations["experimental"]{
case"true":
ifisExperimentalMode {
cmd.AddCommand(ccmd)
}
default:
cmd.AddCommand(ccmd)
}

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Thanks! Updated it.

@silvin-lubecki

Copy link
Copy Markdown
Contributor

The tests are failing.

@silvin-lubeckisilvin-lubecki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't this PR use docker/cli PR-2095, targeting your own docker/cli fork, so we can review that everything is aligned? And mark this PR as Draft so we won't merge it until the docker/cli PR is merged?

@aiordache
aiordacheforce-pushed the app-214_experimental_validate branch from 1687455 to abd8a98CompareSeptember 23, 2019 11:57
@aiordacheaiordache changed the title Enable 'docker app validate' for experimental mode only[WIP] Enable 'docker app validate' for experimental mode onlySep 24, 2019
@ndeloof

Copy link
Copy Markdown
Contributor

What's the status of this one ? Shall we better close ?

@aiordache

aiordache commented Oct 3, 2019 via email

Copy link
Copy Markdown
ContributorAuthor

@aiordacheaiordache changed the title [WIP] Enable 'docker app validate' for experimental mode only[WIP] APP-214 Enable 'docker app validate' for experimental mode onlyOct 3, 2019
@aiordache
aiordacheforce-pushed the app-214_experimental_validate branch from abd8a98 to 12bac15CompareOctober 3, 2019 10:33
@aiordache
aiordacheforce-pushed the app-214_experimental_validate branch 5 times, most recently from 0abfed5 to 807c3caCompareNovember 8, 2019 16:55
@aiordache
aiordacheforce-pushed the app-214_experimental_validate branch from 807c3ca to 9635037CompareNovember 12, 2019 09:06
@codecov

codecovBot commented Nov 12, 2019

Copy link
Copy Markdown

Codecov Report

Merging #625 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@ Coverage Diff @@## master #625 +/- ##
==========================================
- Coverage 69.3% 69.28% -0.02% 
==========================================
Files 63 63 Lines 3388 3396 +8 ==========================================
+ Hits 2348 2353 +5 - Misses 731 733 +2 - Partials 309 310 +1
Impacted FilesCoverage Δ
internal/commands/validate.go75% <100%> (+0.8%)⬆️
internal/commands/root.go74.69% <100%> (+2.33%)⬆️
types/parameters/parameters.go92.06% <0%> (-4.77%)⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e0989c...ed930a8. Read the comment docs.

Comment threadGopkg.toml
[[override]]
name = "github.com/Microsoft/hcsshim"
revision = "2226e083fc390003ae5aa8325c3c92789afa0e7a"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: empty line

@silvin-lubeckisilvin-lubecki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Anca Iordache added 2 commits November 12, 2019 13:38
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
@aiordache
aiordacheforce-pushed the app-214_experimental_validate branch from 9635037 to ed930a8CompareNovember 12, 2019 12:49
@aiordache
aiordache requested a review from rumplNovember 12, 2019 13:25
@rumpl
rumpl merged commit aeb12c0 into docker-archive-public:masterNov 12, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@aiordache@thaJeztah@silvin-lubecki@ndeloof@rumpl@GordonTheTurtle