-
Notifications
You must be signed in to change notification settings - Fork 460
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
Simplify auth handling #1768
base: master
Are you sure you want to change the base?
Simplify auth handling #1768
Conversation
The `auth` string can be empty and will be omitted during serialization in that case. We also extend the credential parsing error message to slightly more information. Signed-off-by: Sascha Grunert <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: saschagrunert 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 |
} | ||
|
||
return nil, nil | ||
return &pb.AuthConfig{Auth: auth}, nil |
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.
hm, this will result in a different path here: https://github.com/containerd/containerd/blob/59c8cf6ea5f4175ad512914dd5ce554942bf144f/internal/cri/server/images/image_pull.go#L103
Or serialization of empty object will result in nil
?
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.
Yes this should result in an empty object.
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.
so will the comparison with nil
be true for an empty object? I worried that the behavior of a pull will change as contianerd seems to take some host auth if nil was passed.
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.
@mikebrow do you know this part?
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
The
auth
string can be empty and will be omitted during serialization in that case. We also extend the credential parsing error message to slightly more information.Which issue(s) this PR fixes:
None
Special notes for your reviewer:
None
Does this PR introduce a user-facing change?