diff --git a/src/pkg/cli/cd.go b/src/pkg/cli/cd.go index 73e671c78..33f8601de 100644 --- a/src/pkg/cli/cd.go +++ b/src/pkg/cli/cd.go @@ -38,8 +38,8 @@ func CdCommand(ctx context.Context, projectName string, provider client.Provider } } - etag, err := provider.CdCommand(ctx, client.CdCommandRequest{Project: projectName, Command: command, StatesUrl: statesUrl, EventsUrl: eventsUrl}) - if err != nil || etag == "" { + cd, err := provider.CdCommand(ctx, client.CdCommandRequest{Project: projectName, Command: command, StatesUrl: statesUrl, EventsUrl: eventsUrl}) + if err != nil || cd == nil || cd.ETag == "" { return "", err } @@ -57,17 +57,19 @@ func CdCommand(ctx context.Context, projectName string, provider client.Provider case client.CdCommandRefresh: err := putDeploymentAndStack(ctx, provider, fabric, nil, putDeploymentParams{ Action: action, - ETag: etag, + CdId: cd.CdId, + CdType: cd.CdType, + ETag: cd.ETag, + EventsUrl: eventsUrl, ProjectName: projectName, StatesUrl: statesUrl, - EventsUrl: eventsUrl, }) if err != nil { term.Debug("Failed to record deployment:", err) term.Warn("Unable to update deployment history; deployment will proceed anyway.") } } - return etag, nil + return cd.ETag, nil } func deleteSubdomain(ctx context.Context, projectName string, provider client.Provider, fabric client.FabricClient) error { diff --git a/src/pkg/cli/client/byoc/aws/byoc.go b/src/pkg/cli/client/byoc/aws/byoc.go index 6afc00a25..d8a8ac5a1 100644 --- a/src/pkg/cli/client/byoc/aws/byoc.go +++ b/src/pkg/cli/client/byoc/aws/byoc.go @@ -184,15 +184,15 @@ func (b *ByocAws) GetDeploymentStatus(ctx context.Context) (bool, error) { return done, nil } -func (b *ByocAws) Deploy(ctx context.Context, req *client.DeployRequest) (*defangv1.DeployResponse, error) { +func (b *ByocAws) Deploy(ctx context.Context, req *client.DeployRequest) (*client.DeployResponse, error) { return b.deploy(ctx, req, "up") } -func (b *ByocAws) Preview(ctx context.Context, req *client.DeployRequest) (*defangv1.DeployResponse, error) { +func (b *ByocAws) Preview(ctx context.Context, req *client.DeployRequest) (*client.DeployResponse, error) { return b.deploy(ctx, req, "preview") } -func (b *ByocAws) deploy(ctx context.Context, req *client.DeployRequest, cmd string) (*defangv1.DeployResponse, error) { +func (b *ByocAws) deploy(ctx context.Context, req *client.DeployRequest, cmd string) (*client.DeployResponse, error) { cfg, err := b.driver.LoadConfig(ctx) if err != nil { return nil, AnnotateAwsError(err) @@ -292,9 +292,13 @@ func (b *ByocAws) deploy(ctx context.Context, req *client.DeployRequest, cmd str } } - return &defangv1.DeployResponse{ - Services: serviceInfos, // TODO: Should we use the retrieved services instead? - Etag: etag, + return &client.DeployResponse{ + CdType: defangv1.CdType_CD_TYPE_AWS_CODEBUILD_BUILDID, + CdId: *cdBuildId, + DeployResponse: &defangv1.DeployResponse{ + Services: serviceInfos, // TODO: Should we use the retrieved services instead? + Etag: etag, + }, }, nil } @@ -902,9 +906,9 @@ func (b *ByocAws) TearDownCD(ctx context.Context) error { return b.driver.TearDown(ctx) } -func (b *ByocAws) CdCommand(ctx context.Context, req client.CdCommandRequest) (string, error) { +func (b *ByocAws) CdCommand(ctx context.Context, req client.CdCommandRequest) (*client.CdCommandResponse, error) { if err := b.SetUpCD(ctx, false); err != nil { - return "", err + return nil, err } etag := types.NewEtag() cmd := cdCommand{ @@ -916,12 +920,12 @@ func (b *ByocAws) CdCommand(ctx context.Context, req client.CdCommandRequest) (s } cdBuildId, err := b.runCdCommand(ctx, cmd) if err != nil { - return "", AnnotateAwsError(err) + return nil, AnnotateAwsError(err) } b.cdEtag = etag b.cdStart = time.Now() b.cdBuildId = cdBuildId - return etag, nil + return &client.CdCommandResponse{ETag: etag, CdType: defangv1.CdType_CD_TYPE_AWS_CODEBUILD_BUILDID, CdId: *cdBuildId}, nil } func (b *ByocAws) DeleteConfig(ctx context.Context, secrets *defangv1.Secrets) error { diff --git a/src/pkg/cli/client/byoc/baseclient.go b/src/pkg/cli/client/byoc/baseclient.go index ef6158548..058f8cb2c 100644 --- a/src/pkg/cli/client/byoc/baseclient.go +++ b/src/pkg/cli/client/byoc/baseclient.go @@ -28,7 +28,7 @@ func (mp ErrMultipleProjects) Error() string { } type ProjectBackend interface { - CdCommand(context.Context, client.CdCommandRequest) (types.ETag, error) + CdCommand(context.Context, client.CdCommandRequest) (*client.CdCommandResponse, error) CdList(context.Context, bool) (iter.Seq[state.Info], error) GetPrivateDomain(projectName string) string GetProjectUpdate(context.Context, string) (*defangv1.ProjectUpdate, error) diff --git a/src/pkg/cli/client/byoc/do/byoc.go b/src/pkg/cli/client/byoc/do/byoc.go index efe02d769..e23d183e3 100644 --- a/src/pkg/cli/client/byoc/do/byoc.go +++ b/src/pkg/cli/client/byoc/do/byoc.go @@ -133,15 +133,15 @@ func (b *ByocDo) GetProjectUpdate(ctx context.Context, projectName string) (*def return &projUpdate, nil } -func (b *ByocDo) Preview(ctx context.Context, req *client.DeployRequest) (*defangv1.DeployResponse, error) { +func (b *ByocDo) Preview(ctx context.Context, req *client.DeployRequest) (*client.DeployResponse, error) { return b.deploy(ctx, req, "preview") } -func (b *ByocDo) Deploy(ctx context.Context, req *client.DeployRequest) (*defangv1.DeployResponse, error) { +func (b *ByocDo) Deploy(ctx context.Context, req *client.DeployRequest) (*client.DeployResponse, error) { return b.deploy(ctx, req, "up") } -func (b *ByocDo) deploy(ctx context.Context, req *client.DeployRequest, cmd string) (*defangv1.DeployResponse, error) { +func (b *ByocDo) deploy(ctx context.Context, req *client.DeployRequest, cmd string) (*client.DeployResponse, error) { // If multiple Compose files were provided, req.Compose is the merged representation of all the files project, err := compose.LoadFromContent(ctx, req.Compose, "") if err != nil { @@ -205,15 +205,19 @@ func (b *ByocDo) deploy(ctx context.Context, req *client.DeployRequest, cmd stri statesUrl: req.StatesUrl, eventsUrl: req.EventsUrl, } - _, err = b.runCdCommand(ctx, cdCmd) + app, err := b.runCdCommand(ctx, cdCmd) if err != nil { return nil, err } b.cdEtag = etag - return &defangv1.DeployResponse{ - Services: serviceInfos, - Etag: etag, + return &client.DeployResponse{ + DeployResponse: &defangv1.DeployResponse{ + Services: serviceInfos, + Etag: etag, + }, + CdType: defangv1.CdType_CD_TYPE_DO_APPPLATFORM_DEPLOYMENTID, + CdId: app.PendingDeployment.ID, }, nil } @@ -233,9 +237,9 @@ func (b *ByocDo) GetDeploymentStatus(ctx context.Context) (bool, error) { } } -func (b *ByocDo) CdCommand(ctx context.Context, req client.CdCommandRequest) (string, error) { +func (b *ByocDo) CdCommand(ctx context.Context, req client.CdCommandRequest) (*client.CdCommandResponse, error) { if err := b.SetUpCD(ctx, false); err != nil { - return "", err + return nil, err } etag := types.NewEtag() @@ -247,13 +251,17 @@ func (b *ByocDo) CdCommand(ctx context.Context, req client.CdCommandRequest) (st statesUrl: req.StatesUrl, eventsUrl: req.EventsUrl, } - _, err := b.runCdCommand(ctx, cmd) + app, err := b.runCdCommand(ctx, cmd) if err != nil { - return "", err + return nil, err } b.cdEtag = etag - return etag, nil + return &client.CdCommandResponse{ + CdType: defangv1.CdType_CD_TYPE_DO_APPPLATFORM_DEPLOYMENTID, + CdId: app.PendingDeployment.ID, + ETag: etag, + }, nil } func (b *ByocDo) CdList(ctx context.Context, _allRegions bool) (iter.Seq[state.Info], error) { diff --git a/src/pkg/cli/client/byoc/gcp/byoc.go b/src/pkg/cli/client/byoc/gcp/byoc.go index 65d0e268f..d952660dc 100644 --- a/src/pkg/cli/client/byoc/gcp/byoc.go +++ b/src/pkg/cli/client/byoc/gcp/byoc.go @@ -127,7 +127,7 @@ type ByocGcp struct { uploadServiceAccount string delegateDomainZone string - cdExecution string + cdBuildId string } func NewByocProvider(ctx context.Context, tenantName types.TenantLabel, stack string) *ByocGcp { @@ -373,9 +373,9 @@ func (b *ByocGcp) AccountInfo(ctx context.Context) (*client.AccountInfo, error) }, nil } -func (b *ByocGcp) CdCommand(ctx context.Context, req client.CdCommandRequest) (types.ETag, error) { +func (b *ByocGcp) CdCommand(ctx context.Context, req client.CdCommandRequest) (*client.CdCommandResponse, error) { if err := b.SetUpCD(ctx, false); err != nil { - return "", err + return nil, err } etag := types.NewEtag() cmd := cdCommand{ @@ -385,11 +385,15 @@ func (b *ByocGcp) CdCommand(ctx context.Context, req client.CdCommandRequest) (t statesUrl: req.StatesUrl, eventsUrl: req.EventsUrl, } - err := b.runCdCommand(ctx, cmd) // TODO: make domain optional for defang cd + buildId, err := b.runCdCommand(ctx, cmd) // TODO: make domain optional for defang cd if err != nil { - return "", err + return nil, err } - return etag, nil + return &client.CdCommandResponse{ + CdId: buildId, + CdType: defangv1.CdType_CD_TYPE_GCP_CLOUDBUILD_BUILDID, + ETag: etag, + }, nil } type cdCommand struct { @@ -409,11 +413,11 @@ type CloudBuildStep struct { Env []string `yaml:"env,omitempty"` } -func (b *ByocGcp) runCdCommand(ctx context.Context, cmd cdCommand) error { +func (b *ByocGcp) runCdCommand(ctx context.Context, cmd cdCommand) (string, error) { defangStateUrl := `gs://` + b.bucket pulumiBackendKey, pulumiBackendValue, err := byoc.GetPulumiBackend(defangStateUrl) if err != nil { - return err + return "", err } env := map[string]string{ "DEFANG_CD_IMAGE": b.CDImage, // used by down/destroy to schedule cleanup job with the same image @@ -466,7 +470,7 @@ func (b *ByocGcp) runCdCommand(ctx context.Context, cmd cdCommand) error { debugEnv = append(debugEnv, k+"="+v) } if err := byoc.DebugPulumiGolang(ctx, debugEnv, cmd.command...); err != nil { - return err + return "", err } } @@ -483,10 +487,10 @@ func (b *ByocGcp) runCdCommand(ctx context.Context, cmd cdCommand) error { }, }) if err != nil { - return err + return "", err } term.Debugf("Starting CD in cloudbuild at: %v", time.Now().Format(time.RFC3339)) - execution, err := b.driver.RunCloudBuild(ctx, gcp.CloudBuildArgs{ + buildId, err := b.driver.RunCloudBuild(ctx, gcp.CloudBuildArgs{ Steps: string(steps), ServiceAccount: &b.cdServiceAccount, Tags: []string{ @@ -495,11 +499,11 @@ func (b *ByocGcp) runCdCommand(ctx context.Context, cmd cdCommand) error { }, }) if err != nil { - return err + return "", err } - b.cdExecution = execution + b.cdBuildId = buildId - return nil + return buildId, nil } func (b *ByocGcp) CreateUploadURL(ctx context.Context, req *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error) { @@ -516,19 +520,19 @@ func (b *ByocGcp) CreateUploadURL(ctx context.Context, req *defangv1.UploadURLRe } return &defangv1.UploadURLResponse{Url: url}, nil } -func (b *ByocGcp) Deploy(ctx context.Context, req *client.DeployRequest) (*defangv1.DeployResponse, error) { +func (b *ByocGcp) Deploy(ctx context.Context, req *client.DeployRequest) (*client.DeployResponse, error) { return b.deploy(ctx, req, "up") } -func (b *ByocGcp) Preview(ctx context.Context, req *client.DeployRequest) (*defangv1.DeployResponse, error) { +func (b *ByocGcp) Preview(ctx context.Context, req *client.DeployRequest) (*client.DeployResponse, error) { return b.deploy(ctx, req, "preview") } func (b *ByocGcp) GetDeploymentStatus(ctx context.Context) (bool, error) { - return b.driver.GetBuildStatus(ctx, b.cdExecution) + return b.driver.GetBuildStatus(ctx, b.cdBuildId) } -func (b *ByocGcp) deploy(ctx context.Context, req *client.DeployRequest, command string) (*defangv1.DeployResponse, error) { +func (b *ByocGcp) deploy(ctx context.Context, req *client.DeployRequest, command string) (*client.DeployResponse, error) { // If multiple Compose files were provided, req.Compose is the merged representation of all the files project, err := compose.LoadFromContent(ctx, req.Compose, "") if err != nil { @@ -590,11 +594,16 @@ func (b *ByocGcp) deploy(ctx context.Context, req *client.DeployRequest, command statesUrl: req.StatesUrl, eventsUrl: req.EventsUrl, } - if err := b.runCdCommand(ctx, cdCmd); err != nil { + buildId, err := b.runCdCommand(ctx, cdCmd) + if err != nil { return nil, err } - return &defangv1.DeployResponse{Etag: etag, Services: serviceInfos}, nil + return &client.DeployResponse{ + CdId: buildId, + CdType: defangv1.CdType_CD_TYPE_GCP_CLOUDBUILD_BUILDID, + DeployResponse: &defangv1.DeployResponse{Etag: etag, Services: serviceInfos}, + }, nil } func (b *ByocGcp) Subscribe(ctx context.Context, req *defangv1.SubscribeRequest) (iter.Seq2[*defangv1.SubscribeResponse, error], error) { diff --git a/src/pkg/cli/client/byoc/gcp/byoc_test.go b/src/pkg/cli/client/byoc/gcp/byoc_test.go index 73bd6983b..169eaa0a0 100644 --- a/src/pkg/cli/client/byoc/gcp/byoc_test.go +++ b/src/pkg/cli/client/byoc/gcp/byoc_test.go @@ -45,7 +45,7 @@ func TestSetUpCD(t *testing.T) { command: []string{"up", payload}, } - if err := b.runCdCommand(ctx, cmd); err != nil { + if _, err := b.runCdCommand(ctx, cmd); err != nil { t.Errorf("CdCommand() error = %v, want nil", err) } } @@ -108,9 +108,9 @@ func (m *MockGcpLoggingTailer) Next(ctx context.Context) (*loggingpb.LogEntry, e func TestGetLogStream(t *testing.T) { tests := []struct { - name string - req *defangv1.TailRequest - cdExecution string + name string + req *defangv1.TailRequest + cdBuildId string }{ // TODO: use golang 1.25 synctest to avoid needing a fixed Since in every test case {name: "no_args", req: &defangv1.TailRequest{}}, @@ -164,7 +164,7 @@ func TestGetLogStream(t *testing.T) { LogType: uint32(logs.LogTypeAll), Etag: "test-etag", }, - cdExecution: "test-execution-id", + cdBuildId: "test-execution-id", }, } @@ -173,7 +173,7 @@ func TestGetLogStream(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { b := NewByocProvider(ctx, "testTenantID", "") - b.cdExecution = tt.cdExecution + b.cdBuildId = tt.cdBuildId driver := &MockGcpLogsClient{ lister: &MockGcpLoggingLister{}, diff --git a/src/pkg/cli/client/playground.go b/src/pkg/cli/client/playground.go index 178f454dc..8ce49d51e 100644 --- a/src/pkg/cli/client/playground.go +++ b/src/pkg/cli/client/playground.go @@ -39,11 +39,12 @@ func (g *PlaygroundProvider) GetStackName() string { return g.Stack } -func (g *PlaygroundProvider) Deploy(ctx context.Context, req *DeployRequest) (*defangv1.DeployResponse, error) { +func (g *PlaygroundProvider) Deploy(ctx context.Context, req *DeployRequest) (*DeployResponse, error) { if os.Getenv("DEFANG_PULUMI_DIR") != "" { return nil, errors.New("DEFANG_PULUMI_DIR is set, but not supported by the Playground provider") } - return getMsg(g.GetFabricClient().Deploy(ctx, connect.NewRequest(&req.DeployRequest))) + resp, err := getMsg(g.GetFabricClient().Deploy(ctx, connect.NewRequest(&req.DeployRequest))) + return &DeployResponse{DeployResponse: resp}, err } func (g *PlaygroundProvider) GetDeploymentStatus(ctx context.Context) (bool, error) { @@ -54,7 +55,7 @@ func (*PlaygroundProvider) Driver() string { return "playground" } -func (g *PlaygroundProvider) Preview(ctx context.Context, req *DeployRequest) (*defangv1.DeployResponse, error) { +func (g *PlaygroundProvider) Preview(ctx context.Context, req *DeployRequest) (*DeployResponse, error) { req.Preview = true return g.Deploy(ctx, req) } @@ -125,11 +126,15 @@ func serverStreamIter[T any](stream ServerStream[T]) iter.Seq2[*T, error] { } } -func (g *PlaygroundProvider) CdCommand(ctx context.Context, req CdCommandRequest) (types.ETag, error) { +func (g *PlaygroundProvider) CdCommand(ctx context.Context, req CdCommandRequest) (*CdCommandResponse, error) { if req.Command == CdCommandDestroy { - return g.destroy(ctx, &defangv1.DestroyRequest{Project: req.Project}) + etag, err := g.destroy(ctx, &defangv1.DestroyRequest{Project: req.Project}) + if err != nil { + return nil, err + } + return &CdCommandResponse{ETag: etag}, nil } - return "", errors.New("the CD command is not valid for the Defang playground; did you forget --stack or --provider?") + return nil, errors.New("the CD command is not valid for the Defang playground; did you forget --stack or --provider?") } func (g *PlaygroundProvider) destroy(ctx context.Context, req *defangv1.DestroyRequest) (types.ETag, error) { diff --git a/src/pkg/cli/client/provider.go b/src/pkg/cli/client/provider.go index 24ca05bb0..240456fd4 100644 --- a/src/pkg/cli/client/provider.go +++ b/src/pkg/cli/client/provider.go @@ -6,7 +6,6 @@ import ( "time" "github.com/DefangLabs/defang/src/pkg" - "github.com/DefangLabs/defang/src/pkg/types" defangv1 "github.com/DefangLabs/defang/src/protos/io/defang/v1" composeTypes "github.com/compose-spec/compose-go/v2/types" @@ -39,11 +38,22 @@ type CdCommandRequest struct { EventsUrl string } +type CdCommandResponse struct { + CdId string + CdType defangv1.CdType + ETag string +} + type DeployRequest struct { defangv1.DeployRequest - - StatesUrl string EventsUrl string + StatesUrl string +} + +type DeployResponse struct { + *defangv1.DeployResponse + CdId string + CdType defangv1.CdType } type PrepareDomainDelegationRequest struct { @@ -69,12 +79,12 @@ type Provider interface { DNSResolver AccountInfo(context.Context) (*AccountInfo, error) Authenticate(ctx context.Context, interactive bool) error - CdCommand(context.Context, CdCommandRequest) (types.ETag, error) + CdCommand(context.Context, CdCommandRequest) (*CdCommandResponse, error) CdList(context.Context, bool) (iter.Seq[byocState.Info], error) CreateUploadURL(context.Context, *defangv1.UploadURLRequest) (*defangv1.UploadURLResponse, error) DelayBeforeRetry(context.Context) error DeleteConfig(context.Context, *defangv1.Secrets) error - Deploy(context.Context, *DeployRequest) (*defangv1.DeployResponse, error) + Deploy(context.Context, *DeployRequest) (*DeployResponse, error) Driver() string GetDeploymentStatus(context.Context) (bool, error) GetProjectUpdate(context.Context, string) (*defangv1.ProjectUpdate, error) @@ -84,7 +94,7 @@ type Provider interface { GetStackNameForDomain() string ListConfig(context.Context, *defangv1.ListConfigsRequest) (*defangv1.Secrets, error) PrepareDomainDelegation(context.Context, PrepareDomainDelegationRequest) (*PrepareDomainDelegationResponse, error) - Preview(context.Context, *DeployRequest) (*defangv1.DeployResponse, error) + Preview(context.Context, *DeployRequest) (*DeployResponse, error) PutConfig(context.Context, *defangv1.PutConfigRequest) error QueryLogs(context.Context, *defangv1.TailRequest) (iter.Seq2[*defangv1.TailResponse, error], error) // Deprecated: should use stacks instead of ProjectName fallback. diff --git a/src/pkg/cli/common.go b/src/pkg/cli/common.go index 57960afcf..2b2163d66 100644 --- a/src/pkg/cli/common.go +++ b/src/pkg/cli/common.go @@ -49,6 +49,8 @@ type putDeploymentParams struct { StatesUrl string EventsUrl string ServiceInfos []*defangv1.ServiceInfo + CdType defangv1.CdType + CdId string } func putDeploymentAndStack(ctx context.Context, provider client.Provider, fabric client.FabricClient, stack *stacks.Parameters, req putDeploymentParams) error { @@ -110,6 +112,8 @@ func putDeploymentAndStack(ctx context.Context, provider client.Provider, fabric Origin: origin, OriginMetadata: originMetadata, Services: req.ServiceInfos, + CdId: req.CdId, + CdType: req.CdType, }, }) } diff --git a/src/pkg/cli/composeDown_test.go b/src/pkg/cli/composeDown_test.go index df9e0a0aa..29375ae25 100644 --- a/src/pkg/cli/composeDown_test.go +++ b/src/pkg/cli/composeDown_test.go @@ -6,14 +6,13 @@ import ( "github.com/DefangLabs/defang/src/pkg/cli/client" "github.com/DefangLabs/defang/src/pkg/cli/compose" - "github.com/DefangLabs/defang/src/pkg/types" defangv1 "github.com/DefangLabs/defang/src/protos/io/defang/v1" ) type mockComposeDown struct { client.MockProvider MockAccountInfo func(ctx context.Context) (*client.AccountInfo, error) - MockCdCommand func(ctx context.Context, req client.CdCommandRequest) (types.ETag, error) + MockCdCommand func(ctx context.Context, req client.CdCommandRequest) (*client.CdCommandResponse, error) MockDelete func(ctx context.Context, req *defangv1.DeleteRequest) (*defangv1.DeleteResponse, error) request map[string]any } @@ -27,7 +26,7 @@ func (m mockComposeDown) AccountInfo( func (m mockComposeDown) CdCommand( ctx context.Context, req client.CdCommandRequest, -) (types.ETag, error) { +) (*client.CdCommandResponse, error) { return m.MockCdCommand(ctx, req) } @@ -45,9 +44,9 @@ func TestComposeDown(t *testing.T) { MockAccountInfo: func(ctx context.Context) (*client.AccountInfo, error) { return &client.AccountInfo{}, nil }, - MockCdCommand: func(ctx context.Context, req client.CdCommandRequest) (types.ETag, error) { + MockCdCommand: func(ctx context.Context, req client.CdCommandRequest) (*client.CdCommandResponse, error) { mockProvider.request["CdCommandRequest"] = &req - return "eTagDestroy", nil + return &client.CdCommandResponse{ETag: "eTagDestroy"}, nil }, MockDelete: func(ctx context.Context, req *defangv1.DeleteRequest) (*defangv1.DeleteResponse, error) { mockProvider.request["DeleteRequest"] = req diff --git a/src/pkg/cli/composeUp.go b/src/pkg/cli/composeUp.go index 85212eafa..0489f8b5d 100644 --- a/src/pkg/cli/composeUp.go +++ b/src/pkg/cli/composeUp.go @@ -160,7 +160,7 @@ func ComposeUp(ctx context.Context, fabric client.FabricClient, provider client. var statesUrl, eventsUrl string var action defangv1.DeploymentAction - var resp *defangv1.DeployResponse + var resp *client.DeployResponse if upload == compose.UploadModePreview || upload == compose.UploadModeEstimate { resp, err = provider.Preview(ctx, deployRequest) if err != nil { @@ -204,6 +204,8 @@ func ComposeUp(ctx context.Context, fabric client.FabricClient, provider client. StatesUrl: statesUrl, EventsUrl: eventsUrl, ServiceInfos: resp.Services, + CdType: resp.CdType, + CdId: resp.CdId, }) if err != nil { term.Debug("Failed to record deployment:", err) @@ -216,5 +218,5 @@ func ComposeUp(ctx context.Context, fabric client.FabricClient, provider client. PrintObject(serviceInfo.Service.Name, serviceInfo) } } - return resp, project, nil + return resp.DeployResponse, project, nil } diff --git a/src/pkg/cli/composeUp_test.go b/src/pkg/cli/composeUp_test.go index cc2f64a7b..eb5dd8273 100644 --- a/src/pkg/cli/composeUp_test.go +++ b/src/pkg/cli/composeUp_test.go @@ -31,11 +31,11 @@ type mockDeployProvider struct { lock sync.Mutex } -func (d *mockDeployProvider) Deploy(ctx context.Context, req *client.DeployRequest) (*defangv1.DeployResponse, error) { +func (d *mockDeployProvider) Deploy(ctx context.Context, req *client.DeployRequest) (*client.DeployResponse, error) { return d.Preview(ctx, req) } -func (*mockDeployProvider) Preview(ctx context.Context, req *client.DeployRequest) (*defangv1.DeployResponse, error) { +func (*mockDeployProvider) Preview(ctx context.Context, req *client.DeployRequest) (*client.DeployResponse, error) { if len(req.Compose) == 0 { return nil, errors.New("DeployRequest needs Compose") } @@ -57,7 +57,7 @@ func (*mockDeployProvider) Preview(ctx context.Context, req *client.DeployReques }) } - return &defangv1.DeployResponse{Services: services, Etag: etag}, ctx.Err() + return &client.DeployResponse{DeployResponse: &defangv1.DeployResponse{Services: services, Etag: etag}}, ctx.Err() } func (m *mockDeployProvider) Subscribe(ctx context.Context, req *defangv1.SubscribeRequest) (iter.Seq2[*defangv1.SubscribeResponse, error], error) { diff --git a/src/pkg/cli/destroy_test.go b/src/pkg/cli/destroy_test.go index 9ca038771..5d8244bd7 100644 --- a/src/pkg/cli/destroy_test.go +++ b/src/pkg/cli/destroy_test.go @@ -57,12 +57,12 @@ func TestDestroy(t *testing.T) { grpcClient := Connect(url, types.TenantUnset) fabric := client.PlaygroundProvider{FabricClient: grpcClient} - etag, err := fabric.CdCommand(ctx, client.CdCommandRequest{Command: "destroy", Project: "test-project"}) + resp, err := fabric.CdCommand(ctx, client.CdCommandRequest{Command: "destroy", Project: "test-project"}) if err != nil { t.Fatal(err) } - if etag != "test-destroy-etag" { - t.Fatalf("expected etag %q, got %q", "test-destroy-etag", etag) + if resp.ETag != "test-destroy-etag" { + t.Fatalf("expected etag %q, got %q", "test-destroy-etag", resp.ETag) } } diff --git a/src/pkg/stacks/stacks.go b/src/pkg/stacks/stacks.go index 49310cee3..5f38fe4d6 100644 --- a/src/pkg/stacks/stacks.go +++ b/src/pkg/stacks/stacks.go @@ -193,7 +193,7 @@ func Marshal(params *Parameters) (string, error) { if params == nil { return "", nil } - return godotenv.Marshal(params.ToMap()) + return godotenv.Marshal(params.ToMap()) // TODO: should append LF at EOF } func RemoveInDirectory(workingDirectory, name string) error { diff --git a/src/protos/io/defang/v1/fabric.pb.go b/src/protos/io/defang/v1/fabric.pb.go index 5d0f69aa3..757cad5a3 100644 --- a/src/protos/io/defang/v1/fabric.pb.go +++ b/src/protos/io/defang/v1/fabric.pb.go @@ -528,6 +528,61 @@ func (DeploymentOrigin) EnumDescriptor() ([]byte, []int) { return file_io_defang_v1_fabric_proto_rawDescGZIP(), []int{7} } +type CdType int32 + +const ( + CdType_CD_TYPE_UNSPECIFIED CdType = 0 + CdType_CD_TYPE_AWS_CODEBUILD_BUILDID CdType = 1 + CdType_CD_TYPE_GCP_CLOUDBUILD_BUILDID CdType = 2 + CdType_CD_TYPE_DO_APPPLATFORM_DEPLOYMENTID CdType = 3 + CdType_CD_TYPE_AZURE_ACI_JOBID CdType = 4 +) + +// Enum value maps for CdType. +var ( + CdType_name = map[int32]string{ + 0: "CD_TYPE_UNSPECIFIED", + 1: "CD_TYPE_AWS_CODEBUILD_BUILDID", + 2: "CD_TYPE_GCP_CLOUDBUILD_BUILDID", + 3: "CD_TYPE_DO_APPPLATFORM_DEPLOYMENTID", + 4: "CD_TYPE_AZURE_ACI_JOBID", + } + CdType_value = map[string]int32{ + "CD_TYPE_UNSPECIFIED": 0, + "CD_TYPE_AWS_CODEBUILD_BUILDID": 1, + "CD_TYPE_GCP_CLOUDBUILD_BUILDID": 2, + "CD_TYPE_DO_APPPLATFORM_DEPLOYMENTID": 3, + "CD_TYPE_AZURE_ACI_JOBID": 4, + } +) + +func (x CdType) Enum() *CdType { + p := new(CdType) + *p = x + return p +} + +func (x CdType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CdType) Descriptor() protoreflect.EnumDescriptor { + return file_io_defang_v1_fabric_proto_enumTypes[8].Descriptor() +} + +func (CdType) Type() protoreflect.EnumType { + return &file_io_defang_v1_fabric_proto_enumTypes[8] +} + +func (x CdType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CdType.Descriptor instead. +func (CdType) EnumDescriptor() ([]byte, []int) { + return file_io_defang_v1_fabric_proto_rawDescGZIP(), []int{8} +} + type DeploymentStatus int32 const ( @@ -564,11 +619,11 @@ func (x DeploymentStatus) String() string { } func (DeploymentStatus) Descriptor() protoreflect.EnumDescriptor { - return file_io_defang_v1_fabric_proto_enumTypes[8].Descriptor() + return file_io_defang_v1_fabric_proto_enumTypes[9].Descriptor() } func (DeploymentStatus) Type() protoreflect.EnumType { - return &file_io_defang_v1_fabric_proto_enumTypes[8] + return &file_io_defang_v1_fabric_proto_enumTypes[9] } func (x DeploymentStatus) Number() protoreflect.EnumNumber { @@ -577,7 +632,7 @@ func (x DeploymentStatus) Number() protoreflect.EnumNumber { // Deprecated: Use DeploymentStatus.Descriptor instead. func (DeploymentStatus) EnumDescriptor() ([]byte, []int) { - return file_io_defang_v1_fabric_proto_rawDescGZIP(), []int{8} + return file_io_defang_v1_fabric_proto_rawDescGZIP(), []int{9} } type SubscriptionTier int32 @@ -622,11 +677,11 @@ func (x SubscriptionTier) String() string { } func (SubscriptionTier) Descriptor() protoreflect.EnumDescriptor { - return file_io_defang_v1_fabric_proto_enumTypes[9].Descriptor() + return file_io_defang_v1_fabric_proto_enumTypes[10].Descriptor() } func (SubscriptionTier) Type() protoreflect.EnumType { - return &file_io_defang_v1_fabric_proto_enumTypes[9] + return &file_io_defang_v1_fabric_proto_enumTypes[10] } func (x SubscriptionTier) Number() protoreflect.EnumNumber { @@ -635,7 +690,7 @@ func (x SubscriptionTier) Number() protoreflect.EnumNumber { // Deprecated: Use SubscriptionTier.Descriptor instead. func (SubscriptionTier) EnumDescriptor() ([]byte, []int) { - return file_io_defang_v1_fabric_proto_rawDescGZIP(), []int{9} + return file_io_defang_v1_fabric_proto_rawDescGZIP(), []int{10} } type SourcePlatform int32 @@ -668,11 +723,11 @@ func (x SourcePlatform) String() string { } func (SourcePlatform) Descriptor() protoreflect.EnumDescriptor { - return file_io_defang_v1_fabric_proto_enumTypes[10].Descriptor() + return file_io_defang_v1_fabric_proto_enumTypes[11].Descriptor() } func (SourcePlatform) Type() protoreflect.EnumType { - return &file_io_defang_v1_fabric_proto_enumTypes[10] + return &file_io_defang_v1_fabric_proto_enumTypes[11] } func (x SourcePlatform) Number() protoreflect.EnumNumber { @@ -681,7 +736,7 @@ func (x SourcePlatform) Number() protoreflect.EnumNumber { // Deprecated: Use SourcePlatform.Descriptor instead. func (SourcePlatform) EnumDescriptor() ([]byte, []int) { - return file_io_defang_v1_fabric_proto_rawDescGZIP(), []int{10} + return file_io_defang_v1_fabric_proto_rawDescGZIP(), []int{11} } type TailRequest_LogType int32 @@ -720,11 +775,11 @@ func (x TailRequest_LogType) String() string { } func (TailRequest_LogType) Descriptor() protoreflect.EnumDescriptor { - return file_io_defang_v1_fabric_proto_enumTypes[11].Descriptor() + return file_io_defang_v1_fabric_proto_enumTypes[12].Descriptor() } func (TailRequest_LogType) Type() protoreflect.EnumType { - return &file_io_defang_v1_fabric_proto_enumTypes[11] + return &file_io_defang_v1_fabric_proto_enumTypes[12] } func (x TailRequest_LogType) Number() protoreflect.EnumNumber { @@ -3436,6 +3491,8 @@ type Deployment struct { Origin DeploymentOrigin `protobuf:"varint,16,opt,name=origin,proto3,enum=io.defang.v1.DeploymentOrigin" json:"origin,omitempty"` OriginMetadata map[string]string `protobuf:"bytes,17,rep,name=origin_metadata,json=originMetadata,proto3" json:"origin_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` Services []*ServiceInfo `protobuf:"bytes,18,rep,name=services,proto3" json:"services,omitempty"` + CdType CdType `protobuf:"varint,19,opt,name=cd_type,json=cdType,proto3,enum=io.defang.v1.CdType" json:"cd_type,omitempty"` + CdId string `protobuf:"bytes,20,opt,name=cd_id,json=cdId,proto3" json:"cd_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -3597,6 +3654,20 @@ func (x *Deployment) GetServices() []*ServiceInfo { return nil } +func (x *Deployment) GetCdType() CdType { + if x != nil { + return x.CdType + } + return CdType_CD_TYPE_UNSPECIFIED +} + +func (x *Deployment) GetCdId() string { + if x != nil { + return x.CdId + } + return "" +} + type PutDeploymentRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Deployment *Deployment `protobuf:"bytes,1,opt,name=deployment,proto3" json:"deployment,omitempty"` @@ -5861,7 +5932,7 @@ const file_io_defang_v1_fabric_proto_rawDesc = "" + "\x12ListConfigsRequest\x12\x18\n" + "\aproject\x18\x01 \x01(\tR\aproject\"H\n" + "\x13ListConfigsResponse\x121\n" + - "\aconfigs\x18\x01 \x03(\v2\x17.io.defang.v1.ConfigKeyR\aconfigs\"\xf7\x06\n" + + "\aconfigs\x18\x01 \x03(\v2\x17.io.defang.v1.ConfigKeyR\aconfigs\"\xbb\a\n" + "\n" + "Deployment\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x18\n" + @@ -5884,7 +5955,9 @@ const file_io_defang_v1_fabric_proto_rawDesc = "" + "events_url\x18\x0f \x01(\tR\teventsUrl\x126\n" + "\x06origin\x18\x10 \x01(\x0e2\x1e.io.defang.v1.DeploymentOriginR\x06origin\x12U\n" + "\x0forigin_metadata\x18\x11 \x03(\v2,.io.defang.v1.Deployment.OriginMetadataEntryR\x0eoriginMetadata\x125\n" + - "\bservices\x18\x12 \x03(\v2\x19.io.defang.v1.ServiceInfoR\bservices\x1aA\n" + + "\bservices\x18\x12 \x03(\v2\x19.io.defang.v1.ServiceInfoR\bservices\x12-\n" + + "\acd_type\x18\x13 \x01(\x0e2\x14.io.defang.v1.CdTypeR\x06cdType\x12\x13\n" + + "\x05cd_id\x18\x14 \x01(\tR\x04cdId\x1aA\n" + "\x13OriginMetadataEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"P\n" + @@ -6129,7 +6202,13 @@ const file_io_defang_v1_fabric_proto_rawDesc = "" + "\x1fDEPLOYMENT_ORIGIN_NOT_SPECIFIED\x10\x00\x12\x18\n" + "\x14DEPLOYMENT_ORIGIN_CI\x10\x01\x12\x1c\n" + "\x18DEPLOYMENT_ORIGIN_GITHUB\x10\x02\x12\x1c\n" + - "\x18DEPLOYMENT_ORIGIN_GITLAB\x10\x03*\x95\x01\n" + + "\x18DEPLOYMENT_ORIGIN_GITLAB\x10\x03*\xae\x01\n" + + "\x06CdType\x12\x17\n" + + "\x13CD_TYPE_UNSPECIFIED\x10\x00\x12!\n" + + "\x1dCD_TYPE_AWS_CODEBUILD_BUILDID\x10\x01\x12\"\n" + + "\x1eCD_TYPE_GCP_CLOUDBUILD_BUILDID\x10\x02\x12'\n" + + "#CD_TYPE_DO_APPPLATFORM_DEPLOYMENTID\x10\x03\x12\x1b\n" + + "\x17CD_TYPE_AZURE_ACI_JOBID\x10\x04*\x95\x01\n" + "\x10DeploymentStatus\x12!\n" + "\x1dDEPLOYMENT_STATUS_UNSPECIFIED\x10\x00\x12!\n" + "\x1dDEPLOYMENT_STATUS_IN_PROGRESS\x10\x01\x12\x1d\n" + @@ -6210,7 +6289,7 @@ func file_io_defang_v1_fabric_proto_rawDescGZIP() []byte { return file_io_defang_v1_fabric_proto_rawDescData } -var file_io_defang_v1_fabric_proto_enumTypes = make([]protoimpl.EnumInfo, 12) +var file_io_defang_v1_fabric_proto_enumTypes = make([]protoimpl.EnumInfo, 13) var file_io_defang_v1_fabric_proto_msgTypes = make([]protoimpl.MessageInfo, 78) var file_io_defang_v1_fabric_proto_goTypes = []any{ (Provider)(0), // 0: io.defang.v1.Provider @@ -6221,259 +6300,261 @@ var file_io_defang_v1_fabric_proto_goTypes = []any{ (DeploymentType)(0), // 5: io.defang.v1.DeploymentType (DeploymentAction)(0), // 6: io.defang.v1.DeploymentAction (DeploymentOrigin)(0), // 7: io.defang.v1.DeploymentOrigin - (DeploymentStatus)(0), // 8: io.defang.v1.DeploymentStatus - (SubscriptionTier)(0), // 9: io.defang.v1.SubscriptionTier - (SourcePlatform)(0), // 10: io.defang.v1.SourcePlatform - (TailRequest_LogType)(0), // 11: io.defang.v1.TailRequest.LogType - (*Stack)(nil), // 12: io.defang.v1.Stack - (*PutStackRequest)(nil), // 13: io.defang.v1.PutStackRequest - (*GetStackRequest)(nil), // 14: io.defang.v1.GetStackRequest - (*GetDefaultStackRequest)(nil), // 15: io.defang.v1.GetDefaultStackRequest - (*GetStackResponse)(nil), // 16: io.defang.v1.GetStackResponse - (*ListStacksRequest)(nil), // 17: io.defang.v1.ListStacksRequest - (*ListStacksResponse)(nil), // 18: io.defang.v1.ListStacksResponse - (*DeleteStackRequest)(nil), // 19: io.defang.v1.DeleteStackRequest - (*GetSelectedProviderRequest)(nil), // 20: io.defang.v1.GetSelectedProviderRequest - (*GetSelectedProviderResponse)(nil), // 21: io.defang.v1.GetSelectedProviderResponse - (*SetSelectedProviderRequest)(nil), // 22: io.defang.v1.SetSelectedProviderRequest - (*VerifyDNSSetupRequest)(nil), // 23: io.defang.v1.VerifyDNSSetupRequest - (*DestroyRequest)(nil), // 24: io.defang.v1.DestroyRequest - (*DestroyResponse)(nil), // 25: io.defang.v1.DestroyResponse - (*DebugRequest)(nil), // 26: io.defang.v1.DebugRequest - (*DebugResponse)(nil), // 27: io.defang.v1.DebugResponse - (*Issue)(nil), // 28: io.defang.v1.Issue - (*CodeChange)(nil), // 29: io.defang.v1.CodeChange - (*TrackRequest)(nil), // 30: io.defang.v1.TrackRequest - (*CanIUseRequest)(nil), // 31: io.defang.v1.CanIUseRequest - (*CanIUseResponse)(nil), // 32: io.defang.v1.CanIUseResponse - (*DeployRequest)(nil), // 33: io.defang.v1.DeployRequest - (*DeployResponse)(nil), // 34: io.defang.v1.DeployResponse - (*DeleteRequest)(nil), // 35: io.defang.v1.DeleteRequest - (*DeleteResponse)(nil), // 36: io.defang.v1.DeleteResponse - (*GenerateFilesRequest)(nil), // 37: io.defang.v1.GenerateFilesRequest - (*File)(nil), // 38: io.defang.v1.File - (*GenerateFilesResponse)(nil), // 39: io.defang.v1.GenerateFilesResponse - (*StartGenerateResponse)(nil), // 40: io.defang.v1.StartGenerateResponse - (*GenerateStatusRequest)(nil), // 41: io.defang.v1.GenerateStatusRequest - (*UploadURLRequest)(nil), // 42: io.defang.v1.UploadURLRequest - (*UploadURLResponse)(nil), // 43: io.defang.v1.UploadURLResponse - (*ServiceInfo)(nil), // 44: io.defang.v1.ServiceInfo - (*Secrets)(nil), // 45: io.defang.v1.Secrets - (*SecretValue)(nil), // 46: io.defang.v1.SecretValue - (*Config)(nil), // 47: io.defang.v1.Config - (*ConfigKey)(nil), // 48: io.defang.v1.ConfigKey - (*PutConfigRequest)(nil), // 49: io.defang.v1.PutConfigRequest - (*GetConfigsRequest)(nil), // 50: io.defang.v1.GetConfigsRequest - (*GetConfigsResponse)(nil), // 51: io.defang.v1.GetConfigsResponse - (*GetPlaygroundProjectDomainResponse)(nil), // 52: io.defang.v1.GetPlaygroundProjectDomainResponse - (*DeleteConfigsRequest)(nil), // 53: io.defang.v1.DeleteConfigsRequest - (*ListConfigsRequest)(nil), // 54: io.defang.v1.ListConfigsRequest - (*ListConfigsResponse)(nil), // 55: io.defang.v1.ListConfigsResponse - (*Deployment)(nil), // 56: io.defang.v1.Deployment - (*PutDeploymentRequest)(nil), // 57: io.defang.v1.PutDeploymentRequest - (*ListDeploymentsRequest)(nil), // 58: io.defang.v1.ListDeploymentsRequest - (*ListDeploymentsResponse)(nil), // 59: io.defang.v1.ListDeploymentsResponse - (*TokenRequest)(nil), // 60: io.defang.v1.TokenRequest - (*TokenResponse)(nil), // 61: io.defang.v1.TokenResponse - (*Status)(nil), // 62: io.defang.v1.Status - (*Version)(nil), // 63: io.defang.v1.Version - (*TailRequest)(nil), // 64: io.defang.v1.TailRequest - (*LogEntry)(nil), // 65: io.defang.v1.LogEntry - (*TailResponse)(nil), // 66: io.defang.v1.TailResponse - (*GetServicesResponse)(nil), // 67: io.defang.v1.GetServicesResponse - (*ProjectUpdate)(nil), // 68: io.defang.v1.ProjectUpdate - (*GetRequest)(nil), // 69: io.defang.v1.GetRequest - (*Service)(nil), // 70: io.defang.v1.Service - (*DeployEvent)(nil), // 71: io.defang.v1.DeployEvent - (*SubscribeRequest)(nil), // 72: io.defang.v1.SubscribeRequest - (*SubscribeResponse)(nil), // 73: io.defang.v1.SubscribeResponse - (*GetServicesRequest)(nil), // 74: io.defang.v1.GetServicesRequest - (*DelegateSubdomainZoneRequest)(nil), // 75: io.defang.v1.DelegateSubdomainZoneRequest - (*DelegateSubdomainZoneResponse)(nil), // 76: io.defang.v1.DelegateSubdomainZoneResponse - (*DeleteSubdomainZoneRequest)(nil), // 77: io.defang.v1.DeleteSubdomainZoneRequest - (*GetDelegateSubdomainZoneRequest)(nil), // 78: io.defang.v1.GetDelegateSubdomainZoneRequest - (*SetOptionsRequest)(nil), // 79: io.defang.v1.SetOptionsRequest - (*WhoAmIResponse)(nil), // 80: io.defang.v1.WhoAmIResponse - (*EstimateRequest)(nil), // 81: io.defang.v1.EstimateRequest - (*EstimateLineItem)(nil), // 82: io.defang.v1.EstimateLineItem - (*EstimateResponse)(nil), // 83: io.defang.v1.EstimateResponse - (*PreviewRequest)(nil), // 84: io.defang.v1.PreviewRequest - (*PreviewResponse)(nil), // 85: io.defang.v1.PreviewResponse - (*GenerateComposeRequest)(nil), // 86: io.defang.v1.GenerateComposeRequest - (*GenerateComposeResponse)(nil), // 87: io.defang.v1.GenerateComposeResponse - nil, // 88: io.defang.v1.TrackRequest.PropertiesEntry - nil, // 89: io.defang.v1.Deployment.OriginMetadataEntry - (*timestamppb.Timestamp)(nil), // 90: google.protobuf.Timestamp - (*_type.Money)(nil), // 91: google.type.Money - (*emptypb.Empty)(nil), // 92: google.protobuf.Empty + (CdType)(0), // 8: io.defang.v1.CdType + (DeploymentStatus)(0), // 9: io.defang.v1.DeploymentStatus + (SubscriptionTier)(0), // 10: io.defang.v1.SubscriptionTier + (SourcePlatform)(0), // 11: io.defang.v1.SourcePlatform + (TailRequest_LogType)(0), // 12: io.defang.v1.TailRequest.LogType + (*Stack)(nil), // 13: io.defang.v1.Stack + (*PutStackRequest)(nil), // 14: io.defang.v1.PutStackRequest + (*GetStackRequest)(nil), // 15: io.defang.v1.GetStackRequest + (*GetDefaultStackRequest)(nil), // 16: io.defang.v1.GetDefaultStackRequest + (*GetStackResponse)(nil), // 17: io.defang.v1.GetStackResponse + (*ListStacksRequest)(nil), // 18: io.defang.v1.ListStacksRequest + (*ListStacksResponse)(nil), // 19: io.defang.v1.ListStacksResponse + (*DeleteStackRequest)(nil), // 20: io.defang.v1.DeleteStackRequest + (*GetSelectedProviderRequest)(nil), // 21: io.defang.v1.GetSelectedProviderRequest + (*GetSelectedProviderResponse)(nil), // 22: io.defang.v1.GetSelectedProviderResponse + (*SetSelectedProviderRequest)(nil), // 23: io.defang.v1.SetSelectedProviderRequest + (*VerifyDNSSetupRequest)(nil), // 24: io.defang.v1.VerifyDNSSetupRequest + (*DestroyRequest)(nil), // 25: io.defang.v1.DestroyRequest + (*DestroyResponse)(nil), // 26: io.defang.v1.DestroyResponse + (*DebugRequest)(nil), // 27: io.defang.v1.DebugRequest + (*DebugResponse)(nil), // 28: io.defang.v1.DebugResponse + (*Issue)(nil), // 29: io.defang.v1.Issue + (*CodeChange)(nil), // 30: io.defang.v1.CodeChange + (*TrackRequest)(nil), // 31: io.defang.v1.TrackRequest + (*CanIUseRequest)(nil), // 32: io.defang.v1.CanIUseRequest + (*CanIUseResponse)(nil), // 33: io.defang.v1.CanIUseResponse + (*DeployRequest)(nil), // 34: io.defang.v1.DeployRequest + (*DeployResponse)(nil), // 35: io.defang.v1.DeployResponse + (*DeleteRequest)(nil), // 36: io.defang.v1.DeleteRequest + (*DeleteResponse)(nil), // 37: io.defang.v1.DeleteResponse + (*GenerateFilesRequest)(nil), // 38: io.defang.v1.GenerateFilesRequest + (*File)(nil), // 39: io.defang.v1.File + (*GenerateFilesResponse)(nil), // 40: io.defang.v1.GenerateFilesResponse + (*StartGenerateResponse)(nil), // 41: io.defang.v1.StartGenerateResponse + (*GenerateStatusRequest)(nil), // 42: io.defang.v1.GenerateStatusRequest + (*UploadURLRequest)(nil), // 43: io.defang.v1.UploadURLRequest + (*UploadURLResponse)(nil), // 44: io.defang.v1.UploadURLResponse + (*ServiceInfo)(nil), // 45: io.defang.v1.ServiceInfo + (*Secrets)(nil), // 46: io.defang.v1.Secrets + (*SecretValue)(nil), // 47: io.defang.v1.SecretValue + (*Config)(nil), // 48: io.defang.v1.Config + (*ConfigKey)(nil), // 49: io.defang.v1.ConfigKey + (*PutConfigRequest)(nil), // 50: io.defang.v1.PutConfigRequest + (*GetConfigsRequest)(nil), // 51: io.defang.v1.GetConfigsRequest + (*GetConfigsResponse)(nil), // 52: io.defang.v1.GetConfigsResponse + (*GetPlaygroundProjectDomainResponse)(nil), // 53: io.defang.v1.GetPlaygroundProjectDomainResponse + (*DeleteConfigsRequest)(nil), // 54: io.defang.v1.DeleteConfigsRequest + (*ListConfigsRequest)(nil), // 55: io.defang.v1.ListConfigsRequest + (*ListConfigsResponse)(nil), // 56: io.defang.v1.ListConfigsResponse + (*Deployment)(nil), // 57: io.defang.v1.Deployment + (*PutDeploymentRequest)(nil), // 58: io.defang.v1.PutDeploymentRequest + (*ListDeploymentsRequest)(nil), // 59: io.defang.v1.ListDeploymentsRequest + (*ListDeploymentsResponse)(nil), // 60: io.defang.v1.ListDeploymentsResponse + (*TokenRequest)(nil), // 61: io.defang.v1.TokenRequest + (*TokenResponse)(nil), // 62: io.defang.v1.TokenResponse + (*Status)(nil), // 63: io.defang.v1.Status + (*Version)(nil), // 64: io.defang.v1.Version + (*TailRequest)(nil), // 65: io.defang.v1.TailRequest + (*LogEntry)(nil), // 66: io.defang.v1.LogEntry + (*TailResponse)(nil), // 67: io.defang.v1.TailResponse + (*GetServicesResponse)(nil), // 68: io.defang.v1.GetServicesResponse + (*ProjectUpdate)(nil), // 69: io.defang.v1.ProjectUpdate + (*GetRequest)(nil), // 70: io.defang.v1.GetRequest + (*Service)(nil), // 71: io.defang.v1.Service + (*DeployEvent)(nil), // 72: io.defang.v1.DeployEvent + (*SubscribeRequest)(nil), // 73: io.defang.v1.SubscribeRequest + (*SubscribeResponse)(nil), // 74: io.defang.v1.SubscribeResponse + (*GetServicesRequest)(nil), // 75: io.defang.v1.GetServicesRequest + (*DelegateSubdomainZoneRequest)(nil), // 76: io.defang.v1.DelegateSubdomainZoneRequest + (*DelegateSubdomainZoneResponse)(nil), // 77: io.defang.v1.DelegateSubdomainZoneResponse + (*DeleteSubdomainZoneRequest)(nil), // 78: io.defang.v1.DeleteSubdomainZoneRequest + (*GetDelegateSubdomainZoneRequest)(nil), // 79: io.defang.v1.GetDelegateSubdomainZoneRequest + (*SetOptionsRequest)(nil), // 80: io.defang.v1.SetOptionsRequest + (*WhoAmIResponse)(nil), // 81: io.defang.v1.WhoAmIResponse + (*EstimateRequest)(nil), // 82: io.defang.v1.EstimateRequest + (*EstimateLineItem)(nil), // 83: io.defang.v1.EstimateLineItem + (*EstimateResponse)(nil), // 84: io.defang.v1.EstimateResponse + (*PreviewRequest)(nil), // 85: io.defang.v1.PreviewRequest + (*PreviewResponse)(nil), // 86: io.defang.v1.PreviewResponse + (*GenerateComposeRequest)(nil), // 87: io.defang.v1.GenerateComposeRequest + (*GenerateComposeResponse)(nil), // 88: io.defang.v1.GenerateComposeResponse + nil, // 89: io.defang.v1.TrackRequest.PropertiesEntry + nil, // 90: io.defang.v1.Deployment.OriginMetadataEntry + (*timestamppb.Timestamp)(nil), // 91: google.protobuf.Timestamp + (*_type.Money)(nil), // 92: google.type.Money + (*emptypb.Empty)(nil), // 93: google.protobuf.Empty } var file_io_defang_v1_fabric_proto_depIdxs = []int32{ 0, // 0: io.defang.v1.Stack.provider:type_name -> io.defang.v1.Provider - 90, // 1: io.defang.v1.Stack.last_deployed_at:type_name -> google.protobuf.Timestamp + 91, // 1: io.defang.v1.Stack.last_deployed_at:type_name -> google.protobuf.Timestamp 1, // 2: io.defang.v1.Stack.mode:type_name -> io.defang.v1.DeploymentMode - 12, // 3: io.defang.v1.PutStackRequest.stack:type_name -> io.defang.v1.Stack - 12, // 4: io.defang.v1.GetStackResponse.stack:type_name -> io.defang.v1.Stack - 12, // 5: io.defang.v1.ListStacksResponse.stacks:type_name -> io.defang.v1.Stack + 13, // 3: io.defang.v1.PutStackRequest.stack:type_name -> io.defang.v1.Stack + 13, // 4: io.defang.v1.GetStackResponse.stack:type_name -> io.defang.v1.Stack + 13, // 5: io.defang.v1.ListStacksResponse.stacks:type_name -> io.defang.v1.Stack 0, // 6: io.defang.v1.GetSelectedProviderResponse.provider:type_name -> io.defang.v1.Provider 0, // 7: io.defang.v1.SetSelectedProviderRequest.provider:type_name -> io.defang.v1.Provider - 38, // 8: io.defang.v1.DebugRequest.files:type_name -> io.defang.v1.File - 90, // 9: io.defang.v1.DebugRequest.since:type_name -> google.protobuf.Timestamp - 90, // 10: io.defang.v1.DebugRequest.until:type_name -> google.protobuf.Timestamp - 28, // 11: io.defang.v1.DebugResponse.issues:type_name -> io.defang.v1.Issue - 29, // 12: io.defang.v1.Issue.code_changes:type_name -> io.defang.v1.CodeChange - 88, // 13: io.defang.v1.TrackRequest.properties:type_name -> io.defang.v1.TrackRequest.PropertiesEntry + 39, // 8: io.defang.v1.DebugRequest.files:type_name -> io.defang.v1.File + 91, // 9: io.defang.v1.DebugRequest.since:type_name -> google.protobuf.Timestamp + 91, // 10: io.defang.v1.DebugRequest.until:type_name -> google.protobuf.Timestamp + 29, // 11: io.defang.v1.DebugResponse.issues:type_name -> io.defang.v1.Issue + 30, // 12: io.defang.v1.Issue.code_changes:type_name -> io.defang.v1.CodeChange + 89, // 13: io.defang.v1.TrackRequest.properties:type_name -> io.defang.v1.TrackRequest.PropertiesEntry 0, // 14: io.defang.v1.CanIUseRequest.provider:type_name -> io.defang.v1.Provider 1, // 15: io.defang.v1.DeployRequest.mode:type_name -> io.defang.v1.DeploymentMode 0, // 16: io.defang.v1.DeployRequest.provider:type_name -> io.defang.v1.Provider - 44, // 17: io.defang.v1.DeployResponse.services:type_name -> io.defang.v1.ServiceInfo - 38, // 18: io.defang.v1.GenerateFilesResponse.files:type_name -> io.defang.v1.File - 70, // 19: io.defang.v1.ServiceInfo.service:type_name -> io.defang.v1.Service - 90, // 20: io.defang.v1.ServiceInfo.created_at:type_name -> google.protobuf.Timestamp - 90, // 21: io.defang.v1.ServiceInfo.updated_at:type_name -> google.protobuf.Timestamp + 45, // 17: io.defang.v1.DeployResponse.services:type_name -> io.defang.v1.ServiceInfo + 39, // 18: io.defang.v1.GenerateFilesResponse.files:type_name -> io.defang.v1.File + 71, // 19: io.defang.v1.ServiceInfo.service:type_name -> io.defang.v1.Service + 91, // 20: io.defang.v1.ServiceInfo.created_at:type_name -> google.protobuf.Timestamp + 91, // 21: io.defang.v1.ServiceInfo.updated_at:type_name -> google.protobuf.Timestamp 2, // 22: io.defang.v1.ServiceInfo.state:type_name -> io.defang.v1.ServiceState 3, // 23: io.defang.v1.ServiceInfo.type:type_name -> io.defang.v1.ResourceType 4, // 24: io.defang.v1.Config.type:type_name -> io.defang.v1.ConfigType 4, // 25: io.defang.v1.PutConfigRequest.type:type_name -> io.defang.v1.ConfigType - 48, // 26: io.defang.v1.GetConfigsRequest.configs:type_name -> io.defang.v1.ConfigKey - 47, // 27: io.defang.v1.GetConfigsResponse.configs:type_name -> io.defang.v1.Config - 48, // 28: io.defang.v1.DeleteConfigsRequest.configs:type_name -> io.defang.v1.ConfigKey - 48, // 29: io.defang.v1.ListConfigsResponse.configs:type_name -> io.defang.v1.ConfigKey - 90, // 30: io.defang.v1.Deployment.timestamp:type_name -> google.protobuf.Timestamp + 49, // 26: io.defang.v1.GetConfigsRequest.configs:type_name -> io.defang.v1.ConfigKey + 48, // 27: io.defang.v1.GetConfigsResponse.configs:type_name -> io.defang.v1.Config + 49, // 28: io.defang.v1.DeleteConfigsRequest.configs:type_name -> io.defang.v1.ConfigKey + 49, // 29: io.defang.v1.ListConfigsResponse.configs:type_name -> io.defang.v1.ConfigKey + 91, // 30: io.defang.v1.Deployment.timestamp:type_name -> google.protobuf.Timestamp 6, // 31: io.defang.v1.Deployment.action:type_name -> io.defang.v1.DeploymentAction 0, // 32: io.defang.v1.Deployment.provider:type_name -> io.defang.v1.Provider 1, // 33: io.defang.v1.Deployment.mode:type_name -> io.defang.v1.DeploymentMode - 90, // 34: io.defang.v1.Deployment.completed:type_name -> google.protobuf.Timestamp - 8, // 35: io.defang.v1.Deployment.status:type_name -> io.defang.v1.DeploymentStatus + 91, // 34: io.defang.v1.Deployment.completed:type_name -> google.protobuf.Timestamp + 9, // 35: io.defang.v1.Deployment.status:type_name -> io.defang.v1.DeploymentStatus 7, // 36: io.defang.v1.Deployment.origin:type_name -> io.defang.v1.DeploymentOrigin - 89, // 37: io.defang.v1.Deployment.origin_metadata:type_name -> io.defang.v1.Deployment.OriginMetadataEntry - 44, // 38: io.defang.v1.Deployment.services:type_name -> io.defang.v1.ServiceInfo - 56, // 39: io.defang.v1.PutDeploymentRequest.deployment:type_name -> io.defang.v1.Deployment - 5, // 40: io.defang.v1.ListDeploymentsRequest.type:type_name -> io.defang.v1.DeploymentType - 90, // 41: io.defang.v1.ListDeploymentsRequest.until:type_name -> google.protobuf.Timestamp - 56, // 42: io.defang.v1.ListDeploymentsResponse.deployments:type_name -> io.defang.v1.Deployment - 90, // 43: io.defang.v1.TailRequest.since:type_name -> google.protobuf.Timestamp - 90, // 44: io.defang.v1.TailRequest.until:type_name -> google.protobuf.Timestamp - 90, // 45: io.defang.v1.LogEntry.timestamp:type_name -> google.protobuf.Timestamp - 65, // 46: io.defang.v1.TailResponse.entries:type_name -> io.defang.v1.LogEntry - 44, // 47: io.defang.v1.GetServicesResponse.services:type_name -> io.defang.v1.ServiceInfo - 90, // 48: io.defang.v1.GetServicesResponse.expires_at:type_name -> google.protobuf.Timestamp - 44, // 49: io.defang.v1.ProjectUpdate.services:type_name -> io.defang.v1.ServiceInfo - 1, // 50: io.defang.v1.ProjectUpdate.mode:type_name -> io.defang.v1.DeploymentMode - 0, // 51: io.defang.v1.ProjectUpdate.provider:type_name -> io.defang.v1.Provider - 1, // 52: io.defang.v1.DeployEvent.mode:type_name -> io.defang.v1.DeploymentMode - 90, // 53: io.defang.v1.DeployEvent.time:type_name -> google.protobuf.Timestamp - 44, // 54: io.defang.v1.SubscribeResponse.service:type_name -> io.defang.v1.ServiceInfo - 2, // 55: io.defang.v1.SubscribeResponse.state:type_name -> io.defang.v1.ServiceState - 9, // 56: io.defang.v1.WhoAmIResponse.tier:type_name -> io.defang.v1.SubscriptionTier - 90, // 57: io.defang.v1.WhoAmIResponse.paid_until:type_name -> google.protobuf.Timestamp - 90, // 58: io.defang.v1.WhoAmIResponse.trial_until:type_name -> google.protobuf.Timestamp - 0, // 59: io.defang.v1.EstimateRequest.provider:type_name -> io.defang.v1.Provider - 91, // 60: io.defang.v1.EstimateLineItem.cost:type_name -> google.type.Money - 0, // 61: io.defang.v1.EstimateResponse.provider:type_name -> io.defang.v1.Provider - 91, // 62: io.defang.v1.EstimateResponse.subtotal:type_name -> google.type.Money - 82, // 63: io.defang.v1.EstimateResponse.line_items:type_name -> io.defang.v1.EstimateLineItem - 0, // 64: io.defang.v1.PreviewRequest.provider:type_name -> io.defang.v1.Provider - 1, // 65: io.defang.v1.PreviewRequest.mode:type_name -> io.defang.v1.DeploymentMode - 10, // 66: io.defang.v1.GenerateComposeRequest.platform:type_name -> io.defang.v1.SourcePlatform - 92, // 67: io.defang.v1.FabricController.GetStatus:input_type -> google.protobuf.Empty - 92, // 68: io.defang.v1.FabricController.GetVersion:input_type -> google.protobuf.Empty - 60, // 69: io.defang.v1.FabricController.Token:input_type -> io.defang.v1.TokenRequest - 92, // 70: io.defang.v1.FabricController.RevokeToken:input_type -> google.protobuf.Empty - 64, // 71: io.defang.v1.FabricController.Tail:input_type -> io.defang.v1.TailRequest - 33, // 72: io.defang.v1.FabricController.Deploy:input_type -> io.defang.v1.DeployRequest - 69, // 73: io.defang.v1.FabricController.Get:input_type -> io.defang.v1.GetRequest - 92, // 74: io.defang.v1.FabricController.GetPlaygroundProjectDomain:input_type -> google.protobuf.Empty - 35, // 75: io.defang.v1.FabricController.Delete:input_type -> io.defang.v1.DeleteRequest - 24, // 76: io.defang.v1.FabricController.Destroy:input_type -> io.defang.v1.DestroyRequest - 72, // 77: io.defang.v1.FabricController.Subscribe:input_type -> io.defang.v1.SubscribeRequest - 74, // 78: io.defang.v1.FabricController.GetServices:input_type -> io.defang.v1.GetServicesRequest - 37, // 79: io.defang.v1.FabricController.GenerateFiles:input_type -> io.defang.v1.GenerateFilesRequest - 37, // 80: io.defang.v1.FabricController.StartGenerate:input_type -> io.defang.v1.GenerateFilesRequest - 41, // 81: io.defang.v1.FabricController.GenerateStatus:input_type -> io.defang.v1.GenerateStatusRequest - 26, // 82: io.defang.v1.FabricController.Debug:input_type -> io.defang.v1.DebugRequest - 92, // 83: io.defang.v1.FabricController.SignEULA:input_type -> google.protobuf.Empty - 92, // 84: io.defang.v1.FabricController.CheckToS:input_type -> google.protobuf.Empty - 49, // 85: io.defang.v1.FabricController.PutSecret:input_type -> io.defang.v1.PutConfigRequest - 45, // 86: io.defang.v1.FabricController.DeleteSecrets:input_type -> io.defang.v1.Secrets - 54, // 87: io.defang.v1.FabricController.ListSecrets:input_type -> io.defang.v1.ListConfigsRequest - 50, // 88: io.defang.v1.FabricController.GetConfigs:input_type -> io.defang.v1.GetConfigsRequest - 49, // 89: io.defang.v1.FabricController.PutConfig:input_type -> io.defang.v1.PutConfigRequest - 53, // 90: io.defang.v1.FabricController.DeleteConfigs:input_type -> io.defang.v1.DeleteConfigsRequest - 54, // 91: io.defang.v1.FabricController.ListConfigs:input_type -> io.defang.v1.ListConfigsRequest - 57, // 92: io.defang.v1.FabricController.PutDeployment:input_type -> io.defang.v1.PutDeploymentRequest - 58, // 93: io.defang.v1.FabricController.ListDeployments:input_type -> io.defang.v1.ListDeploymentsRequest - 42, // 94: io.defang.v1.FabricController.CreateUploadURL:input_type -> io.defang.v1.UploadURLRequest - 75, // 95: io.defang.v1.FabricController.DelegateSubdomainZone:input_type -> io.defang.v1.DelegateSubdomainZoneRequest - 77, // 96: io.defang.v1.FabricController.DeleteSubdomainZone:input_type -> io.defang.v1.DeleteSubdomainZoneRequest - 78, // 97: io.defang.v1.FabricController.GetDelegateSubdomainZone:input_type -> io.defang.v1.GetDelegateSubdomainZoneRequest - 79, // 98: io.defang.v1.FabricController.SetOptions:input_type -> io.defang.v1.SetOptionsRequest - 92, // 99: io.defang.v1.FabricController.WhoAmI:input_type -> google.protobuf.Empty - 30, // 100: io.defang.v1.FabricController.Track:input_type -> io.defang.v1.TrackRequest - 92, // 101: io.defang.v1.FabricController.DeleteMe:input_type -> google.protobuf.Empty - 23, // 102: io.defang.v1.FabricController.VerifyDNSSetup:input_type -> io.defang.v1.VerifyDNSSetupRequest - 20, // 103: io.defang.v1.FabricController.GetSelectedProvider:input_type -> io.defang.v1.GetSelectedProviderRequest - 22, // 104: io.defang.v1.FabricController.SetSelectedProvider:input_type -> io.defang.v1.SetSelectedProviderRequest - 31, // 105: io.defang.v1.FabricController.CanIUse:input_type -> io.defang.v1.CanIUseRequest - 81, // 106: io.defang.v1.FabricController.Estimate:input_type -> io.defang.v1.EstimateRequest - 84, // 107: io.defang.v1.FabricController.Preview:input_type -> io.defang.v1.PreviewRequest - 86, // 108: io.defang.v1.FabricController.GenerateCompose:input_type -> io.defang.v1.GenerateComposeRequest - 13, // 109: io.defang.v1.FabricController.PutStack:input_type -> io.defang.v1.PutStackRequest - 14, // 110: io.defang.v1.FabricController.GetStack:input_type -> io.defang.v1.GetStackRequest - 17, // 111: io.defang.v1.FabricController.ListStacks:input_type -> io.defang.v1.ListStacksRequest - 19, // 112: io.defang.v1.FabricController.DeleteStack:input_type -> io.defang.v1.DeleteStackRequest - 15, // 113: io.defang.v1.FabricController.GetDefaultStack:input_type -> io.defang.v1.GetDefaultStackRequest - 62, // 114: io.defang.v1.FabricController.GetStatus:output_type -> io.defang.v1.Status - 63, // 115: io.defang.v1.FabricController.GetVersion:output_type -> io.defang.v1.Version - 61, // 116: io.defang.v1.FabricController.Token:output_type -> io.defang.v1.TokenResponse - 92, // 117: io.defang.v1.FabricController.RevokeToken:output_type -> google.protobuf.Empty - 66, // 118: io.defang.v1.FabricController.Tail:output_type -> io.defang.v1.TailResponse - 34, // 119: io.defang.v1.FabricController.Deploy:output_type -> io.defang.v1.DeployResponse - 44, // 120: io.defang.v1.FabricController.Get:output_type -> io.defang.v1.ServiceInfo - 52, // 121: io.defang.v1.FabricController.GetPlaygroundProjectDomain:output_type -> io.defang.v1.GetPlaygroundProjectDomainResponse - 36, // 122: io.defang.v1.FabricController.Delete:output_type -> io.defang.v1.DeleteResponse - 25, // 123: io.defang.v1.FabricController.Destroy:output_type -> io.defang.v1.DestroyResponse - 73, // 124: io.defang.v1.FabricController.Subscribe:output_type -> io.defang.v1.SubscribeResponse - 67, // 125: io.defang.v1.FabricController.GetServices:output_type -> io.defang.v1.GetServicesResponse - 39, // 126: io.defang.v1.FabricController.GenerateFiles:output_type -> io.defang.v1.GenerateFilesResponse - 40, // 127: io.defang.v1.FabricController.StartGenerate:output_type -> io.defang.v1.StartGenerateResponse - 39, // 128: io.defang.v1.FabricController.GenerateStatus:output_type -> io.defang.v1.GenerateFilesResponse - 27, // 129: io.defang.v1.FabricController.Debug:output_type -> io.defang.v1.DebugResponse - 92, // 130: io.defang.v1.FabricController.SignEULA:output_type -> google.protobuf.Empty - 92, // 131: io.defang.v1.FabricController.CheckToS:output_type -> google.protobuf.Empty - 92, // 132: io.defang.v1.FabricController.PutSecret:output_type -> google.protobuf.Empty - 92, // 133: io.defang.v1.FabricController.DeleteSecrets:output_type -> google.protobuf.Empty - 45, // 134: io.defang.v1.FabricController.ListSecrets:output_type -> io.defang.v1.Secrets - 51, // 135: io.defang.v1.FabricController.GetConfigs:output_type -> io.defang.v1.GetConfigsResponse - 92, // 136: io.defang.v1.FabricController.PutConfig:output_type -> google.protobuf.Empty - 92, // 137: io.defang.v1.FabricController.DeleteConfigs:output_type -> google.protobuf.Empty - 55, // 138: io.defang.v1.FabricController.ListConfigs:output_type -> io.defang.v1.ListConfigsResponse - 92, // 139: io.defang.v1.FabricController.PutDeployment:output_type -> google.protobuf.Empty - 59, // 140: io.defang.v1.FabricController.ListDeployments:output_type -> io.defang.v1.ListDeploymentsResponse - 43, // 141: io.defang.v1.FabricController.CreateUploadURL:output_type -> io.defang.v1.UploadURLResponse - 76, // 142: io.defang.v1.FabricController.DelegateSubdomainZone:output_type -> io.defang.v1.DelegateSubdomainZoneResponse - 92, // 143: io.defang.v1.FabricController.DeleteSubdomainZone:output_type -> google.protobuf.Empty - 76, // 144: io.defang.v1.FabricController.GetDelegateSubdomainZone:output_type -> io.defang.v1.DelegateSubdomainZoneResponse - 92, // 145: io.defang.v1.FabricController.SetOptions:output_type -> google.protobuf.Empty - 80, // 146: io.defang.v1.FabricController.WhoAmI:output_type -> io.defang.v1.WhoAmIResponse - 92, // 147: io.defang.v1.FabricController.Track:output_type -> google.protobuf.Empty - 92, // 148: io.defang.v1.FabricController.DeleteMe:output_type -> google.protobuf.Empty - 92, // 149: io.defang.v1.FabricController.VerifyDNSSetup:output_type -> google.protobuf.Empty - 21, // 150: io.defang.v1.FabricController.GetSelectedProvider:output_type -> io.defang.v1.GetSelectedProviderResponse - 92, // 151: io.defang.v1.FabricController.SetSelectedProvider:output_type -> google.protobuf.Empty - 32, // 152: io.defang.v1.FabricController.CanIUse:output_type -> io.defang.v1.CanIUseResponse - 83, // 153: io.defang.v1.FabricController.Estimate:output_type -> io.defang.v1.EstimateResponse - 85, // 154: io.defang.v1.FabricController.Preview:output_type -> io.defang.v1.PreviewResponse - 87, // 155: io.defang.v1.FabricController.GenerateCompose:output_type -> io.defang.v1.GenerateComposeResponse - 92, // 156: io.defang.v1.FabricController.PutStack:output_type -> google.protobuf.Empty - 16, // 157: io.defang.v1.FabricController.GetStack:output_type -> io.defang.v1.GetStackResponse - 18, // 158: io.defang.v1.FabricController.ListStacks:output_type -> io.defang.v1.ListStacksResponse - 92, // 159: io.defang.v1.FabricController.DeleteStack:output_type -> google.protobuf.Empty - 16, // 160: io.defang.v1.FabricController.GetDefaultStack:output_type -> io.defang.v1.GetStackResponse - 114, // [114:161] is the sub-list for method output_type - 67, // [67:114] is the sub-list for method input_type - 67, // [67:67] is the sub-list for extension type_name - 67, // [67:67] is the sub-list for extension extendee - 0, // [0:67] is the sub-list for field type_name + 90, // 37: io.defang.v1.Deployment.origin_metadata:type_name -> io.defang.v1.Deployment.OriginMetadataEntry + 45, // 38: io.defang.v1.Deployment.services:type_name -> io.defang.v1.ServiceInfo + 8, // 39: io.defang.v1.Deployment.cd_type:type_name -> io.defang.v1.CdType + 57, // 40: io.defang.v1.PutDeploymentRequest.deployment:type_name -> io.defang.v1.Deployment + 5, // 41: io.defang.v1.ListDeploymentsRequest.type:type_name -> io.defang.v1.DeploymentType + 91, // 42: io.defang.v1.ListDeploymentsRequest.until:type_name -> google.protobuf.Timestamp + 57, // 43: io.defang.v1.ListDeploymentsResponse.deployments:type_name -> io.defang.v1.Deployment + 91, // 44: io.defang.v1.TailRequest.since:type_name -> google.protobuf.Timestamp + 91, // 45: io.defang.v1.TailRequest.until:type_name -> google.protobuf.Timestamp + 91, // 46: io.defang.v1.LogEntry.timestamp:type_name -> google.protobuf.Timestamp + 66, // 47: io.defang.v1.TailResponse.entries:type_name -> io.defang.v1.LogEntry + 45, // 48: io.defang.v1.GetServicesResponse.services:type_name -> io.defang.v1.ServiceInfo + 91, // 49: io.defang.v1.GetServicesResponse.expires_at:type_name -> google.protobuf.Timestamp + 45, // 50: io.defang.v1.ProjectUpdate.services:type_name -> io.defang.v1.ServiceInfo + 1, // 51: io.defang.v1.ProjectUpdate.mode:type_name -> io.defang.v1.DeploymentMode + 0, // 52: io.defang.v1.ProjectUpdate.provider:type_name -> io.defang.v1.Provider + 1, // 53: io.defang.v1.DeployEvent.mode:type_name -> io.defang.v1.DeploymentMode + 91, // 54: io.defang.v1.DeployEvent.time:type_name -> google.protobuf.Timestamp + 45, // 55: io.defang.v1.SubscribeResponse.service:type_name -> io.defang.v1.ServiceInfo + 2, // 56: io.defang.v1.SubscribeResponse.state:type_name -> io.defang.v1.ServiceState + 10, // 57: io.defang.v1.WhoAmIResponse.tier:type_name -> io.defang.v1.SubscriptionTier + 91, // 58: io.defang.v1.WhoAmIResponse.paid_until:type_name -> google.protobuf.Timestamp + 91, // 59: io.defang.v1.WhoAmIResponse.trial_until:type_name -> google.protobuf.Timestamp + 0, // 60: io.defang.v1.EstimateRequest.provider:type_name -> io.defang.v1.Provider + 92, // 61: io.defang.v1.EstimateLineItem.cost:type_name -> google.type.Money + 0, // 62: io.defang.v1.EstimateResponse.provider:type_name -> io.defang.v1.Provider + 92, // 63: io.defang.v1.EstimateResponse.subtotal:type_name -> google.type.Money + 83, // 64: io.defang.v1.EstimateResponse.line_items:type_name -> io.defang.v1.EstimateLineItem + 0, // 65: io.defang.v1.PreviewRequest.provider:type_name -> io.defang.v1.Provider + 1, // 66: io.defang.v1.PreviewRequest.mode:type_name -> io.defang.v1.DeploymentMode + 11, // 67: io.defang.v1.GenerateComposeRequest.platform:type_name -> io.defang.v1.SourcePlatform + 93, // 68: io.defang.v1.FabricController.GetStatus:input_type -> google.protobuf.Empty + 93, // 69: io.defang.v1.FabricController.GetVersion:input_type -> google.protobuf.Empty + 61, // 70: io.defang.v1.FabricController.Token:input_type -> io.defang.v1.TokenRequest + 93, // 71: io.defang.v1.FabricController.RevokeToken:input_type -> google.protobuf.Empty + 65, // 72: io.defang.v1.FabricController.Tail:input_type -> io.defang.v1.TailRequest + 34, // 73: io.defang.v1.FabricController.Deploy:input_type -> io.defang.v1.DeployRequest + 70, // 74: io.defang.v1.FabricController.Get:input_type -> io.defang.v1.GetRequest + 93, // 75: io.defang.v1.FabricController.GetPlaygroundProjectDomain:input_type -> google.protobuf.Empty + 36, // 76: io.defang.v1.FabricController.Delete:input_type -> io.defang.v1.DeleteRequest + 25, // 77: io.defang.v1.FabricController.Destroy:input_type -> io.defang.v1.DestroyRequest + 73, // 78: io.defang.v1.FabricController.Subscribe:input_type -> io.defang.v1.SubscribeRequest + 75, // 79: io.defang.v1.FabricController.GetServices:input_type -> io.defang.v1.GetServicesRequest + 38, // 80: io.defang.v1.FabricController.GenerateFiles:input_type -> io.defang.v1.GenerateFilesRequest + 38, // 81: io.defang.v1.FabricController.StartGenerate:input_type -> io.defang.v1.GenerateFilesRequest + 42, // 82: io.defang.v1.FabricController.GenerateStatus:input_type -> io.defang.v1.GenerateStatusRequest + 27, // 83: io.defang.v1.FabricController.Debug:input_type -> io.defang.v1.DebugRequest + 93, // 84: io.defang.v1.FabricController.SignEULA:input_type -> google.protobuf.Empty + 93, // 85: io.defang.v1.FabricController.CheckToS:input_type -> google.protobuf.Empty + 50, // 86: io.defang.v1.FabricController.PutSecret:input_type -> io.defang.v1.PutConfigRequest + 46, // 87: io.defang.v1.FabricController.DeleteSecrets:input_type -> io.defang.v1.Secrets + 55, // 88: io.defang.v1.FabricController.ListSecrets:input_type -> io.defang.v1.ListConfigsRequest + 51, // 89: io.defang.v1.FabricController.GetConfigs:input_type -> io.defang.v1.GetConfigsRequest + 50, // 90: io.defang.v1.FabricController.PutConfig:input_type -> io.defang.v1.PutConfigRequest + 54, // 91: io.defang.v1.FabricController.DeleteConfigs:input_type -> io.defang.v1.DeleteConfigsRequest + 55, // 92: io.defang.v1.FabricController.ListConfigs:input_type -> io.defang.v1.ListConfigsRequest + 58, // 93: io.defang.v1.FabricController.PutDeployment:input_type -> io.defang.v1.PutDeploymentRequest + 59, // 94: io.defang.v1.FabricController.ListDeployments:input_type -> io.defang.v1.ListDeploymentsRequest + 43, // 95: io.defang.v1.FabricController.CreateUploadURL:input_type -> io.defang.v1.UploadURLRequest + 76, // 96: io.defang.v1.FabricController.DelegateSubdomainZone:input_type -> io.defang.v1.DelegateSubdomainZoneRequest + 78, // 97: io.defang.v1.FabricController.DeleteSubdomainZone:input_type -> io.defang.v1.DeleteSubdomainZoneRequest + 79, // 98: io.defang.v1.FabricController.GetDelegateSubdomainZone:input_type -> io.defang.v1.GetDelegateSubdomainZoneRequest + 80, // 99: io.defang.v1.FabricController.SetOptions:input_type -> io.defang.v1.SetOptionsRequest + 93, // 100: io.defang.v1.FabricController.WhoAmI:input_type -> google.protobuf.Empty + 31, // 101: io.defang.v1.FabricController.Track:input_type -> io.defang.v1.TrackRequest + 93, // 102: io.defang.v1.FabricController.DeleteMe:input_type -> google.protobuf.Empty + 24, // 103: io.defang.v1.FabricController.VerifyDNSSetup:input_type -> io.defang.v1.VerifyDNSSetupRequest + 21, // 104: io.defang.v1.FabricController.GetSelectedProvider:input_type -> io.defang.v1.GetSelectedProviderRequest + 23, // 105: io.defang.v1.FabricController.SetSelectedProvider:input_type -> io.defang.v1.SetSelectedProviderRequest + 32, // 106: io.defang.v1.FabricController.CanIUse:input_type -> io.defang.v1.CanIUseRequest + 82, // 107: io.defang.v1.FabricController.Estimate:input_type -> io.defang.v1.EstimateRequest + 85, // 108: io.defang.v1.FabricController.Preview:input_type -> io.defang.v1.PreviewRequest + 87, // 109: io.defang.v1.FabricController.GenerateCompose:input_type -> io.defang.v1.GenerateComposeRequest + 14, // 110: io.defang.v1.FabricController.PutStack:input_type -> io.defang.v1.PutStackRequest + 15, // 111: io.defang.v1.FabricController.GetStack:input_type -> io.defang.v1.GetStackRequest + 18, // 112: io.defang.v1.FabricController.ListStacks:input_type -> io.defang.v1.ListStacksRequest + 20, // 113: io.defang.v1.FabricController.DeleteStack:input_type -> io.defang.v1.DeleteStackRequest + 16, // 114: io.defang.v1.FabricController.GetDefaultStack:input_type -> io.defang.v1.GetDefaultStackRequest + 63, // 115: io.defang.v1.FabricController.GetStatus:output_type -> io.defang.v1.Status + 64, // 116: io.defang.v1.FabricController.GetVersion:output_type -> io.defang.v1.Version + 62, // 117: io.defang.v1.FabricController.Token:output_type -> io.defang.v1.TokenResponse + 93, // 118: io.defang.v1.FabricController.RevokeToken:output_type -> google.protobuf.Empty + 67, // 119: io.defang.v1.FabricController.Tail:output_type -> io.defang.v1.TailResponse + 35, // 120: io.defang.v1.FabricController.Deploy:output_type -> io.defang.v1.DeployResponse + 45, // 121: io.defang.v1.FabricController.Get:output_type -> io.defang.v1.ServiceInfo + 53, // 122: io.defang.v1.FabricController.GetPlaygroundProjectDomain:output_type -> io.defang.v1.GetPlaygroundProjectDomainResponse + 37, // 123: io.defang.v1.FabricController.Delete:output_type -> io.defang.v1.DeleteResponse + 26, // 124: io.defang.v1.FabricController.Destroy:output_type -> io.defang.v1.DestroyResponse + 74, // 125: io.defang.v1.FabricController.Subscribe:output_type -> io.defang.v1.SubscribeResponse + 68, // 126: io.defang.v1.FabricController.GetServices:output_type -> io.defang.v1.GetServicesResponse + 40, // 127: io.defang.v1.FabricController.GenerateFiles:output_type -> io.defang.v1.GenerateFilesResponse + 41, // 128: io.defang.v1.FabricController.StartGenerate:output_type -> io.defang.v1.StartGenerateResponse + 40, // 129: io.defang.v1.FabricController.GenerateStatus:output_type -> io.defang.v1.GenerateFilesResponse + 28, // 130: io.defang.v1.FabricController.Debug:output_type -> io.defang.v1.DebugResponse + 93, // 131: io.defang.v1.FabricController.SignEULA:output_type -> google.protobuf.Empty + 93, // 132: io.defang.v1.FabricController.CheckToS:output_type -> google.protobuf.Empty + 93, // 133: io.defang.v1.FabricController.PutSecret:output_type -> google.protobuf.Empty + 93, // 134: io.defang.v1.FabricController.DeleteSecrets:output_type -> google.protobuf.Empty + 46, // 135: io.defang.v1.FabricController.ListSecrets:output_type -> io.defang.v1.Secrets + 52, // 136: io.defang.v1.FabricController.GetConfigs:output_type -> io.defang.v1.GetConfigsResponse + 93, // 137: io.defang.v1.FabricController.PutConfig:output_type -> google.protobuf.Empty + 93, // 138: io.defang.v1.FabricController.DeleteConfigs:output_type -> google.protobuf.Empty + 56, // 139: io.defang.v1.FabricController.ListConfigs:output_type -> io.defang.v1.ListConfigsResponse + 93, // 140: io.defang.v1.FabricController.PutDeployment:output_type -> google.protobuf.Empty + 60, // 141: io.defang.v1.FabricController.ListDeployments:output_type -> io.defang.v1.ListDeploymentsResponse + 44, // 142: io.defang.v1.FabricController.CreateUploadURL:output_type -> io.defang.v1.UploadURLResponse + 77, // 143: io.defang.v1.FabricController.DelegateSubdomainZone:output_type -> io.defang.v1.DelegateSubdomainZoneResponse + 93, // 144: io.defang.v1.FabricController.DeleteSubdomainZone:output_type -> google.protobuf.Empty + 77, // 145: io.defang.v1.FabricController.GetDelegateSubdomainZone:output_type -> io.defang.v1.DelegateSubdomainZoneResponse + 93, // 146: io.defang.v1.FabricController.SetOptions:output_type -> google.protobuf.Empty + 81, // 147: io.defang.v1.FabricController.WhoAmI:output_type -> io.defang.v1.WhoAmIResponse + 93, // 148: io.defang.v1.FabricController.Track:output_type -> google.protobuf.Empty + 93, // 149: io.defang.v1.FabricController.DeleteMe:output_type -> google.protobuf.Empty + 93, // 150: io.defang.v1.FabricController.VerifyDNSSetup:output_type -> google.protobuf.Empty + 22, // 151: io.defang.v1.FabricController.GetSelectedProvider:output_type -> io.defang.v1.GetSelectedProviderResponse + 93, // 152: io.defang.v1.FabricController.SetSelectedProvider:output_type -> google.protobuf.Empty + 33, // 153: io.defang.v1.FabricController.CanIUse:output_type -> io.defang.v1.CanIUseResponse + 84, // 154: io.defang.v1.FabricController.Estimate:output_type -> io.defang.v1.EstimateResponse + 86, // 155: io.defang.v1.FabricController.Preview:output_type -> io.defang.v1.PreviewResponse + 88, // 156: io.defang.v1.FabricController.GenerateCompose:output_type -> io.defang.v1.GenerateComposeResponse + 93, // 157: io.defang.v1.FabricController.PutStack:output_type -> google.protobuf.Empty + 17, // 158: io.defang.v1.FabricController.GetStack:output_type -> io.defang.v1.GetStackResponse + 19, // 159: io.defang.v1.FabricController.ListStacks:output_type -> io.defang.v1.ListStacksResponse + 93, // 160: io.defang.v1.FabricController.DeleteStack:output_type -> google.protobuf.Empty + 17, // 161: io.defang.v1.FabricController.GetDefaultStack:output_type -> io.defang.v1.GetStackResponse + 115, // [115:162] is the sub-list for method output_type + 68, // [68:115] is the sub-list for method input_type + 68, // [68:68] is the sub-list for extension type_name + 68, // [68:68] is the sub-list for extension extendee + 0, // [0:68] is the sub-list for field type_name } func init() { file_io_defang_v1_fabric_proto_init() } @@ -6486,7 +6567,7 @@ func file_io_defang_v1_fabric_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_io_defang_v1_fabric_proto_rawDesc), len(file_io_defang_v1_fabric_proto_rawDesc)), - NumEnums: 12, + NumEnums: 13, NumMessages: 78, NumExtensions: 0, NumServices: 1, diff --git a/src/protos/io/defang/v1/fabric.proto b/src/protos/io/defang/v1/fabric.proto index cbf7bf6f0..55a3c52ee 100644 --- a/src/protos/io/defang/v1/fabric.proto +++ b/src/protos/io/defang/v1/fabric.proto @@ -541,6 +541,16 @@ message Deployment { DeploymentOrigin origin = 16; map origin_metadata = 17; repeated ServiceInfo services = 18; + CdType cd_type = 19; + string cd_id = 20; +} + +enum CdType { + CD_TYPE_UNSPECIFIED = 0; + CD_TYPE_AWS_CODEBUILD_BUILDID = 1; + CD_TYPE_GCP_CLOUDBUILD_BUILDID = 2; + CD_TYPE_DO_APPPLATFORM_DEPLOYMENTID = 3; + CD_TYPE_AZURE_ACI_JOBID = 4; } enum DeploymentStatus {