Skip to content

Commit 2d271e1

Browse files
committed
Return a commit even if there's a polling error.
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.
1 parent 4dc43db commit 2d271e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/platform/model/buildplanner/commit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func (b *BuildPlanner) StageCommit(params StageCommitParams) (*Commit, error) {
7272
if resp.Build.Status == raw.Planning {
7373
resp.Build, err = b.pollBuildPlanned(resp.CommitID.String(), params.Owner, params.Project, nil)
7474
if err != nil {
75-
return nil, errs.Wrap(err, "failed to poll build plan")
75+
return &Commit{resp, nil, nil}, errs.Wrap(err, "failed to poll build plan")
7676
}
7777
}
7878

0 commit comments

Comments
 (0)