Skip to content

core: honor context while waiting for reauthentication - #3939

Merged
stephenfin merged 1 commit into
gophercloud:mainfrom
rm-you:fix/context-aware-reauth
Aug 16, 2026
Merged

stephenfin merged 1 commit into
gophercloud:mainfrom
rm-you:fix/context-aware-reauth

Conversation

@rm-you

@rm-you rm-you commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3922

A request waiting for another goroutine's reauthentication ignores its context and can remain blocked past its deadline. This change lets the waiter return ctx.Err() without interrupting the active reauthentication.

ErrErrorAfterReauthentication now unwraps the retried request error, allowing ResponseCodeIs to detect status codes such as 404.

Links to the line numbers/files in the OpenStack source code that support the code in this PR:

N/A. This changes client-side synchronization and error handling.

@github-actions github-actions Bot added the edit:gophercloud This PR updates common Gophercloud code label Aug 12, 2026
@rm-you
rm-you force-pushed the fix/context-aware-reauth branch from a2477f3 to 1fb4f74 Compare August 12, 2026 06:30
@rm-you rm-you changed the title [wip] Fix context-aware reauthentication waits [wip] core: honor context while waiting for reauthentication Aug 12, 2026
@rm-you rm-you changed the title [wip] core: honor context while waiting for reauthentication core: honor context while waiting for reauthentication Aug 12, 2026
@rm-you
rm-you marked this pull request as ready for review August 12, 2026 06:44
@github-actions github-actions Bot added semver:minor Backwards-compatible change backport-v2 This PR will be backported to v2 labels Aug 13, 2026
@coveralls

coveralls commented Aug 13, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 63.557% (+0.01%) from 63.544% — rm-you:fix/context-aware-reauth into gophercloud:main

@stephenfin stephenfin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks pretty good. Couple of comments/questions inline before I sign off though

Comment thread provider_client.go Outdated
Comment thread provider_client.go
Comment thread provider_client.go
@rm-you
rm-you force-pushed the fix/context-aware-reauth branch from 1fb4f74 to f2a09ac Compare August 13, 2026 20:38
@stephenfin
stephenfin enabled auto-merge August 14, 2026 14:01
@stephenfin
stephenfin added this pull request to the merge queue Aug 16, 2026
Merged via the queue into gophercloud:main with commit e3c7083 Aug 16, 2026
70 checks passed
@rm-you

rm-you commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

So now we need to backport to v2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v2 This PR will be backported to v2 edit:gophercloud This PR updates common Gophercloud code semver:minor Backwards-compatible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

core: reauthentication waits ignore context cancellation

4 participants