-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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(ingest/okta): Removed code closing okta's event_loop #8675
fix(ingest/okta): Removed code closing okta's event_loop #8675
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kinda tricky
I think we should only be closing the event loop if we created it here
event_loop = asyncio.new_event_loop() |
That way, if people run the pipeline using Pipeline.create(...); pipeline.run()
it also works correctly and doesn't leak the event loop
I agree, it's not perfect solution - rather one we used to make |
@hsheth2 What about this commit here FundingCircle@dcd9e0f ? Would this solve the discussion and the issue? |
@sgomezvillamor yeah that looks like it should do the trick |
@hsheth2 may you review and merge this one? |
@sgomezvillamor merged! |
After previous change #8637 okta connector could start but not finish properly, since line closing the event loop caused exception shown below. I am a little bit confused as to why it started failing now as before we run it with
0.9.6.1
version released in January 2023 and everything was fine - even thoughevent_loop
code was present both iningestor_cli.py
andokta
ingestor. My conclusion is that this change done a month ago might have caused the issue to appear:4fb77e4#diff-97f18760199a7ea8722507b31d24f6520b4c1bbf9145d3b3ad24748ecfa831adR125
(making the function
async
)What I wonder though is that why nobody else seemed to experience the problem, as it causes the stateful okta ingestor to always fail in environment where I tested it - surely somebody else must be using this connector in the newest version.
This PR removes the line closing the loop and it makes
okta
ingestor finish successfully after ingesting all the data. It definitely makes the code more messy but it seems refactoring here would take quite a while. Let me know what you think about this PR.Checklist