-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: append template metadata to protobuf config #20558
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
c3b32a2 to
fa61201
Compare
fa61201 to
d36ffea
Compare
27dc8e3 to
1938cf1
Compare
b7321d6 to
52064b7
Compare
f3493e0 to
60e940f
Compare
52064b7 to
bbf6058
Compare
f798c44 to
67115b1
Compare
johnstcn
left a comment
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.
Protobuf fields LGTM 👍 Some other comments below but nothing blocking.
| // | ||
| // API v1.12: | ||
| // - Added new field `template_version_id` to `provisioner.Metadata` | ||
| // - Added new field `terraform_workspace_reuse` to `provisioner.Job.WorkspaceBuild` | ||
| // - Added fields `template_version_id`, `template_id`, and `terraform_workspace_reuse` to `provisioner.Config` | ||
| const ( | ||
| CurrentMajor = 1 | ||
| CurrentMinor = 11 | ||
| CurrentMinor = 12 |
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.
👍
08880d3 to
b882573
Compare
bbf6058 to
fc6bb0a
Compare
195f4e0 to
88a203b
Compare
| } | ||
|
|
||
| type TemplateVersionImportJob struct { | ||
| // TemplateID is not guaranteed to be set. Template versions can be created |
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.
Template versions can be created without being associated with a template.
Can you elaborate on that?
Do we create an initial template version first then associate it with a template?
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.
Do we create an initial template version first then associate it with a template?
Correct, see cli/templatepush.go for illustration.
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.
Yea, it's been a thorn in my side for a long time that the first template push is an orphaned version 😢
|
TODO: Mark these fields as optional and prefix by |
fc6bb0a to
b88ee78
Compare
6e163e9 to
876150c
Compare
b88ee78 to
e8bf6de
Compare
e8bf6de to
7c8deaf
Compare
876150c to
8ef24ef
Compare
f0bf9eb to
41faf32
Compare
41faf32 to
a5bf278
Compare
a5bf278 to
b074539
Compare

Adds some extra meta data sent to provisioners. Also adds a field
terraform_workspace_reuseto tell the provisioner whether or not to use the caching experiment.For terraform directory reuse, the
template-version-idandtemplate-idis required.These values are used to determine the terraform working directory, and also when to clean up "old" versions. The actual cache cleanup might be changed by GA. This is still an experiment.