Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: implement feature to support template version while creating workspace using cli#14880

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
matifali merged 3 commits intocoder:mainfromjoobisb:issue#14860
Oct 11, 2024

Conversation

joobisb
Copy link
Contributor

@joobisbjoobisb commentedSep 30, 2024
edited by matifali
Loading

This PRcloses#14860

@cdr-botcdr-botbot added the communityPull Requests and issues created by the community. labelSep 30, 2024
@joobisbjoobisb changed the titlefeat: implement feature to support specifying template version while creating workspace using clifeat: implement feature to support template version while creating workspace using cliSep 30, 2024
Comment on lines +207 to +211
version, err := client.TemplateVersionByName(inv.Context(), template.ID, templateVersion)
if err != nil {
return xerrors.Errorf("get template version by name: %w", err)
}
templateVersionID = version.ID
Copy link
Member

Choose a reason for hiding this comment

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

This unfortunately does not accept the template version uuid. It would be better if the name or uuid worked.

We should fix this in the route handler imo:https://github.com/coder/coder/blob/main/coderd/templateversions.go#L885-L885

Not needed in this PR.

joobisb reacted with thumbs up emoji
Comment on lines +146 to +148
version2 := coderdtest.CreateTemplateVersion(t, client, owner.OrganizationID, completeWithAgent(), func(ctvr *codersdk.CreateTemplateVersionRequest) {
ctvr.TemplateID = template.ID
})
Copy link
Member

Choose a reason for hiding this comment

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

Addcoderdtest.AwaitTemplateVersionJobCompleted(t, client, version2.ID) after creating the version. Otherwise we get a race condition in some tests.

Suggested change
version2:=coderdtest.CreateTemplateVersion(t,client,owner.OrganizationID,completeWithAgent(),func(ctvr*codersdk.CreateTemplateVersionRequest) {
ctvr.TemplateID=template.ID
})
version2:=coderdtest.CreateTemplateVersion(t,client,owner.OrganizationID,completeWithAgent(),func(ctvr*codersdk.CreateTemplateVersionRequest) {
ctvr.TemplateID=template.ID
})
coderdtest.AwaitTemplateVersionJobCompleted(t,client,version2.ID)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

got it, I've updated the test

Copy link
Member

@EmyrkEmyrk left a comment

Choose a reason for hiding this comment

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

When tests are passing, I will approve and merge 👍

joobisb reacted with thumbs up emoji
@joobisbjoobisb requested a review fromEmyrkOctober 3, 2024 19:06
@joobisb
Copy link
ContributorAuthor

When tests are passing, I will approve and merge 👍

@Emyrk the tests are passing, can we merge this ?

@matifalimatifali merged commit1914490 intocoder:mainOct 11, 2024
27 checks passed
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 11, 2024
@joobisbjoobisb deleted the issue#14860 branchNovember 22, 2024 19:05
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@EmyrkEmyrkEmyrk approved these changes

Assignees

@joobisbjoobisb

Labels
communityPull Requests and issues created by the community.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

coder create does not support specifying template version
3 participants
@joobisb@Emyrk@matifali

[8]ページ先頭

©2009-2025 Movatter.jp