-
Notifications
You must be signed in to change notification settings - Fork 146
Send the initialized notification on a worker thread #1734
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
Conversation
This comment has been minimized.
This comment has been minimized.
Hm I think the legacy HTTP/SSE transport uses an event loop thread too. I'll check it again tomorrow |
edb621b
to
50c7071
Compare
IIUC for the legacy transport it uses an event loop but doesn't block it. We use a RestEasy Reactive client which takes care of it internally. In Streamable HTTP, we directly use vert.x apis so we need to move to a worker thread manually, which is what this PR does. |
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.
Thanks!
I would also be nice to have tests for stuff like this at some point
There's no API that allows to easily hook into this and see what thread is executing. Is there any more general way for tests how to detect event loop blocking? |
Not that I am aware of |
This comment has been minimized.
This comment has been minimized.
Seems like CI is not happy about the new Guardrails @edeandrea. I wonder why CI in the PR was green and it's just failing after the merge... |
Yeah the likely explanation for that is... #1731 was merged after it, but it wasn't rebased after merging the guardrails work. And there is apparently some kind of conflict between these two (not from a git perspective, but from functionality perspective) |
So the way to avoid these surprises would be to always make sure everything is fully rebased before merging. |
That's the thing, it was theoretically rebased... |
Nope, if you look at the 1.4 upgrade branch from Mario: https://github.com/mariofusco/quarkus-langchain4j/commits/lc4j-140/ |
Anyway either @mariofusco or @edeandrea should look into how to fix it :) |
Thanks for the clarification, @jmartisk , about why it works with the SSE transport |
The guardrails branch was fully rebased against main before merging. The branch itself built fine on CI and locally. It also contained everything in the 1.4 branch, so something merged after it is causing the issue. |
The 1.4 PR doesn't show guardrails because it was merged before the guardrails PR. Then that created a big mess on the guardrails branch, which I fixed and got everything green again before it was merged. |
@mariofusco can you please take a look? |
AFAICT, guardrails was the last thing that was merged and IIUC, it was not rebased onto the |
In any case, this is my fault for not being proactive enough about monitoring these two changes closely enough |
Right, I swapped the order of these two PRs in my explanation by error (the 1.4 upgrade was first, guardrails second) but the general explanation stays the same - the latter one (guardrails) wasn't fully rebased on top of the previous one (1.4) @edeandrea already deleted his guardrails branch so it's hard to check, but I'm looking at the logs of the CI (of the guardrails PR) and it says (in the
And |
The only way to avoid this is to really require PRs to be 'serializable' in the sense that you have to run the CI AND merge the PR only after it is fully rebased, and after every merge, every open PR has to be rebased and have its CI run again. |
Yeah, I know, but I don't want to go down that route unless necessary. This could have easily been prevented had I been more diligent (in my defense, I was dealing with the IBM stuff). |
BTW thanks a lot @jmartisk for digging into the git history and the CI logs! |
It's an interesting experience, so far I'd only theorized that it may happen, but now I finally saw it in practice :) |
I have seen it happen in the past, but it's always perplexing and it doesn't happen often (which is why I would like to avoid adding extra process) |
Does I know I could look for myself, but I'm in transit for the next several hours and am browsing on my phone. |
No, it does not |
Ok I'll get on it. It might not be until later today/tonight until I can start looking at it. I'm in transit without wifi until I get to my hotel later. |
Thanks! @mariofusco is taking a quick look now, but if it's not trivial, we'll need your input whenever you can check. This isn't time critical, but I do hope to do a |
We definitely don't want to rebase |
I actually think I can do this easily in a short period of time with some git-foo (all on a phone) :) |
What I meant was I took my guardrails branch and rebased |
All I can say is try it and let's see what happens |
its saying that |
@mariofusco just opened #1738 |
Ahh nevermind the merge commit is ahead but the content is before. |
Please rebase this onto the latest |
50c7071
to
2c1ec0d
Compare
Thanks everyone! Sorry for all the hoopla! |
Np, thanks for the collaboration everyone! |
This comment has been minimized.
This comment has been minimized.
Status for workflow
|
Fixes #1730