openshift / aws-account-operator

Operator to manage pool of AWS accounts for Hive
Apache License 2.0
32 stars 75 forks source link

Don't wait for accounts to succeed if they are missing permissions to complete operation in the first place #600

Closed ArielLima closed 3 years ago

ArielLima commented 3 years ago

This piece of code causes a client without permission to attempt region initialization multiple times even though it is not possible. This PR will simply raise the error up to a higher level where the account can be put into an error state.

This should be merged after https://github.com/openshift/aws-account-operator/pull/599 which is the PR that will actually fail accounts on failure to initialize a given region.

Card: https://issues.redhat.com/browse/OSD-7431

ArielLima commented 3 years ago

/hold

ArielLima commented 3 years ago

/hold cancel

openshift-ci[bot] commented 3 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ArielLima, dkeohane, lisa

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: - ~~[OWNERS](https://github.com/openshift/aws-account-operator/blob/master/OWNERS)~~ [lisa] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
codecov-commenter commented 3 years ago

Codecov Report

Merging #600 (375df51) into master (10022be) will increase coverage by 11.61%. The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #600       +/-   ##
===========================================
+ Coverage   13.16%   24.77%   +11.61%     
===========================================
  Files          45       46        +1     
  Lines        3912     5263     +1351     
===========================================
+ Hits          515     1304      +789     
- Misses       3374     3869      +495     
- Partials       23       90       +67     
Impacted Files Coverage Δ
pkg/controller/account/account_controller.go 10.11% <0.00%> (+9.78%) :arrow_up:
pkg/controller/account/ec2.go 0.00% <0.00%> (ø)
pkg/apis/scheme/scheme.go 60.00% <0.00%> (-3.64%) :arrow_down:
pkg/localmetrics/localmetrics.go 52.01% <0.00%> (-1.45%) :arrow_down:
pkg/apis/aws/v1alpha1/account_types.go 89.39% <0.00%> (-1.09%) :arrow_down:
pkg/apis/apis.go 100.00% <0.00%> (ø)
cmd/manager/main.go 0.00% <0.00%> (ø)
pkg/awsclient/tags.go 0.00% <0.00%> (ø)
pkg/awsclient/client.go 0.00% <0.00%> (ø)
pkg/controller/controller.go 0.00% <0.00%> (ø)
... and 38 more