Skip to content

[WIP] Add manifest subcommand#5266

Closed
sjug wants to merge 3 commits into
containers:masterfrom
sjug:add_manifest
Closed

[WIP] Add manifest subcommand#5266
sjug wants to merge 3 commits into
containers:masterfrom
sjug:add_manifest

Conversation

@sjug
Copy link
Copy Markdown
Contributor

@sjug sjug commented Feb 19, 2020

Working towards #713.
Requires #5253.

Took a swing at breaking out the manifests monolith from buildah.
Quite a bit different implementation of the commands compared to podman GetRuntime() etc.

How much did you want to bring over from buildah vs refactor?
Do we want to lift getStore() from buildah to make it work as is?

I would appreciate some suggestions.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 19, 2020
@sjug sjug requested a review from rhatdan February 19, 2020 16:06
@openshift-ci-robot openshift-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 19, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Collaborator

Hi @sjug. Thanks for your PR.

I'm waiting for a containers member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sjug
To complete the pull request process, please assign mheon
You can assign the PR to them by writing /assign @mheon in a comment when ready.

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

Details 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

@mheon
Copy link
Copy Markdown
Member

mheon commented Feb 19, 2020

We can't use the Buildah store methods directly as they won't respect libpod.conf; will probably need to move some of this into pkg/image

@rhatdan
Copy link
Copy Markdown
Member

rhatdan commented Feb 21, 2020

@sjug First you need to sign your PRs to make the tests run.
It is fine to share as code with Buildah, we already do this for podman build and option parsing.
The question is, could we do the same for manifest options, so we don't end up with the options in two places.
Is there anything we could do with Buildah to make it easier to vendor manifests into podman.

@sjug sjug force-pushed the add_manifest branch 2 times, most recently from b536e40 to 3f39a0c Compare February 24, 2020 15:16
@openshift-ci-robot openshift-ci-robot added size/XL and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 24, 2020
@openshift-ci-robot openshift-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL labels Feb 24, 2020
Signed-off-by: Sebastian Jug <seb@stianj.ug>
sjug added 2 commits February 24, 2020 11:04
Signed-off-by: Sebastian Jug <seb@stianj.ug>
Signed-off-by: Sebastian Jug <seb@stianj.ug>
@sjug
Copy link
Copy Markdown
Contributor Author

sjug commented Feb 24, 2020

I've kept the second commit to show how I replaced some key different functions from buildah to see if that's okay. Also the third commit is adding in the buildah/manifest deps.

I'm not sure why I'm failing gating?

store := runtime.GetStore()
systemContext := runtime.SystemContext()

_, listImage, err := util.FindImage(store, "", systemContext, listImageSpec)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we typically would put this content and below into the adapter layer. I think given your not familar with that and we are actively working on it, I'm OK with ignoring that for now and allowing us to clean this up.

store := runtime.GetStore()
systemContext := runtime.SystemContext()

_, listImage, err := util.FindImage(store, "", systemContext, listImageSpec)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we typically use something like runtime.LookupImage (or something close to that.)

@@ -0,0 +1,166 @@
package main
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this command will need to fenced off as a local-only command until we have apiv2 endpoints for this. maybe that should get done now? so that this is a slightly cleaner implementation?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I prefer to defer the endpoints for manifest. We wanted to prevent libpod from importing buildah packages and I believe that's what we had to do.

@baude
Copy link
Copy Markdown
Member

baude commented Mar 3, 2020

needs man pages and bash completion additions to pass gating.

Copy link
Copy Markdown
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.

First round of review looks good. We need tests for that, ideally the same as Buildah.

@nalind PTAL

return errors.New("At least a list image and an image to add must be specified")
case 2:
listImageSpec = args[0]
if listImageSpec == "" {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I prefer leaving these checks to the libraries.

@@ -0,0 +1,166 @@
package main
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I prefer to defer the endpoints for manifest. We wanted to prevent libpod from importing buildah packages and I believe that's what we had to do.

@rhatdan
Copy link
Copy Markdown
Member

rhatdan commented Mar 5, 2020

@vrothberg @sjug We are working on APIV2 for this first and setting up support for it in libpod. Once this happens we can work on the CLI for it. @baude Opened the first PR for APIV2 yesterday.

@rh-atomic-bot
Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #5528) made this pull request unmergeable. Please resolve the merge conflicts.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 18, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Collaborator

@sjug: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@github-actions
Copy link
Copy Markdown

A friendly reminder that this PR had no activity for 30 days.

@rhatdan
Copy link
Copy Markdown
Member

rhatdan commented Apr 18, 2020

@sjug This PR is replaced with #5843

@rhatdan rhatdan closed this Apr 18, 2020
@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 25, 2023
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. stale-pr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants