Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dx 2072 merge #2726

Merged
merged 3 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/platform/api/buildplanner/model/buildplan.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const (
// BuildPlan statuses
Planning = "PLANNING"
Planned = "PLANNED"
Building = "BUILDING"
Started = "STARTED"
Completed = "COMPLETED"

// Artifact statuses
Expand Down
4 changes: 2 additions & 2 deletions pkg/platform/model/buildplanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/ActiveState/cli/pkg/platform/api/buildplanner/model"
bpModel "github.com/ActiveState/cli/pkg/platform/api/buildplanner/model"
"github.com/ActiveState/cli/pkg/platform/api/buildplanner/request"
"github.com/ActiveState/cli/pkg/platform/api/headchef"
"github.com/ActiveState/cli/pkg/platform/api/headchef/headchef_models"
"github.com/ActiveState/cli/pkg/platform/api/reqsimport"
"github.com/ActiveState/cli/pkg/platform/authentication"
Expand Down Expand Up @@ -53,7 +52,7 @@ type BuildResult struct {
CommitID strfmt.UUID
Build *bpModel.Build
BuildStatusResponse *headchef_models.V1BuildStatusResponse
BuildStatus headchef.BuildStatusEnum
BuildStatus string
BuildReady bool
BuildExpression *buildexpression.BuildExpression
}
Expand Down Expand Up @@ -162,6 +161,7 @@ func (bp *BuildPlanner) FetchBuildResult(commitID strfmt.UUID, owner, project st
BuildReady: build.Status == bpModel.Completed,
CommitID: id,
BuildExpression: expr,
BuildStatus: build.Status,
}

// We want to extract the recipe ID from the BuildLogIDs.
Expand Down
7 changes: 1 addition & 6 deletions pkg/platform/runtime/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
"github.com/ActiveState/cli/internal/rtutils/ptr"
"github.com/ActiveState/cli/internal/svcctl"
"github.com/ActiveState/cli/internal/unarchiver"
"github.com/ActiveState/cli/pkg/platform/api/headchef"
"github.com/ActiveState/cli/pkg/platform/api/inventory/inventory_models"
"github.com/ActiveState/cli/pkg/platform/authentication"
apimodel "github.com/ActiveState/cli/pkg/platform/model"
Expand Down Expand Up @@ -426,14 +425,10 @@ func (s *Setup) fetchAndInstallArtifactsFromBuildPlan(installFunc artifactInstal
}

// send analytics build event, if a new runtime has to be built in the cloud
if buildResult.BuildStatus == headchef.Started {
if buildResult.BuildStatus == bpModel.Started {
s.analytics.Event(anaConsts.CatRuntime, anaConsts.ActRuntimeBuild, dimensions)
}

if buildResult.BuildStatus == headchef.Failed {
return nil, nil, &BuildError{locale.NewError("headchef_build_failure", "Build Failed: {{.V0}}", buildResult.BuildStatusResponse.Message)}
}

changedArtifacts, err := buildplan.NewBaseArtifactChangesetByBuildPlan(buildResult.Build, false)
if err != nil {
return nil, nil, errs.Wrap(err, "Could not compute base artifact changeset")
Expand Down
Loading