-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Conversation
[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 |
273bf86
to
0648300
Compare
Green and happy tests ✔️ |
0648300
to
b421500
Compare
b421500
to
853f9a5
Compare
853f9a5
to
da692df
Compare
da692df
to
2725a05
Compare
2725a05
to
6ba1ad3
Compare
6ba1ad3
to
81242db
Compare
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. |
/lgtm |
There was a problem hiding this 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.
@mtrmac please rebase and repush so we can merge. |
test/system/150-login.bats
Outdated
@@ -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" \ |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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]>
08c08a9
to
c59437d
Compare
Signed-off-by: Miloslav Trmač <[email protected]>
c59437d
to
33858c1
Compare
/lgtm |
Does this PR introduce a user-facing change?
Update c/image from a WIP containers/image#1299: