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

Fixes #12063 Add docker compatible output after image build. #12091

Merged
merged 1 commit into from
Dec 14, 2021

Conversation

ananthb
Copy link
Contributor

@ananthb ananthb commented Oct 25, 2021

What this PR does / why we need it:

Adds docker compatible output after an image is built.

How to verify it

Building against podman and docker should offer compatible output.

Which issue(s) this PR fixes:

Fixes #12063

Special notes for your reviewer:

@rhatdan
Copy link
Member

rhatdan commented Oct 25, 2021

Thanks @ananthb
You need to either add a test or add the [NO NEW TESTS NEEDED] flag.
@nalind @flouthoc PTAL

@rhatdan
Copy link
Member

rhatdan commented Oct 25, 2021

@jwhonce PTAL

@flouthoc
Copy link
Collaborator

@ananthb Few doubts and comment

Overall LGTM ( could we add a test ? )

@ananthb
Copy link
Contributor Author

ananthb commented Oct 26, 2021

@flouthoc

  • Will add aux to the original message itself.
  • If we do need it at every stage, then that would be a change in buildah right?

@flouthoc
Copy link
Collaborator

flouthoc commented Oct 26, 2021

If we do need it at every stage, then that would be a change in buildah right?

@ananthb I am not sure if we need this I just raised concern cause i saw it in the output. Personally i don't think it should break SDK but this is just an assumption. @stac47 Could you please confirm if this is needed.

@stac47
Copy link

stac47 commented Oct 27, 2021

On my side, I am only interested in the final built image id. So this fix will fit my needs and to confirm @flouthoc message it will not break the docker SDK.
But, personally, I would try to reproduce the exact behaviour of Docker so I would emit the aux/ID on every stage. Some users might be interested in all the intermediate image ids (I don't why but it is something that you can achieve with the Docker SDK).

@ananthb
Copy link
Contributor Author

ananthb commented Nov 1, 2021

So @flouthoc if we must print per stage ids, then that's a change in buildah. Podman doesn't get that info from buildah currently, so we'd have to figure out a way of passing that over.

@flouthoc
Copy link
Collaborator

flouthoc commented Nov 1, 2021

@ananthb Since @stac47 confirmed that it does not breaks SDK. I think we should be okay without it as of now.
Since change looks synthetic and ratio of effort : value does not makes lot of sense. I think we should proceed without it.

PR looks good to me. I'd request adding a test and would also request @jwhonce to give a quick glimpse since its an API output change.

@ananthb
Copy link
Contributor Author

ananthb commented Nov 5, 2021

@flouthoc where would I add a test for this? Would test/system/ dir work?

@flouthoc
Copy link
Collaborator

flouthoc commented Nov 6, 2021

@ananthb It should go here and test should be restricted to remote only. There are other tests which are restricted to remote-only for help. https://github.com/containers/podman/blob/main/test/e2e/build_test.go

@vrothberg vrothberg added the In Progress This issue is actively being worked by the assignee, please do not work on this at this time. label Nov 17, 2021
@vrothberg
Copy link
Member

Friendly ping.

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

rhatdan commented Nov 17, 2021

@ananthb Still working on this?

@ananthb
Copy link
Contributor Author

ananthb commented Nov 18, 2021

@rhatdan yep I'll have tests up in a day or two.

@ananthb ananthb force-pushed the docker-api-compat branch 2 times, most recently from 8ced5e1 to 3f4af5a Compare November 22, 2021 13:09
@ananthb
Copy link
Contributor Author

ananthb commented Nov 23, 2021

@flouthoc the HTTP API response isn't available in the podman test session. How do I read that in my test?

@flouthoc
Copy link
Collaborator

@ananthb where are you checking that ? it should be available but anyways the first thing your tests are failing because of a different error. It should be FROM scratch not FROM SCRATCH in tests. Could you fix that please.

@flouthoc
Copy link
Collaborator

@ananthb You can get API output from a similar test like specified here https://github.com/containers/podman/blob/main/test/apiv2/10-images.at . But I think you can drop checking API output and just add a test where build is successful for podman-remote

@ananthb
Copy link
Contributor Author

ananthb commented Dec 1, 2021

@flouthoc am I reading the test output right? It looks like some other test failed.

@flouthoc
Copy link
Collaborator

flouthoc commented Dec 2, 2021

@ananthb LGTM. Could you please squash the commit , there are two additional commit for a single test.

test/e2e/build_test.go Outdated Show resolved Hide resolved
test/e2e/build_test.go Outdated Show resolved Hide resolved
@rhatdan
Copy link
Member

rhatdan commented Dec 13, 2021

/lgtm
/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 13, 2021
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 13, 2021
@edsantiago edsantiago removed the lgtm Indicates that a PR is ready to be merged. label Dec 13, 2021
test/apiv2/10-images.at Outdated Show resolved Hide resolved
@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 14, 2021
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 14, 2021
@ananthb ananthb requested a review from edsantiago December 14, 2021 12:49
Copy link
Member

@edsantiago edsantiago left a comment

Choose a reason for hiding this comment

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

Major concerns with the tests. I'm still looking into them, trying to understand the problems, but for now I'm afraid I need to ask for changes and clarification. I'm sorry not to have caught these earlier.

test/e2e/build_test.go Outdated Show resolved Hide resolved
test/apiv2/10-images.at Outdated Show resolved Hide resolved
test/apiv2/10-images.at Outdated Show resolved Hide resolved
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 14, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ananthb, edsantiago, flouthoc, rhatdan

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:
  • OWNERS [edsantiago,flouthoc,rhatdan]

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

@edsantiago
Copy link
Member

/lgtm

Thank you @ananthb !

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 14, 2021
@edsantiago edsantiago removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 14, 2021
@openshift-merge-robot openshift-merge-robot merged commit e4e2152 into containers:main Dec 14, 2021
@ananthb ananthb deleted the docker-api-compat branch December 15, 2021 04:10
@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. In Progress This issue is actively being worked by the assignee, please do not work on this at this time. 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.

Podman/Docker API mismatch: cannot get the image ID
8 participants