-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
pkg/destroy/aws: Set 'matched' on tag-pagination errors #1129
pkg/destroy/aws: Set 'matched' on tag-pagination errors #1129
Conversation
Fixing a bug from e24c7dc (pkg/destroy/aws: Use the resource-groups service for tag->ARN lookup, 2019-01-10, openshift#1039). Before this commit, we were setting loopError, so we'd still take another pass through the loop. But we weren't setting 'matched', because fetch errors (e.g. because the caller lacked tag:GetResources) would not have returned *any* resources. The deletion code would wrongly assume that there were no matching resources behind that tagClient and remove the client from tagClients. 'Run' would end up exiting non-zero despite having abandoned the resources behind that tagClient. With this commit, we no longer prune the tagClient. And since we don't distinguish between fatal and non-fatal errors, we'll just loop forever until the caller notices the problem and kills us. That's not great, but with permission pre-checks in the pipe via install-time credential operator calls, I don't know if it's worth putting in a fatal/nonfatal distinction now.
3b6f748
to
6a32dcf
Compare
Thanks, I won't LGTM... but LGTM. |
Can error check for Unauthorized help us short-circuit ? |
Yes, but see the last paragraph in my topic post for why I didn't bother ;). Did you want me to bother? |
Also linking #1100, Edit: never mind, #1100 is something else. I head @joelddiaz is working on cred-operator pre-checks. |
/retest |
/retest |
So... close... :p /retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: crawford, wking 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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
8 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 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 Pick up openshift/origin#21867. |
/retest |
/retest |
/retest |
Through f8a946e (Merge pull request openshift#1129 from wking/aws-destroy-tag-search-error-handling, 2019-01-27).
Fixing a bug from e24c7dc (#1039). Before this commit, we were setting
loopError
, so we'd still take another pass through the loop. But we weren't settingmatched
, because fetch errors (e.g. because the caller lackedtag:GetResources
) would not have returned any resources. The deletion code would wrongly assume that there were no matching resources behind thattagClient
and remove the client fromtagClients
.Run
would end up exiting non-zero despite having abandoned the resources behind thattagClient
.With this commit, we no longer prune the
tagClient
. And since we don't distinguish between fatal and non-fatal errors, we'll just loop forever until the caller notices the problem and kills us. That's not great, but with permission pre-checks in the pipe via install-time credential operator calls, I don't know if it's worth putting in a fatal/nonfatal distinction now.CC @dgoodwin