Suggest login on pull denial#33005
Conversation
There was a problem hiding this comment.
we should check if not found is used for the HTTP status code that's returned by the API (there's some ugly string-matching in a couple of locations)
There was a problem hiding this comment.
thanks - I looked through image_routes.go on the engine side, and image_create.go and image_pull.go on the cli side, as well as some general grepping & digging, and didn't discover anything that was matching on the existing error message.
There was a problem hiding this comment.
let me know if there are other places I should look!
There was a problem hiding this comment.
The nasty matching is here;
moby/api/server/httputils/errors.go
Lines 56 to 68 in 6486924
5e0b5b0 to
64940cd
Compare
|
hm, looks like it needs changes in |
Support new error message returned for image creation in: moby/moby#33005 Signed-off-by: Alfred Landrum <[email protected]>
|
thanks @thaJeztah for pointing me in the right direction. Opened this PR on docker-py: docker/docker-py#1590 . |
|
@thaJeztah - now that docker/docker-py#1590 is merged, do I need to adjust the moby/moby source at all? |
|
@alfred-landrum yes, I think the |
|
looks like there is some string matching going on, will investigate |
|
I believe the remaining CI errors are unrelated to this change. |
There was a problem hiding this comment.
Please don't add this here. This is a really bad pattern we're trying to remove.
I think the right way to handle this is to have TranslatePullError() return a specific error, and then translate that error into a StatusNotFound in the api/server/router/ function for pull
There was a problem hiding this comment.
I'm sad we merged this PR without addressing this problem.
thaJeztah
left a comment
There was a problem hiding this comment.
changes LGTM (although we really need to find a different approach for the error handling)
can you squash the first and last commit?
9c31fbe to
4349f4c
Compare
|
@thaJeztah - commits squashed; there's a single non-related test failure. |
|
docker-py on experimental fails: |
254aede to
580354d
Compare
|
I updated the docker-py bump to docker/docker-py@2bdaf7f to get the xfail on |
580354d to
eee4e3d
Compare
|
I rebased & learned how to run the python integration tests locally; when I did, I didn't see the issue, so have pushed up to see if the experimental test still fails in Jenkins. |
|
Some of the tests seem to be out of date (cc @dnephin ?) |
|
I'm not that familiar with the test. Why do you think they are out of date? Maybe they need to check different things for different API versions? cc @shin- |
|
I answered here: docker/docker-py#1603 (comment) |
|
I thought they were out of date because of this: At least this test seems to be deprecated now. |
|
@mlaventure The apparent issue with this PR is with the image pruning endpoint. The |
eee4e3d to
17a2817
Compare
17a2817 to
af58ff3
Compare
|
merging in the image prune fix from #33409 |
|
#33409 was merged, so this can now be rebased 😅 |
af58ff3 to
a6c24d0
Compare
|
@thaJeztah - the windows test failed to start; would you please trigger a re-test (or tell me how to)? |
|
For reference; docker-py changes; docker/docker-py@4a08d04...0832898 |
a6c24d0 to
e173aaf
Compare
|
💚 at last! @thaJeztah anything else I should do? |
|
@thaJeztah the list is huge ? is it expected ? |
|
@vieux |
Signed-off-by: Alfred Landrum <[email protected]>
e173aaf to
8d9f51e
Compare
|
rebased to get the new docker-py commit in master. |
|
LGTM |
|
It's in! Thanks for your patience, @alfred-landrum 👍 |
- What I did
We've seen a few new users of Docker Store subscriptions see the "no pull access" message when they try to pull content for the first time, as they don't realize they need to login first.
To improve their experience with Store, or any other registry, make the returned error suggest that
docker loginmay be needed.- How to verify it
Use
docker pullwith any non-existent repository, or to a known repository that requires credentials w/o providing them first.- Description for the changelog
Suggest login on pull denial