Skip to content

chore(codersdk/workspacesdk): make dialer fail fast for authnz errors - #19173

Merged
ethanndickson merged 2 commits into
mainfrom
ethan/dialer-fail-fast-authnz
Aug 5, 2025
Merged

ethanndickson merged 2 commits into
mainfrom
ethan/dialer-fail-fast-authnz

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Aug 5, 2025 •

Copy link
Copy Markdown
Member

Closes #18599.

The linked issue was created due to me assuming the dialer didn't fail fast at all. In reality, it does fail fast, but only for a select few status codes. Auth[n|z] errors aren't any of those status codes, despite being 'permanent' in the same way a 400 is.
This PR makes 401* and 403 'permanent' errors, meaning the dialer will give up immediately after receiving them from coderd.

*One reason to receive a 401 is when the supplied resume_token is invalid. These are not permanent errors, and when we encounter those the dialer will retain the existing behaviour of unsetting the resume token and retrying.

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ethanndickson ethanndickson changed the title chore: make workspace sdk dialer fail fast for authnz errors chore(codersdk/workspacesdk): make dialer fail fast for authnz errors Aug 5, 2025
@ethanndickson
ethanndickson marked this pull request as ready for review August 5, 2025 02:15
@ethanndickson
ethanndickson force-pushed the ethan/dialer-fail-fast-authnz branch from 080e6f0 to 72b8701 Compare August 5, 2025 03:40
Comment thread codersdk/workspacesdk/dialer.go Resolved
@ethanndickson
ethanndickson merged commit 8b66a5a into main Aug 5, 2025
@ethanndickson
ethanndickson deleted the ethan/dialer-fail-fast-authnz branch August 5, 2025 07:52
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Initial coordination dial in Coder Desktop should fail fast

2 participants