Skip to content

Commit

Permalink
Return a commit even if there's a polling error.
Browse files Browse the repository at this point in the history
Recent Platform changes have resulted in every stageCommit call responding with "build planning".

`state import` does not care if the plan ultimately fails due to requirements not being found. It should still make the commit.
  • Loading branch information
mitchell-as committed Jan 16, 2025
1 parent 4dc43db commit 2d271e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/platform/model/buildplanner/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (b *BuildPlanner) StageCommit(params StageCommitParams) (*Commit, error) {
if resp.Build.Status == raw.Planning {
resp.Build, err = b.pollBuildPlanned(resp.CommitID.String(), params.Owner, params.Project, nil)
if err != nil {
return nil, errs.Wrap(err, "failed to poll build plan")
return &Commit{resp, nil, nil}, errs.Wrap(err, "failed to poll build plan")
}
}

Expand Down

0 comments on commit 2d271e1

Please sign in to comment.