fix: Do not send patch request if there's no update on FirewallPolicyRule - #4199
Conversation
94403d7 to
3a072cb
Compare
maqiuyujoyce
left a comment
There was a problem hiding this comment.
/lgtm
Just one question about the scenario test.
| - "10.100.0.1/32" | ||
| priority: 9000 | ||
| --- | ||
| apiVersion: compute.cnrm.cloud.google.com/v1beta1 |
There was a problem hiding this comment.
Have you confirmed that before your change, a PATCH is triggered in this test?
There was a problem hiding this comment.
I added this commit to collect log without this change. I added "TOUCH" test flag to trigger a reconcile and confirmed that PATCH is triggered in the log.
05cc8e0 to
254b53c
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maqiuyujoyce 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 |
| } | ||
| if len(paths) == 0 { | ||
| log.V(2).Info("no field needs update", "name", a.id.String()) | ||
| return nil |
There was a problem hiding this comment.
We should not just return nil here. Instead, we want to call updateOp.UpdateStatus(ctx, status, nil) to make sure the status is updated. This is especially important for first time acquire.
Change description
Fixes b/406862735
Tests you have done
make ready-prto ensure this PR is ready for review.