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 binding controller flake #3800

Merged
merged 2 commits into from
Feb 14, 2025
Merged

Conversation

danail-branekov
Copy link
Member

@danail-branekov danail-branekov commented Feb 13, 2025

Is there a related GitHub Issue?

No

What is this change about?

Flake: https://ci.korifi.cf-app.com/teams/main/pipelines/main/jobs/run-tests-periodic/builds/22068

According to failure logs, the service binding is being reconciled
multiple times before the binding gets into its ready state.

This means that if we stub the broker client to return a sync response
on invocation 3 only, it is quite probable that the fake's sync response
is not properly processed and subsequent reconciles still see that the
operation is ongoing.

Therefore, this change alters stubs the broker client to return a sync
response (i.e. override the default async one) when it returns a
succeeded operation

While being here, also fix the order of shutting down the the k8s client cache and manager

Tag your pair, your PM, and/or team

@georgethebeatle @uzabanov

When setting up the env test, we are first starting the client cache,
and then starting the manager. Therefore, tear down should stop those in
the reverse order, i.e. stop the manager first, and then stop the cache.

Not doing that causes weird log messages that the cache is being
stoppped while the test is running, e.g. https://ci.korifi.cf-app.com/teams/main/pipelines/main/jobs/run-tests-periodic/builds/22070#L67a88113:44:47
Flake: https://ci.korifi.cf-app.com/teams/main/pipelines/main/jobs/run-tests-periodic/builds/22068

According to failure logs, the service binding is being reconciled
multiple times before the binding gets into its ready state.

This means that if we stub the broker client to return a sync response
on invocation 3 only, it is quite probable that the fake's sync response
is not properly processed and subsequent reconciles still see that the
operation is ongoing.

Therefore, this change alters stubs the broker client to return a sync
response (i.e. override the default async one) when it returns a
succeeded operation
@danail-branekov danail-branekov force-pushed the fix-binding-controller-flake branch from 1211062 to fea6dd7 Compare February 14, 2025 08:12
@georgethebeatle georgethebeatle merged commit ef841de into main Feb 14, 2025
10 checks passed
@georgethebeatle georgethebeatle deleted the fix-binding-controller-flake branch February 14, 2025 13:30
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.

2 participants