-
Notifications
You must be signed in to change notification settings - Fork 430
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
[release-1.11] ASO: Return readyErr over not done err when tags fail #4380
[release-1.11] ASO: Return readyErr over not done err when tags fail #4380
Conversation
@@ -155,6 +155,9 @@ func (s *Service) CreateOrUpdateResource(ctx context.Context, spec azure.ASOReso | |||
|
|||
if t, ok := spec.(TagsGetterSetter); ok { | |||
if err := reconcileTags(t, existing, parameters); err != nil { | |||
if azure.IsOperationNotDoneError(err) && readyErr != nil { | |||
return nil, readyErr |
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.
This line was the cause for the merge conflict, so this changes zero
to nil
from the original PR to account for the generics changes that were introduced for 1.12.
/retitle [release-1.11] ASO: Return readyErr over not done err when tags fail |
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.
/lgtm
LGTM label has been added. Git tree hash: 46da547f3847eed612ce6720c5d169354200f56d
|
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mboersma 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 |
d6ed634
to
7bf55a1
Compare
@@ -65,6 +65,8 @@ func New(ctrlClient client.Client, clusterName string) *Service { | |||
|
|||
// CreateOrUpdateResource implements the logic for creating a new or updating an | |||
// existing resource with ASO. | |||
// | |||
//nolint:gocyclo // This function is necessarily complex. |
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.
:(
I've looked before for any low-hanging fruit to split any decent-sized chunk of this into its own function, but there's enough shared state generated within this function that I think any new helper function would end up taking a lot of random-looking parameters and return a lot of random-looking values.
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.
@mboersma @CecileRobertMichon Had to drop the lgtm to add this change, PTAL.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release-1.11 #4380 +/- ##
================================================
+ Coverage 56.70% 56.71% +0.01%
================================================
Files 187 187
Lines 19222 19224 +2
================================================
+ Hits 10899 10903 +4
+ Misses 7693 7691 -2
Partials 630 630 ☔ View full report in Codecov by Sentry. |
/lgtm |
LGTM label has been added. Git tree hash: 3a62a63753a75ff5f40ae4324be336b2749832d0
|
What type of PR is this?
/kind bug
What this PR does / why we need it:
Manual cherry-pick of #4371:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
TODOs:
Release note: