@@ -503,7 +503,6 @@ func (r *RootCmd) scaletestCreateWorkspaces() *clibase.Cmd {
503
503
count int64
504
504
template string
505
505
506
- noPlan bool
507
506
noCleanup bool
508
507
// TODO: implement this flag
509
508
// noCleanupFailures bool
@@ -594,10 +593,6 @@ func (r *RootCmd) scaletestCreateWorkspaces() *clibase.Cmd {
594
593
if tpl .ID == uuid .Nil {
595
594
return xerrors .Errorf ("could not find template %q in any organization" , template )
596
595
}
597
- templateVersion , err := client .TemplateVersion (ctx , tpl .ActiveVersionID )
598
- if err != nil {
599
- return xerrors .Errorf ("get template version %q: %w" , tpl .ActiveVersionID , err )
600
- }
601
596
602
597
cliRichParameters , err := asWorkspaceBuildParameters (parameterFlags .richParameters )
603
598
if err != nil {
@@ -607,7 +602,7 @@ func (r *RootCmd) scaletestCreateWorkspaces() *clibase.Cmd {
607
602
richParameters , err := prepWorkspaceBuild (inv , client , prepWorkspaceBuildArgs {
608
603
Action : WorkspaceCreate ,
609
604
Template : tpl ,
610
- NewWorkspaceName : "scaletest-% " , // TODO: the scaletest runner will pass in a different name here. Does this matter?
605
+ NewWorkspaceName : "scaletest-N " , // TODO: the scaletest runner will pass in a different name here. Does this matter?
611
606
612
607
RichParameterFile : parameterFlags .richParameterFile ,
613
608
RichParameters : cliRichParameters ,
@@ -616,35 +611,6 @@ func (r *RootCmd) scaletestCreateWorkspaces() *clibase.Cmd {
616
611
return xerrors .Errorf ("prepare build: %w" , err )
617
612
}
618
613
619
- // Do a dry-run to ensure the template and parameters are valid
620
- // before we start creating users and workspaces.
621
- if ! noPlan {
622
- dryRun , err := client .CreateTemplateVersionDryRun (ctx , templateVersion .ID , codersdk.CreateTemplateVersionDryRunRequest {
623
- WorkspaceName : "scaletest" ,
624
- RichParameterValues : richParameters ,
625
- })
626
- if err != nil {
627
- return xerrors .Errorf ("start dry run workspace creation: %w" , err )
628
- }
629
- _ , _ = fmt .Fprintln (inv .Stdout , "Planning workspace..." )
630
- err = cliui .ProvisionerJob (inv .Context (), inv .Stdout , cliui.ProvisionerJobOptions {
631
- Fetch : func () (codersdk.ProvisionerJob , error ) {
632
- return client .TemplateVersionDryRun (inv .Context (), templateVersion .ID , dryRun .ID )
633
- },
634
- Cancel : func () error {
635
- return client .CancelTemplateVersionDryRun (inv .Context (), templateVersion .ID , dryRun .ID )
636
- },
637
- Logs : func () (<- chan codersdk.ProvisionerJobLog , io.Closer , error ) {
638
- return client .TemplateVersionDryRunLogsAfter (inv .Context (), templateVersion .ID , dryRun .ID , 0 )
639
- },
640
- // Don't show log output for the dry-run unless there's an error.
641
- Silent : true ,
642
- })
643
- if err != nil {
644
- return xerrors .Errorf ("dry-run workspace: %w" , err )
645
- }
646
- }
647
-
648
614
tracerProvider , closeTracing , tracingEnabled , err := tracingFlags .provider (ctx )
649
615
if err != nil {
650
616
return xerrors .Errorf ("create tracer provider: %w" , err )
@@ -793,12 +759,6 @@ func (r *RootCmd) scaletestCreateWorkspaces() *clibase.Cmd {
793
759
Description : "Required: Name or ID of the template to use for workspaces." ,
794
760
Value : clibase .StringOf (& template ),
795
761
},
796
- {
797
- Flag : "no-plan" ,
798
- Env : "CODER_SCALETEST_NO_PLAN" ,
799
- Description : `Skip the dry-run step to plan the workspace creation. This step ensures that the given parameters are valid for the given template.` ,
800
- Value : clibase .BoolOf (& noPlan ),
801
- },
802
762
{
803
763
Flag : "no-cleanup" ,
804
764
Env : "CODER_SCALETEST_NO_CLEANUP" ,
0 commit comments