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

LCOW: CLI changes to add platform flag - pull, run, create and build #474

Merged
merged 1 commit into from Nov 7, 2017

Conversation

@jhowardmsft
Contributor

jhowardmsft commented Aug 27, 2017

Signed-off-by: John Howard jhoward@microsoft.com

Replacement for #416. This adds the CLI flag changes to match those described in moby/moby#34617, and PR'd to moby/moby in moby/moby#34642.

It adds --platform to pull, run, create, and build. Note import requires further daemon changes so has not been done yet (will be in a further PR once the daemon has been updated).

Show outdated Hide outdated cli/command/commands/commands.go
Show outdated Hide outdated cli/command/container/run.go
Show outdated Hide outdated cli/command/container/run.go
Show outdated Hide outdated cli/command/image/cmd.go
Show outdated Hide outdated cli/command/image/trust.go
@jhowardmsft

This comment has been minimized.

Show comment
Hide comment
@jhowardmsft

jhowardmsft Sep 19, 2017

Contributor

Rebased and reworked based on moby/moby#34642 and addressed most of the comments. Still a work in progress until 34642 is merged in moby/moby as the vendoring will remain hacked.

Contributor

jhowardmsft commented Sep 19, 2017

Rebased and reworked based on moby/moby#34642 and addressed most of the comments. Still a work in progress until 34642 is merged in moby/moby as the vendoring will remain hacked.

@jhowardmsft jhowardmsft changed the title from [WIP] - Pending moby/moby - LCOW: CLI changes to add platform flag. to LCOW: CLI changes to add platform flag - pull, run, create and build Oct 30, 2017

@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Oct 30, 2017

Codecov Report

Merging #474 into master will decrease coverage by 0.55%.
The diff coverage is 45.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #474      +/-   ##
==========================================
- Coverage    50.1%   49.54%   -0.56%     
==========================================
  Files         216      211       -5     
  Lines       17700    17480     -220     
==========================================
- Hits         8868     8661     -207     
+ Misses       8388     8386       -2     
+ Partials      444      433      -11
Impacted Files Coverage Δ
cli/command/container/run.go 0% <0%> (ø) ⬆️
cli/command/utils.go 0% <0%> (ø) ⬆️
cli/command/image/build.go 41.64% <100%> (+0.3%) ⬆️
cli/command/container/create.go 45.39% <50%> (+0.05%) ⬆️
cli/command/image/trust.go 21.78% <50%> (ø) ⬆️
cli/command/image/pull.go 77.08% <75%> (+0.99%) ⬆️
cli/compose/convert/service.go 35.41% <0%> (-1.69%) ⬇️
cli/compose/loader/loader.go 82.03% <0%> (-0.11%) ⬇️
cli/command/trust/cmd.go 0% <0%> (ø) ⬆️
cli/trust/trust.go 10% <0%> (ø) ⬆️
... and 11 more

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 1dc89aa...d8b7825. Read the comment docs.

codecov-io commented Oct 30, 2017

Codecov Report

Merging #474 into master will decrease coverage by 0.55%.
The diff coverage is 45.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #474      +/-   ##
==========================================
- Coverage    50.1%   49.54%   -0.56%     
==========================================
  Files         216      211       -5     
  Lines       17700    17480     -220     
==========================================
- Hits         8868     8661     -207     
+ Misses       8388     8386       -2     
+ Partials      444      433      -11
Impacted Files Coverage Δ
cli/command/container/run.go 0% <0%> (ø) ⬆️
cli/command/utils.go 0% <0%> (ø) ⬆️
cli/command/image/build.go 41.64% <100%> (+0.3%) ⬆️
cli/command/container/create.go 45.39% <50%> (+0.05%) ⬆️
cli/command/image/trust.go 21.78% <50%> (ø) ⬆️
cli/command/image/pull.go 77.08% <75%> (+0.99%) ⬆️
cli/compose/convert/service.go 35.41% <0%> (-1.69%) ⬇️
cli/compose/loader/loader.go 82.03% <0%> (-0.11%) ⬇️
cli/command/trust/cmd.go 0% <0%> (ø) ⬆️
cli/trust/trust.go 10% <0%> (ø) ⬆️
... and 11 more

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 1dc89aa...d8b7825. Read the comment docs.

@jhowardmsft

This comment has been minimized.

Show comment
Hide comment
@jhowardmsft

jhowardmsft Oct 30, 2017

Contributor

Rebased to address conflicts, and reworked to use two utility functions rather than replicate the same code in a few places.

Ready for review, removed WIP from the title, updated the commit comment and the description of the PR. @vdemeester can this be moved to code review now?

Contributor

jhowardmsft commented Oct 30, 2017

Rebased to address conflicts, and reworked to use two utility functions rather than replicate the same code in a few places.

Ready for review, removed WIP from the title, updated the commit comment and the description of the PR. @vdemeester can this be moved to code review now?

@jhowardmsft

This comment has been minimized.

Show comment
Hide comment
@jhowardmsft

jhowardmsft Oct 30, 2017

Contributor

@johnstep PTAL too. Thanks.

Contributor

jhowardmsft commented Oct 30, 2017

@johnstep PTAL too. Thanks.

@dnephin

Design LGTM

I still think we should hide this flag when the list of supported platforms returned by the API has a length of 1.

That would be handled by adding another field to ServerInfo in cli/command/cli.go, and calling a new function fromhideUnsupportedFeatures()incmd/docker/docker.go`.

Show outdated Hide outdated cli/command/utils.go
@dnephin

LGTM

@johnstep

This comment has been minimized.

Show comment
Hide comment
@johnstep

johnstep Oct 31, 2017

Contributor

This should probably be hidden for a daemon without experimental.

Contributor

johnstep commented Oct 31, 2017

This should probably be hidden for a daemon without experimental.

LCOW: Add `--platform=` CLI flag to pull/create/run/build
Signed-off-by: John Howard <jhoward@microsoft.com>

This is the CLI updates for the document discussed in moby/moby#34617
to support Linux Containers on Windows. It adds --platform= as CLI flags to the four
commands listed above. Import still to be completed (needs daemon changes).
@jhowardmsft

This comment has been minimized.

Show comment
Hide comment
@jhowardmsft

jhowardmsft Oct 31, 2017

Contributor

@johnstep - OK, added that annotation in utils.go::AddPlatformFlag() and verified it operates as expected.

Contributor

jhowardmsft commented Oct 31, 2017

@johnstep - OK, added that annotation in utils.go::AddPlatformFlag() and verified it operates as expected.

@johnstep

LGTM

@jhowardmsft

This comment has been minimized.

Show comment
Hide comment
@jhowardmsft

jhowardmsft Nov 3, 2017

Contributor

Is this OK to merge with 2 LGTM's?

Contributor

jhowardmsft commented Nov 3, 2017

Is this OK to merge with 2 LGTM's?

@vdemeester

LGTM 🐮

@vdemeester vdemeester requested a review from thaJeztah Nov 7, 2017

@thaJeztah

LGTM

@thaJeztah thaJeztah merged commit 042575a into docker:master Nov 7, 2017

7 of 9 checks passed

codecov/patch 45.45% of diff hit (target 50.1%)
Details
codecov/project 49.54% (-0.56%) compared to 1dc89aa
Details
ci/circleci: cross Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: shellcheck Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
ci/circleci: validate Your tests passed on CircleCI!
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
dco-signed All commits are signed

@GordonTheTurtle GordonTheTurtle added this to the 17.12.0 milestone Nov 7, 2017

@jhowardmsft jhowardmsft deleted the jhowardmsft:jjh/apis-for-platform branch Nov 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment