Skip to content

chore: always use new codepath over deprecated #14050

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 6 commits into from
Jul 30, 2024

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Jul 30, 2024

Do not use deprecated endpoints in tests. Maybe we should keep a legacy test or two?

Copy link

alwaysmeticulous bot commented Jul 30, 2024

✅ Meticulous spotted zero visual differences across 1072 screens tested: view results.

Expected differences? Click here. Last updated for commit ca28cea. This comment will update as new commits are pushed.

@Emyrk Emyrk marked this pull request as ready for review July 30, 2024 03:14
@Emyrk Emyrk requested a review from aslilac July 30, 2024 13:26
Comment on lines +490 to 502
if httpapi.Is404Error(err) {
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
Copy link
Member

Choose a reason for hiding this comment

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

maybe we should actually send a http.StatusNotFound for this then

Copy link
Member Author

Choose a reason for hiding this comment

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

Since it the request is trying to create a workspace, I am not sure if a 404 makes much sense to the caller? The error indicates why the request failed, being the template does not exist.

Comment on lines +478 to +479
func (c *Client) CreateWorkspace(ctx context.Context, _ uuid.UUID, user string, request CreateWorkspaceRequest) (Workspace, error) {
return c.CreateUserWorkspace(ctx, user, request)
Copy link
Member

Choose a reason for hiding this comment

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

nice approach!

@Emyrk Emyrk force-pushed the stevenmasley/post-workspace-by-user branch from a583cd5 to 005dcd3 Compare July 30, 2024 14:48
@Emyrk Emyrk merged commit 708557d into post-workspace-by-user Jul 30, 2024
30 checks passed
@Emyrk Emyrk deleted the stevenmasley/post-workspace-by-user branch July 30, 2024 15:19
@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2024
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.

2 participants