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

Add a EventTypeAutoCreateAsync method #7098

Closed
Cali0707 opened this issue Jul 18, 2023 · 2 comments · Fixed by #7709
Closed

Add a EventTypeAutoCreateAsync method #7098

Cali0707 opened this issue Jul 18, 2023 · 2 comments · Fixed by #7709
Assignees
Labels
kind/feature-request triage/accepted Issues which should be fixed (post-triage)

Comments

@Cali0707
Copy link
Member

Problem
Currently, all the event type auto creation calls are blocking, increasing the end to end latency in the system. We should move these calls to being async in a separate goroutine.

I investigated this and ran into issues with the context being provided to the EventTypeAutoCreate function: even if you copy the context, when a parent context is cancelled the child is cancelled too. As far as I can see, there are two main approaches to solving this:

  1. Create our own implementation of the context interface which supports a new context without the parent cancelling it
  2. Wait until we have upgraded to go 1.21+ and use the context.WithoutCancel method which was recently added.

I think approach 2 is best, and we should aim to tackle this after upgrading our go version in the future.

Persona:
Which persona is this feature for?

Exit Criteria
A unit test showing that the event type is created in a non-blocking way

Time Estimate (optional):
1

Additional context (optional)
Add any other context about the feature request here.

@pierDipi
Copy link
Member

@matzew @dsimansk what do you think about this?

@pierDipi pierDipi added the triage/accepted Issues which should be fixed (post-triage) label Jul 20, 2023
@dsimansk
Copy link
Contributor

dsimansk commented Aug 10, 2023

I like the #2 option. Go 1.21 is just of the door now. IMO it's possible to upgrade for next or next+1 release.

I'd probably try to aim this enhancement to the Beta graduation/enabled by default phase. Once we got some feedback for the eventtype-auto-create from the field.

@Cali0707 Cali0707 self-assigned this Feb 20, 2024
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Event Discovery Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature-request triage/accepted Issues which should be fixed (post-triage)
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants