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

Update for https://github.com/containers/image/pull/1299 + update tests #15662

Merged
merged 2 commits into from
Oct 14, 2022

Conversation

mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented Sep 6, 2022

Does this PR introduce a user-facing change?

None

Update c/image from a WIP containers/image#1299:

  • to eventually benefit from the better error messages
  • for now, to exercise that PR to find issues, if any
  • for now, to see if any Podman tests need adjusting.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 6, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mtrmac

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 6, 2022
@vrothberg
Copy link
Member

Green and happy tests ✔️

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 10, 2022
@openshift-merge-robot openshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 10, 2022
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 15, 2022
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 23, 2022
@openshift-merge-robot openshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 26, 2022
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 30, 2022
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 9, 2022
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 10, 2022
@mtrmac mtrmac changed the title DO NOT MERGE: Add UNMERGED https://github.com/containers/image/pull/1299 Update for https://github.com/containers/image/pull/1299 + update tests Oct 12, 2022
@mtrmac
Copy link
Collaborator Author

mtrmac commented Oct 12, 2022

c/image has now been updated, and vendoring that will break Podman tests.

So, please review/merge this PR, so that Podman tests match c/image and future vendor dances don’t stumble on the test failures.

@rhatdan
Copy link
Member

rhatdan commented Oct 13, 2022

/lgtm
/hold

@openshift-ci openshift-ci bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Oct 13, 2022
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.

Probably needs a manual rebase.

@rhatdan
Copy link
Member

rhatdan commented Oct 13, 2022

@mtrmac please rebase and repush so we can merge.

@@ -180,7 +180,7 @@ EOF
run_podman 125 push --authfile=$authfile \
--tls-verify=false $IMAGE \
localhost:${PODMAN_LOGIN_REGISTRY_PORT}/badpush:1
is "$output" ".*: unauthorized: authentication required" \
is "$output" ".*: authentication required" \
Copy link
Member

Choose a reason for hiding this comment

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

I find the new error message ("checking whether blah blah") less helpful - I think "unauthorized" was a nice useful part of the message. But anyhow, since you need to repush, could you include the "checking" part?

    is "$output" ".* checking whether a blob .* exists in localhost:${PODMAN_LOGIN_REGISTRY_PORT}/badpush: authentication required"

Reason: just plain "authentication required" is a little too generic for my tastes; it could come from other places in the code, and mask a real error. The tighter our checks, the more comfortable I feel. (And, yes, the cost is that slight error-message changes, like this one, are a hassle. I think that's a Good Thing. I don't think error messages should change often).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good idea, updated the expected error text.


(Pedantically, “unauthorized” is not quite correct. This is “the user needs to log in — and after log in, the operation might well be authorized”. That’s, supposedly, different from “the user is logged in and not allowed to do this”, which now fails with requested access to the resource is denied (and previously denied: requested …).

Now, seeing how real-world registries implement the error reporting part of the spec, I have no hope of expecting these finer distinctions to be correctly distinguished.)


containers/image#1299 basically sets the precedent that whatever the Go error, even if it comes from a third-party library, we can and sometimes do, override the user-visible text. So improving the user-visible text in various situations is very much on the table — but it’s fairly unbounded in scope and I have other WIP work, so I’d like to leave that for someone to else to lead.

> go get github.com/containers/image/v5@main
> make vendor

Signed-off-by: Miloslav Trmač <[email protected]>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 13, 2022
@rhatdan
Copy link
Member

rhatdan commented Oct 14, 2022

/lgtm
/hold cancel

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Oct 14, 2022
@openshift-merge-robot openshift-merge-robot merged commit 8656ffa into containers:main Oct 14, 2022
@mtrmac mtrmac deleted the c-image-errors branch October 17, 2022 14:14
@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 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 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. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants