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(kuma-cp): make zone insight context independent from parent #6909

Merged
merged 3 commits into from
Jun 2, 2023

Conversation

lukidzi
Copy link
Contributor

@lukidzi lukidzi commented Jun 1, 2023

When we are using parent context and the stream is canceled function responsible for flushing stats to the database is also canceled and fails. We need a separate context that still can flush data after the parent context is closed but the stream is not fully destroyed. That happens when using pgx and postgres. I am not sure if this is the best way to fix it.

  • Link to relevant issue as well as docs and UI issues --
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Tests (Unit test, E2E tests, manual test on universal and k8s) --
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? --
  • Do you need to explicitly set a > Changelog: entry here or add a ci/ label to run fewer/more tests?

When we are using parent context and the stream is cancelled function
responsible for flusing stats to the database is also cancelled and fails.
We need a separate context that still can flush data after parent context
is closed but stream not full destroy.

Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
@lukidzi lukidzi changed the title fix(kuma-cp): make zone sync context independent from parent fix(kuma-cp): make zone insight context independent from parent Jun 2, 2023
@lukidzi lukidzi marked this pull request as ready for review June 2, 2023 07:40
@lukidzi lukidzi requested review from a team, jakubdyszkiewicz and lobkovilya and removed request for a team June 2, 2023 07:40
Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz left a comment

Choose a reason for hiding this comment

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

Let's try to add E2E test to resilience_multizone_universal_postgres.go

…us to offline immediately

Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
@lukidzi lukidzi enabled auto-merge (squash) June 2, 2023 13:47
@lukidzi lukidzi merged commit d80be85 into kumahq:master Jun 2, 2023
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