Skip to content

Commit

Permalink
Merge pull request #4296 from nojnhuh/revert-aso-reconcile
Browse files Browse the repository at this point in the history
Revert "workaround ASO swallowing updates into ongoing operations"
  • Loading branch information
k8s-ci-robot authored Nov 21, 2023
2 parents 8017657 + 017b036 commit a23d888
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 1 addition & 5 deletions azure/services/aso/aso.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,11 @@ func (r *reconciler[T]) CreateOrUpdateResource(ctx context.Context, spec azure.A
// update instead of returning early.
adopt = true
case cond.Reason == conditions.ReasonReconciling.Name:
// Updating the spec of an ASO resource that is already being updated will swallow this update
// and ignore it until the next periodic ASO resync.
// ref: https://github.com/Azure/azure-service-operator/issues/3451
err := azure.NewOperationNotDoneError(&infrav1.Future{
readyErr = azure.NewOperationNotDoneError(&infrav1.Future{
Type: createOrUpdateFutureType,
ResourceGroup: existing.GetNamespace(),
Name: existing.GetName(),
})
return zero, azure.WithTransientError(err, requeueInterval)
default:
readyErr = fmt.Errorf("resource is not Ready: %s", conds[i].Message)
}
Expand Down
4 changes: 4 additions & 0 deletions azure/services/aso/aso_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ func TestCreateOrUpdateResource(t *testing.T) {
Namespace: "namespace",
},
})
specMock.EXPECT().Parameters(gomockinternal.AContext(), gomock.Not(gomock.Nil())).DoAndReturn(func(_ context.Context, group *asoresourcesv1.ResourceGroup) (*asoresourcesv1.ResourceGroup, error) {
return group, nil
})
specMock.EXPECT().WasManaged(gomock.Any()).Return(false)

ctx := context.Background()
g.Expect(c.Create(ctx, &asoresourcesv1.ResourceGroup{
Expand Down

0 comments on commit a23d888

Please sign in to comment.