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

e2e test case TestKonnectConfigPush fails #6904

Open
1 task done
randmonkey opened this issue Dec 26, 2024 · 1 comment · May be fixed by #6905
Open
1 task done

e2e test case TestKonnectConfigPush fails #6904

randmonkey opened this issue Dec 26, 2024 · 1 comment · May be fixed by #6905
Labels
bug Something isn't working

Comments

@randmonkey
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

From e2e nightly run https://github.com/Kong/kubernetes-ingress-controller/actions/runs/12425611716, e2e test case TestKonnectConfigPush always fails. The test could not find service from Konnect API:

 helpers_test.go:532: Fetched config from "https://us.kic.api.konghq.tech/kic/api/control-planes/****", started at 2024-12-20T04:43:18Z, duration 29.067824ms
    helpers_test.go:541: 0 services found, expected 1

Expected Behavior

Test passes where services could be found on Konnect.

Steps To Reproduce

Run e2e test case TestKonnectConfigPush.

Kong Ingress Controller version

3.4

Kubernetes version

No response

Anything else?

No response

@randmonkey randmonkey added the bug Something isn't working label Dec 26, 2024
@randmonkey
Copy link
Contributor Author

I think the code here may cause client not correctly initialized in Konnect config syncer:

go setupKonnectAdminAPIClientWithClientsMgr(ctx, c.Konnect, clientsManager, setupLog)

When the konnect client is not created before we setup Konnect config syncer, the syncer will receive a nil client and does not have chance to set the correct client:
konnectConfigSynchronizer, err := setupKonnectConfigSynchronizer(
ctx,
mgr,
c.Konnect.UploadConfigPeriod,
kongConfig,
clientsManager,
updateStrategyResolver,
configStatusNotifier,
metricsRecorder,
)

Where setupKonnectConfigSynchronizer uses the konnect client from the client provider to initialize the config syncer
clientsProvider.KonnectClient(),

I changed the syncer to make it use the client got from clientProvider each time when it syncs to Konnect.

@randmonkey randmonkey linked a pull request Dec 27, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant