-
Notifications
You must be signed in to change notification settings - Fork 887
feat: add is_prebuild_claim
to distinguish post-claim provisioning
#17757
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
Signed-off-by: Danny Kopping <dannykopping@gmail.com>
Signed-off-by: Danny Kopping <dannykopping@gmail.com>
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.
I've suggested a different name for the field, but I don't need to review again.
string running_workspace_agent_token = 21; | ||
bool is_prebuild = 20; // Indicates that a prebuilt workspace is being built. | ||
string running_workspace_agent_token = 21; // Preserves the running agent token of a prebuilt workspace so it can reinitialize. | ||
bool is_prebuild_claim = 22; // Indicates that a prebuilt workspace is being claimed. |
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.
bool is_prebuild_claim = 22; // Indicates that a prebuilt workspace is being claimed. | |
bool claims_prebuilt_workspace = 22; // Indicates that a prebuilt workspace is being claimed. |
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.
You're right; I probably shouldn't refer to "prebuild" here.
I'll make it is_prebuilt_workspace_claim
to be similar in form to is_prebuild
, since they're related fields.
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.
You could make them a single enum...
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.
Could work, lemme try it and see how it feels.
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.
@spikecurtis great suggestion, this is more in line with how we do other things like workspace transitions; should've done this from the beginning.
Signed-off-by: Danny Kopping <dannykopping@gmail.com>
Signed-off-by: Danny Kopping <dannykopping@gmail.com>
Signed-off-by: Danny Kopping <dannykopping@gmail.com>
Used in combination with coder/terraform-provider-coder#396
This is required by both #17475 and #17571
Operators may need to conditionalize their templates to perform certain operations once a prebuilt workspace has been claimed. This value will only be set once a claim takes place and a subsequent
terraform apply
occurs. Anyterraform apply
runs thereafter will be indistinguishable from a normal run on a workspace.