Skip to content

Respect request context when wating for picker to initialize - #89

Merged
jhump merged 3 commits into
bufbuild:mainfrom
andersroos:ar/respect-context-when-wating-for-picker-init
May 5, 2026
Merged

jhump merged 3 commits into
bufbuild:mainfrom
andersroos:ar/respect-context-when-wating-for-picker-init

Conversation

@andersroos

Copy link
Copy Markdown
Contributor

If the transport pool doesn't get properly initialized a http requests will hang forever. This prevents this by respecting the context. It will improve the failure mode so it doesn't accumulate goroutines and eventually prevents other parts from working.

@CLAassistant

CLAassistant commented May 5, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@jhump jhump left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This change makes sense! But did you actually encounter a situation where the picker could never initialize and requests hang forever? Is that indicative of another bug regarding the picker never initializing (or potentially a doc improvement or other UX improvement to prevent such issues)?

Comment thread transport.go Resolved

@jhump jhump left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'll go ahead and merge, but I would appreciate add'l input on how you came across this -- both to understand if there are any other sharp edges we can file down in the API or behavior but also to get a more clear idea of how a repro test could be formulated as a follow-up to this change.

@andersroos

andersroos commented May 5, 2026 •

Copy link
Copy Markdown
Contributor Author

This change makes sense! But did you actually encounter a situation where the picker could never initialize and requests hang forever? Is that indicative of another bug regarding the picker never initializing (or potentially a doc improvement or other UX improvement to prevent such issues)?

Yes I did, and it was caused by a bug in our codebase that make it be used before it was properly initialized. It was considerably harder to find because it hung insead of returning an error.

I guess this could potentially be fixed in a better way by returning another error up front when it isn't intialized? But I am not that familiar with the code base, so not sure what to do. This felt like a much less intrusive fix.

Co-authored-by: Joshua Humphries <2035234+jhump@users.noreply.github.com>
@jhump jhump changed the title fix: respect context when wating for picker init respect request context when wating for picker to initialize May 5, 2026
Comment thread transport.go Resolved
@jhump
jhump enabled auto-merge (squash) May 5, 2026 14:05
@jhump jhump changed the title respect request context when wating for picker to initialize Respect request context when wating for picker to initialize May 5, 2026
@jhump
jhump disabled auto-merge May 5, 2026 14:07
@jhump
jhump enabled auto-merge (squash) May 5, 2026 14:07
@jhump
jhump disabled auto-merge May 5, 2026 14:07
@jhump
jhump enabled auto-merge (squash) May 5, 2026 14:08
@jhump
jhump merged commit bb7e282 into bufbuild:main May 5, 2026
4 of 5 checks passed
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.

3 participants