diff --git a/.changelog/4099.txt b/.changelog/4099.txt new file mode 100644 index 00000000000..dd593194614 --- /dev/null +++ b/.changelog/4099.txt @@ -0,0 +1,4 @@ +```release-note:improvement +core: Auto run a status report after a deployment or release operation rather +than only if `waypoint deploy` or `waypoint release` CLI is run. +``` diff --git a/internal/cli/deployment_create.go b/internal/cli/deployment_create.go index ed2cca27245..defb27afa0f 100644 --- a/internal/cli/deployment_create.go +++ b/internal/cli/deployment_create.go @@ -70,18 +70,6 @@ func (c *DeploymentCreateCommand) Run(args []string) int { hostname = hostnamesResp.Hostnames[0] } - // Status Report - app.UI.Output("") - _, err = app.StatusReport(ctx, &pb.Job_StatusReportOp{ - Target: &pb.Job_StatusReportOp_Deployment{ - Deployment: deployment, - }, - }) - if err != nil { - app.UI.Output(clierrors.Humanize(err), terminal.WithErrorStyle()) - return ErrSentinel - } - // Release if we're releasing var releaseUrl string if c.flagRelease { diff --git a/internal/cli/release_create.go b/internal/cli/release_create.go index 3e124b35820..f2def906c24 100644 --- a/internal/cli/release_create.go +++ b/internal/cli/release_create.go @@ -182,18 +182,6 @@ func (c *ReleaseCreateCommand) Run(args []string) int { tbl := fmtVariablesOutput(resp.VariableFinalValues) c.ui.Table(tbl) - // Status Report - app.UI.Output("") - _, err = app.StatusReport(ctx, &pb.Job_StatusReportOp{ - Target: &pb.Job_StatusReportOp_Release{ - Release: result.Release, - }, - }) - if err != nil { - app.UI.Output(clierrors.Humanize(err), terminal.WithErrorStyle()) - return ErrSentinel - } - if result.Release.Url == "" { app.UI.Output("\n"+strings.TrimSpace(releaseNoUrl), deploy.Id, diff --git a/internal/runner/operation_deploy.go b/internal/runner/operation_deploy.go index f1af4323a72..324ab24285b 100644 --- a/internal/runner/operation_deploy.go +++ b/internal/runner/operation_deploy.go @@ -52,6 +52,12 @@ func (r *Runner) executeDeployOp( return nil, err } + // Run a status report on the recent deployment + _, err = app.DeploymentStatusReport(ctx, deployment) + if err != nil { + return nil, err + } + return &pb.Job_Result{ Deploy: &pb.Job_DeployResult{ Deployment: deployment, diff --git a/internal/runner/operation_release.go b/internal/runner/operation_release.go index af06517321e..fcaf6cff2df 100644 --- a/internal/runner/operation_release.go +++ b/internal/runner/operation_release.go @@ -211,5 +211,11 @@ func (r *Runner) executeReleaseOp( } } + // Run a status report operation on the recent release + _, err = app.ReleaseStatusReport(ctx, release) + if err != nil { + return nil, err + } + return result, nil }