@@ -630,6 +630,7 @@ func (p *Server) runTemplateImportParse(ctx context.Context, provisioner sdkprot
630
630
Level : msgType .Log .Level ,
631
631
CreatedAt : time .Now ().UTC ().UnixMilli (),
632
632
Output : msgType .Log .Output ,
633
+ Stage : "Parse parameters" ,
633
634
}},
634
635
})
635
636
if err != nil {
@@ -651,6 +652,13 @@ func (p *Server) runTemplateImportParse(ctx context.Context, provisioner sdkprot
651
652
// This is used to detect resources that would be provisioned
652
653
// for a workspace in various states.
653
654
func (p * Server ) runTemplateImportProvision (ctx , shutdown context.Context , provisioner sdkproto.DRPCProvisionerClient , job * proto.AcquiredJob , values []* sdkproto.ParameterValue , metadata * sdkproto.Provision_Metadata ) ([]* sdkproto.Resource , error ) {
655
+ var stage string
656
+ switch metadata .WorkspaceTransition {
657
+ case sdkproto .WorkspaceTransition_START :
658
+ stage = "Detecting persistent resources"
659
+ case sdkproto .WorkspaceTransition_STOP :
660
+ stage = "Detecting ephemeral resources"
661
+ }
654
662
stream , err := provisioner .Provision (ctx )
655
663
if err != nil {
656
664
return nil , xerrors .Errorf ("provision: %w" , err )
@@ -704,6 +712,7 @@ func (p *Server) runTemplateImportProvision(ctx, shutdown context.Context, provi
704
712
Level : msgType .Log .Level ,
705
713
CreatedAt : time .Now ().UTC ().UnixMilli (),
706
714
Output : msgType .Log .Output ,
715
+ Stage : stage ,
707
716
}},
708
717
})
709
718
if err != nil {
@@ -808,6 +817,7 @@ func (p *Server) runWorkspaceBuild(ctx, shutdown context.Context, provisioner sd
808
817
Level : msgType .Log .Level ,
809
818
CreatedAt : time .Now ().UTC ().UnixMilli (),
810
819
Output : msgType .Log .Output ,
820
+ Stage : stage ,
811
821
}},
812
822
})
813
823
if err != nil {
0 commit comments