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

tests: do not run TestGatewayWithGatewayClassReconciliation in parallel #6650

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Nov 8, 2024

What this PR does / why we need it:

Noticed a test flake in https://github.com/Kong/kubernetes-ingress-controller/actions/runs/11743313279/job/32715990610

This actually makes sense:

The unmanaged gateways are given an annotation konghq.com/publish-service when discovered first time. Afterwards, only those matching the annotation will get reconciled.

Since we're running those tests (and thus Gateway reconcilers) in parallel, all those reconcilers running can "claim" the unmanaged gateway and thus cause the test to fail.

This PR proposed to not run the tests in parallel. An alternative would be to use the manager options to only watch a concrete namespace.

      controller.go:64: 2024-11-08T13:53:14Z	debug	Gathering the gateway publish service	{"GatewayV1Gateway": {"name":"f2d6318c-d4b3-4ec3-8693-d0f7cb82fdd6","namespace":"3450d550-ad4d-43de-954b-d4e0588ef6f2"}, "namespace": "3450d550-ad4d-43de-954b-d4e0588ef6f2", "name": "f2d6318c-d4b3-4ec3-8693-d0f7cb82fdd6"}
      controller.go:64: 2024-11-08T13:53:14Z	debug	Determining service for ref	{"ref": "4e6204d2-f1b8-4271-add6-4665e71083fe/publish-svc"}
      controller.go:64: 2024-11-08T13:53:14Z	error	One of publish services defined in Gateway's "konghq.com/publish-service" annotation didn't match controller manager's configuration	{"GatewayV1Gateway": {"name":"f2d6318c-d4b3-4ec3-8693-d0f7cb82fdd6","namespace":"3450d550-ad4d-43de-954b-d4e0588ef6f2"}, "namespace": "3450d550-ad4d-43de-954b-d4e0588ef6f2", "name": "f2d6318c-d4b3-4ec3-8693-d0f7cb82fdd6", "service": "4e6204d2-f1b8-4271-add6-4665e71083fe/publish-svc", "error": "publish service reference \"4e6204d2-f1b8-4271-add6-4665e71083fe/publish-svc\" from Gateway's annotations did not match configured controller manager's publish services (\"3450d550-ad4d-43de-954b-d4e0588ef6f2/publish-svc\")"}
      controller.go:64: 2024-11-08T13:53:14Z	error	Reconciler error	{"reconcileID": "0d599a51-02bf-4c5a-8ae5-e082d2fda86e", "error": "publish service reference \"4e6204d2-f1b8-4271-add6-4665e71083fe/publish-svc\" from Gateway's annotations did not match configured controller manager's publish services (\"3450d550-ad4d-43de-954b-d4e0588ef6f2/publish-svc\")"}

@pmalek pmalek added this to the KIC v3.4.x milestone Nov 8, 2024
@pmalek pmalek self-assigned this Nov 8, 2024
Copy link

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.0%. Comparing base (030db71) to head (99b66ce).
Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #6650     +/-   ##
=======================================
+ Coverage   72.2%   79.0%   +6.8%     
=======================================
  Files        202     201      -1     
  Lines      25817   23761   -2056     
=======================================
+ Hits       18643   18780    +137     
+ Misses      6159    4018   -2141     
+ Partials    1015     963     -52     

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant