-
Notifications
You must be signed in to change notification settings - Fork 202
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
Fix login/logout for docker.io/vendor #763
Fix login/logout for docker.io/vendor #763
Conversation
67bae5d
to
d7b2c92
Compare
d7b2c92
to
d1f0293
Compare
Relying on login/logout tests in Podman , running in containers/podman#11538, for at least a smoke-test. |
d1f0293
to
49c1707
Compare
Signed-off-by: Sascha Grunert <[email protected]> Signed-off-by: Miloslav Trmač <[email protected]>
Signed-off-by: Miloslav Trmač <[email protected]>
Signed-off-by: Miloslav Trmač <[email protected]>
Signed-off-by: Miloslav Trmač <[email protected]>
Make the test fully table-driven now. Signed-off-by: Miloslav Trmač <[email protected]>
The caller shouldn't care anyway. Signed-off-by: Miloslav Trmač <[email protected]>
Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
Only test opts.All once instead of three times. Don't even start worrying about key/registry with --all. Signed-off-by: Miloslav Trmač <[email protected]>
This avoids duplication and non-obvious interactions (where "!= 0" means "== 1"), and is more similar to Login. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
This allows looking up namespace credentials by GetCredentials, and fixes GetAllCredentials to normalize the returned keys. Signed-off-by: Miloslav Trmač <[email protected]>
We can now call GetCredentials with namespaced keys, so simplify. The ref value is still computed, we'll remove that momentarily. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
... and instead primarily use the string key. This allows using a docker.io/vendor namespace. Also rename parseRegistryArgument to parseCredentialsKey, the argument is not just a registry. Signed-off-by: Miloslav Trmač <[email protected]>
49c1707
to
f083242
Compare
The c/image infrastructure was merged, so this is ready for review. |
/approve |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mtrmac, rhatdan, vrothberg 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 |
This is an alternative to #757
, depends on UNMERGED containers/image#1373.Now that
GetCredentials
allows looking up namespaced credentials, use that instead ofGetCredentialsForRef
, which avoids thedocker.io/vendor
→docker.io/library/vendor
normalization issue; use reference parsing only to validate the syntax.Also refactor a bit of the argument length handling and
logout --all
.See individual commit messages for details.
Warning: Only unit-tested, and the actual functionality does not have test coverage. I didn’t actually try this in practice.