Skip to content

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

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

Merged
merged 2 commits into from
Aug 5, 2025

Conversation

ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Aug 5, 2025

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
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
@ethanndickson ethanndickson merged commit 8b66a5a into main Aug 5, 2025
40 checks passed
@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