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
Use an options object for GCS credentials #15663
Conversation
Hi @adshmh. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@stevekuznetsov I limited the scope to the credentials file for the first draft, but it may be possible to factor out all |
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.
Two small comments
prow/flagutil/storage.go
Outdated
type StorageClientOptions struct { | ||
// The following are used for reading/writing to GCS. | ||
GCSCredentialsFile string | ||
GCSOptionDescription string |
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.
nit: why is this public, or stored? couldn't we store a closure to bind onto a flagset or at least store the description as a private member?
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.
Thank you for the review. Fixed.
prow/flagutil/storage.go
Outdated
if o.GCSCredentialsFile != "" { | ||
gcsMessage = fmt.Sprintf(" gcs-credentials-file: %s", o.GCSCredentialsFile) | ||
} | ||
return opener, fmt.Errorf("error creating opener%s: %w", gcsMessage, err) |
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.
s/%w/%v
?
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.
Thanks for the review. Done.
6817b48
to
8901fd4
Compare
I was just looking into doing this, anyway this can be re-reviewed @stevekuznetsov? Thanks! /ok-to-test |
8901fd4
to
2aefc9e
Compare
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2aefc9e
to
8227e6b
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adshmh, stevekuznetsov 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 |
Part of work on #13084