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

manifest create subcommand should accept more than 2 arguments #10901

Merged

Conversation

rsevilla87
Copy link
Contributor

The current implementation does not allow passing more than one image.

  • Before
$ podman manifest create quay.io/rsevilla/perfapp:manifest-latest2 quay.io/rsevilla/perfapp:latest quay.io/rsevilla/perfapp:arm
Error: accepts between 1 and 2 arg(s), received 3  
  • After:
$ ./bin/podman manifest create quay.io/rsevilla/perfapp:manifest-latest2 quay.io/rsevilla/perfapp:latest quay.io/rsevilla/perfapp:arm
9c55826980e16d0202147e5ea01a191fa95d58a3614173e8a4e3e38cc384a7ae
$ podman manifest inspect quay.io/rsevilla/perfapp:manifest-latest2
{
    "schemaVersion": 2,
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "manifests": [
        {
            "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
            "size": 591,
            "digest": "sha256:9d1a6c94edea56d47a8f08dbe957eae6ae6797847017e6e243d06b424735ddfc",
            "platform": {
                "architecture": "amd64",
                "os": "linux"
            }
        },
        {
            "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
            "size": 591,
            "digest": "sha256:8aec9d12c9033fddcd1840c7bc17b5b5671637e68301334421ce9876a5f2a7d8",
            "platform": {
                "architecture": "arm64",
                "os": "linux"
            }
        }
    ]
}

Signed-off-by: Raul Sevilla [email protected]

@rsevilla87 rsevilla87 force-pushed the manifest-create-args branch 2 times, most recently from d5a02d0 to 92aed07 Compare July 12, 2021 08:27
@rsevilla87 rsevilla87 changed the title manifest create subcommand should accept more than 1 argument manifest create subcommand should accept more than 2 arguments Jul 12, 2021
@rsevilla87 rsevilla87 force-pushed the manifest-create-args branch from 92aed07 to 00db5c6 Compare July 12, 2021 08:29
@mheon
Copy link
Member

mheon commented Jul 12, 2021

@vrothberg PTAL

@rhatdan
Copy link
Member

rhatdan commented Jul 12, 2021

This also better matches Docker behavior.

LGTM
/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 12, 2021
@rhatdan
Copy link
Member

rhatdan commented Jul 12, 2021

Testing is not happy at all, however.

podman manifest create --all mylist:v1.11 transport:tagged-image-to-add`,
Args: cobra.RangeArgs(1, 2),
Args: cobra.MinimumNArgs(1),
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be minimalargs(2)

Copy link
Contributor Author

@rsevilla87 rsevilla87 Jul 13, 2021

Choose a reason for hiding this comment

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

Hey @rhatdan, We currently support creating "empty" manifests, so I think minimalargs(1) is correct.

$ ./bin/podman manifest create mylist:v1.11
a64c46f246df4372ccbf105de02669b123d62fcc2e68dcd055ea9f56a9f05b9

Copy link
Member

Choose a reason for hiding this comment

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

I concur with @rsevilla87 👍

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

To make CI pass, you need to change Use: "create [options] LIST [IMAGE]", to Use: "create [options] LIST [IMAGE...]",

@rsevilla87 rsevilla87 requested review from rhatdan and vrothberg July 13, 2021 18:27
@rhatdan
Copy link
Member

rhatdan commented Jul 13, 2021

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 13, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 13, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan, rsevilla87

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 9d98f56 into containers:main Jul 13, 2021
@rsevilla87 rsevilla87 deleted the manifest-create-args branch July 14, 2021 07:51
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants