Skip to content

Commit

Permalink
Merge branch 'version/0-46-0-RC1' into mitchell/dx-2921
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchell-as committed Aug 19, 2024
2 parents 3e6cbfb + e93bdae commit 37545fc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion internal/runners/initialize/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ func (r *Initialize) Run(params *RunParams) (rerr error) {
}
solveSpinner.Stop(locale.T("progress_success"))

dependencies.OutputSummary(r.out, commit.BuildPlan().RequestedArtifacts())
// When running `state init` we want to show all of the dependencies that will be installed.
dependencies.OutputSummary(r.out, commit.BuildPlan().Artifacts())
rti, err := runtime_runbit.Update(r.prime, trigger.TriggerInit, runtime_runbit.WithCommit(commit))
if err != nil {
return errs.Wrap(err, "Could not setup runtime after init")
Expand Down
17 changes: 9 additions & 8 deletions internal/runners/packages/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,20 @@ func (i *Import) Run(params *ImportRunParams) (rerr error) {
Description: msg,
Script: bs,
})
// Always update the local commit ID even if the commit fails to build
if stagedCommit != nil && stagedCommit.Commit != nil && stagedCommit.Commit.CommitID != "" {
if err := localcommit.Set(proj.Dir(), stagedCommit.CommitID.String()); err != nil {
solveSpinner.Stop(locale.T("progress_fail"))
return locale.WrapError(err, "err_package_update_commit_id")
}
pg.Stop(locale.T("progress_success"))
pg = nil
}
if err != nil {
solveSpinner.Stop(locale.T("progress_fail"))
return locale.WrapError(err, "err_commit_changeset", "Could not commit import changes")
}

pg.Stop(locale.T("progress_success"))
pg = nil

if err := localcommit.Set(proj.Dir(), stagedCommit.CommitID.String()); err != nil {
solveSpinner.Stop(locale.T("progress_fail"))
return locale.WrapError(err, "err_package_update_commit_id")
}

// Output change summary.
previousCommit, err := bp.FetchCommit(localCommitId, proj.Owner(), proj.Name(), nil)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/platform/model/buildplanner/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (b *BuildPlanner) StageCommit(params StageCommitParams) (*Commit, error) {
}

if response.IsErrorResponse(resp.Commit.Build.Type) {
return nil, response.ProcessBuildError(resp.Commit.Build, "Could not process error response from stage commit")
return &Commit{resp.Commit, nil, nil}, response.ProcessBuildError(resp.Commit.Build, "Could not process error response from stage commit")
}

// The BuildPlanner will return a build plan with a status of
Expand Down
3 changes: 1 addition & 2 deletions test/integration/init_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,7 @@ func (suite *InitIntegrationTestSuite) TestInit_ChangeSummary() {
cp.Expect("Done")
ts.NotifyProjectCreated(e2e.PersistentUsername, project)
cp.Expect("Setting up the following dependencies:")
cp.Expect("└─ [email protected]")
suite.Assert().NotContains(cp.Snapshot(), "├─", "more than one dependency was printed")
cp.Expect("├─ [email protected]")
cp.ExpectExitCode(0)
}

Expand Down

0 comments on commit 37545fc

Please sign in to comment.