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.1%. Comparing base (61a1f60) to head (d32f6c2).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #6650     +/-   ##
=======================================
+ Coverage   77.7%   79.1%   +1.3%     
=======================================
  Files        203     204      +1     
  Lines      23836   23903     +67     
=======================================
+ Hits       18534   18919    +385     
+ Misses      4351    4022    -329     
- Partials     951     962     +11     

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


🚨 Try these New Features:

@pmalek pmalek force-pushed the test-envtest-gatewayclass-reconciliation branch from 99b66ce to fcb8cd5 Compare November 18, 2024 11:22
@pmalek pmalek force-pushed the test-envtest-gatewayclass-reconciliation branch from fcb8cd5 to d32f6c2 Compare November 19, 2024 14:17
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