-
Notifications
You must be signed in to change notification settings - Fork 887
feat: add cli support for --require-active-version #10337
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
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.
LGTM, with a few suggestions/FYIs inline. I don't need to review again before merge
build, err = client.CreateWorkspaceBuild(ctx, workspace.ID, req) | ||
// It's possible for a workspace build to fail due to the template requiring starting | ||
// workspaces with the active version. | ||
if cerr, ok := codersdk.AsError(err); ok && cerr.StatusCode() == http.StatusUnauthorized { |
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.
Whoops. This should have been 403 Forbidden, not 401 Unauthorized. Despite the name, 401 is for when we failed to authenticate the user. Probably shouldn't change it now, though.
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.
Yeah that's fair I'll update it in a separate PR
coder start
.fixes #7481