-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Bug 1684951: pkg/destroy/aws: Use GetSession() to prompt when missing #1365
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
Bug 1684951: pkg/destroy/aws: Use GetSession() to prompt when missing #1365
Conversation
|
I get this output when I run This has two issue that I see.
|
Why would this be different from the
I thought clients were regioned, but the session was global? But yeah, obviously something going on there... |
1c25463 to
72319c7
Compare
Ok, I've rebased onto master with 1c25463d2 -> 72319c7f4, which also adds a |
72319c7 to
bb43966
Compare
Avoid looping forever with [1]:
INFO get tagged resources: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors
and so on for all the other calls. With this commit, I'm allowing
callers to provide their own session, which they can pre-check as they
like.
I'm not adjusting pkg/destroy/aws to use GetSession internally,
because it would drag in a bunch of mostly-unrelated dependencies that
pkg/destroy/aws consumers like Hive [2] won't want. And Hive's
consumer isn't interactive anyway, so our prompting logic would not be
a good fit for them. With this commit, *we* can use our prompting
GetSession without forcing it onto Hive.
[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1684951
[2]: https://github.com/openshift/hive/blob/a9ffb5af700bdc46dab2a880ec8414cd9e99242e/contrib/cmd/hiveutil/awstagdeprovision.go#L24
Issue: https://bugzilla.redhat.com/show_bug.cgi?id=1684951
bb43966 to
419c5a7
Compare
|
All green. @abhinavdahiya, @staebler, can you take another look? |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, wking The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
4 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest |
Avoid looping forever with:
and so on for all the other calls. With this commit, I'm allowing callers to provide their own session, which they can pre-check as they like.
I'm not adjusting
pkg/destroy/awsto useGetSessioninternally, because it would drag in a bunch of mostly-unrelated dependencies thatpkg/destroy/awsconsumers like Hive won't want. And Hive's consumer isn't interactive anyway, so our prompting logic would not be a good fit for them. With this commit, we can use our promptingGetSessionwithout forcing it onto Hive.