Skip to content

feat: add template setting to require active template version #10277

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 32 commits into from
Oct 18, 2023

Conversation

sreya
Copy link
Collaborator

@sreya sreya commented Oct 15, 2023

This PR adds the backend plumbing to support enforcing workspaces use the active template version when buildling.

This setting does not apply to template admins

fixes #7466

@sreya sreya force-pushed the jon/templateversion branch from 7b0bf6d to 508a84d Compare October 15, 2023 23:22
@sreya sreya requested a review from spikecurtis October 16, 2023 00:30
@sreya sreya requested a review from spikecurtis October 18, 2023 06:05
Copy link
Contributor

@spikecurtis spikecurtis left a comment

Choose a reason for hiding this comment

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

Couple nits in the comments, but I don't need to review again; LGTM

req := codersdk.CreateWorkspaceBuildRequest{
// TODO (JonA): I get this is for convenience but we should probably
// change this. Tripped me up why my test was passing when it shouldn't
// have.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't really understand this comment --- change how?

Copy link
Collaborator Author

@sreya sreya Oct 18, 2023

Choose a reason for hiding this comment

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

Currently the behavior when calling MustTransitionWorkspace is to submit a workspace build with the template's active version as opposed to the the workspace's template version. That's kinda at odds with how it behaves in production.

@sreya sreya merged commit 997493d into main Oct 18, 2023
@sreya sreya deleted the jon/templateversion branch October 18, 2023 22:07
@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2023
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.

template setting allowing/disabling version selection
2 participants