-
Notifications
You must be signed in to change notification settings - Fork 272
fix: Do not send patch request if there's no update on FirewallPolicyRule #4199
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
fix: Do not send patch request if there's no update on FirewallPolicyRule #4199
Conversation
94403d7
to
3a072cb
Compare
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you confirmed that before your change, a PATCH is triggered in this test?
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 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
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
3de3b4e
into
GoogleCloudPlatform:master
} | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
Updated in #4369
Change description
Fixes b/406862735
Tests you have done
make ready-pr
to ensure this PR is ready for review.