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

Fixed reconcile running on all KIngress after ksvc deletion #1159

Merged

Conversation

ryutoyasugi
Copy link
Contributor

Why

I found Reconcile running on all KIngress after ksvc was removed.
The same problem has been reported. #941

Changes

Fixed conditions under which resyncConflicts are executed.
https://github.com/knative-extensions/net-kourier/blob/cbd0d74/pkg/reconciler/ingress/ingress.go#L135

Related PR

#502, #486

@knative-prow knative-prow bot requested review from KauzClay and skonto November 20, 2023 09:29
@knative-prow knative-prow bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 20, 2023
Copy link

knative-prow bot commented Nov 20, 2023

Hi @ryutoyasugi. Thanks for your PR.

I'm waiting for a knative-extensions member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow knative-prow bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 20, 2023
Copy link

codecov bot commented Nov 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cbd0d74) 80.81% compared to head (b6b5c9d) 80.81%.
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1159   +/-   ##
=======================================
  Coverage   80.81%   80.81%           
=======================================
  Files          18       18           
  Lines        1392     1392           
=======================================
  Hits         1125     1125           
  Misses        213      213           
  Partials       54       54           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ryutoyasugi ryutoyasugi changed the title Fixed reconcile not running on all KIngress after ksvc deletion Fixed reconcile running on all KIngress after ksvc deletion Nov 20, 2023
// Force reconcile all Kourier ingresses that are either not reconciled yet
// (and thus might end up in a conflict) or already in conflict.
return isKourierIngress(obj) && (lbReady == "" || lbReady == conflictReason)
return isKourierIngress(obj) && (lbReady == nil || lbReady.GetReason() == conflictReason)
Copy link
Contributor

@skonto skonto Dec 1, 2023

Choose a reason for hiding this comment

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

Given that:

func (c *Condition) GetReason() string {
	if c == nil {
		return ""
	}
	return c.Reason
}

Ingresses that have condition(LBReady) that is not nil, do have Reason "" and match all the reconciled ones correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, for successfully working ingresses, the condition(LBReady) is not nil and the Reason is empty.

@skonto
Copy link
Contributor

skonto commented Dec 1, 2023

/ok-to-test

@knative-prow knative-prow bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 1, 2023
@skonto
Copy link
Contributor

skonto commented Dec 5, 2023

I tested it locally with conflicting dms, stamping it.
/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Dec 5, 2023
@skonto
Copy link
Contributor

skonto commented Dec 5, 2023

/cherry-pick release-1.12
/approve

@knative-prow-robot
Copy link

@skonto: once the present PR merges, I will cherry-pick it on top of release-1.12 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.12
/approve

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

knative-prow bot commented Dec 5, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ryutoyasugi, skonto

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 5, 2023
@knative-prow knative-prow bot merged commit aa078b9 into knative-extensions:main Dec 5, 2023
41 checks passed
@knative-prow-robot
Copy link

@skonto: new pull request created: #1170

In response to this:

/cherry-pick release-1.12
/approve

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants