Skip to content
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(kuma-cp): gateway reconciliation loops forever #4034

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

jakubdyszkiewicz
Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz commented Mar 24, 2022

Summary

Gateway API reconciliation was stuck in a loop (reconciling forever) because GatewayInstance was constantly updated.
We should only update Status of objects if there is any change to the status.

Issues resolved

No issues reported

Documentation

- [ ] Link to the website documentation PR

Testing

  • Unit tests
  • E2E tests
  • Manual testing on Universal
  • Manual testing on Kubernetes

Backwards compatibility

- [ ] Update UPGRADE.md with any steps users will need to take when upgrading.
- [ ] Add backport-to-stable label if the code follows our backporting policy

Changelog: fix(gateway): gateway reconciliation loops forever

@jakubdyszkiewicz jakubdyszkiewicz requested a review from a team as a code owner March 24, 2022 10:59
Copy link
Contributor

@bartsmykla bartsmykla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@codecov-commenter
Copy link

Codecov Report

Merging #4034 (57859ca) into master (57884e6) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #4034      +/-   ##
==========================================
- Coverage   55.98%   55.96%   -0.03%     
==========================================
  Files         919      919              
  Lines       55267    55285      +18     
==========================================
- Hits        30942    30941       -1     
- Misses      21875    21893      +18     
- Partials     2450     2451       +1     
Impacted Files Coverage Δ
...ime/k8s/controllers/gateway_instance_controller.go 0.00% <0.00%> (ø)
...e/k8s/controllers/gatewayapi/gateway_controller.go 0.00% <0.00%> (ø)
...ntime/k8s/controllers/gatewayapi/gateway_status.go 0.00% <0.00%> (ø)
pkg/plugins/runtime/gateway/route/sorter.go 66.66% <0.00%> (-5.13%) ⬇️
pkg/core/resources/model/rest/resource.go 71.60% <0.00%> (-1.24%) ⬇️
pkg/core/resources/manager/cache.go 85.71% <0.00%> (+2.59%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57884e6...57859ca. Read the comment docs.

@jakubdyszkiewicz jakubdyszkiewicz merged commit 961ba79 into master Mar 24, 2022
@jakubdyszkiewicz jakubdyszkiewicz deleted the fix/gateway-reconciliation branch March 24, 2022 11:45
@@ -73,11 +75,14 @@ func (r *GatewayInstanceReconciler) Reconcile(ctx context.Context, req kube_ctrl

updateStatus(gatewayInstance, svc, deployment)

if err := r.Client.Status().Patch(ctx, gatewayInstance, kube_client.MergeFrom(orig)); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the right way to handle this is using SetStatusCondition like in the gatewayapi controllers

michaelbeaumont added a commit to michaelbeaumont/kuma that referenced this pull request Mar 28, 2022
michaelbeaumont added a commit to michaelbeaumont/kuma that referenced this pull request Mar 28, 2022
michaelbeaumont added a commit that referenced this pull request Mar 28, 2022
…on (#4051)

* Revert "fix(kuma-cp): gateway reconciliation loops forever (#4034)"
  This reverts commit 961ba79.
* fix(gateway): fix status updating in MeshGatewayInstance reconciliation
* chore(gateway): add back verbose log for reconcile begin

Signed-off-by: Mike Beaumont <[email protected]>
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Mar 30, 2022
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Mar 30, 2022
…on (kumahq#4051)

* Revert "fix(kuma-cp): gateway reconciliation loops forever (kumahq#4034)"
  This reverts commit 961ba79.
* fix(gateway): fix status updating in MeshGatewayInstance reconciliation
* chore(gateway): add back verbose log for reconcile begin

Signed-off-by: Mike Beaumont <[email protected]>
Signed-off-by: Sally Blich <[email protected]>
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 14, 2022
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 14, 2022
…on (kumahq#4051)

* Revert "fix(kuma-cp): gateway reconciliation loops forever (kumahq#4034)"
  This reverts commit 961ba79.
* fix(gateway): fix status updating in MeshGatewayInstance reconciliation
* chore(gateway): add back verbose log for reconcile begin

Signed-off-by: Mike Beaumont <[email protected]>
Signed-off-by: Sally Blich <[email protected]>
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 14, 2022
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 14, 2022
…on (kumahq#4051)

* Revert "fix(kuma-cp): gateway reconciliation loops forever (kumahq#4034)"
  This reverts commit 961ba79.
* fix(gateway): fix status updating in MeshGatewayInstance reconciliation
* chore(gateway): add back verbose log for reconcile begin

Signed-off-by: Mike Beaumont <[email protected]>
Signed-off-by: Sally Blich <[email protected]>
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 14, 2022
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 14, 2022
…on (kumahq#4051)

* Revert "fix(kuma-cp): gateway reconciliation loops forever (kumahq#4034)"
  This reverts commit 961ba79.
* fix(gateway): fix status updating in MeshGatewayInstance reconciliation
* chore(gateway): add back verbose log for reconcile begin

Signed-off-by: Mike Beaumont <[email protected]>
Signed-off-by: Sally Blich <[email protected]>
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 14, 2022
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 14, 2022
…on (kumahq#4051)

* Revert "fix(kuma-cp): gateway reconciliation loops forever (kumahq#4034)"
  This reverts commit 961ba79.
* fix(gateway): fix status updating in MeshGatewayInstance reconciliation
* chore(gateway): add back verbose log for reconcile begin

Signed-off-by: Mike Beaumont <[email protected]>
Signed-off-by: Sally Blich <[email protected]>
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 14, 2022
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 14, 2022
…on (kumahq#4051)

* Revert "fix(kuma-cp): gateway reconciliation loops forever (kumahq#4034)"
  This reverts commit 961ba79.
* fix(gateway): fix status updating in MeshGatewayInstance reconciliation
* chore(gateway): add back verbose log for reconcile begin

Signed-off-by: Mike Beaumont <[email protected]>
Signed-off-by: Sally Blich <[email protected]>
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 14, 2022
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 14, 2022
…on (kumahq#4051)

* Revert "fix(kuma-cp): gateway reconciliation loops forever (kumahq#4034)"
  This reverts commit 961ba79.
* fix(gateway): fix status updating in MeshGatewayInstance reconciliation
* chore(gateway): add back verbose log for reconcile begin

Signed-off-by: Mike Beaumont <[email protected]>
Signed-off-by: Sally Blich <[email protected]>
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 20, 2022
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 20, 2022
…on (kumahq#4051)

* Revert "fix(kuma-cp): gateway reconciliation loops forever (kumahq#4034)"
  This reverts commit 961ba79.
* fix(gateway): fix status updating in MeshGatewayInstance reconciliation
* chore(gateway): add back verbose log for reconcile begin

Signed-off-by: Mike Beaumont <[email protected]>
Signed-off-by: Sally Blich <[email protected]>
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 21, 2022
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 21, 2022
…on (kumahq#4051)

* Revert "fix(kuma-cp): gateway reconciliation loops forever (kumahq#4034)"
  This reverts commit 961ba79.
* fix(gateway): fix status updating in MeshGatewayInstance reconciliation
* chore(gateway): add back verbose log for reconcile begin

Signed-off-by: Mike Beaumont <[email protected]>
Signed-off-by: Sally Blich <[email protected]>
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 21, 2022
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 21, 2022
…on (kumahq#4051)

* Revert "fix(kuma-cp): gateway reconciliation loops forever (kumahq#4034)"
  This reverts commit 961ba79.
* fix(gateway): fix status updating in MeshGatewayInstance reconciliation
* chore(gateway): add back verbose log for reconcile begin

Signed-off-by: Mike Beaumont <[email protected]>
Signed-off-by: Sally Blich <[email protected]>
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 21, 2022
SallyBlichWalkMe pushed a commit to SallyBlichWalkMe/kuma that referenced this pull request Apr 21, 2022
…on (kumahq#4051)

* Revert "fix(kuma-cp): gateway reconciliation loops forever (kumahq#4034)"
  This reverts commit 961ba79.
* fix(gateway): fix status updating in MeshGatewayInstance reconciliation
* chore(gateway): add back verbose log for reconcile begin

Signed-off-by: Mike Beaumont <[email protected]>
Signed-off-by: Sally Blich <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants