Skip to content

Commit 4fa93d7

Browse files
authored
Merge pull request #3749 from ActiveState/mitchell/cp-1077
After dynamically evaluating a build plan, staging a commit needs to use the latest timestamp.
2 parents f44123f + a7ca026 commit 4fa93d7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/runbits/reqop_runbit/update.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ func UpdateAndReload(prime primeable, script *buildscript.BuildScript, oldCommit
7575
if err := script.SetDynamic(false); err != nil {
7676
return errs.Wrap(err, "Setting dynamic failed")
7777
}
78+
// StageCommitAndPoll needs to be called with atTime=now, not the previous script's atTime.
79+
latest, err := model.FetchLatestRevisionTimeStamp(prime.Auth())
80+
if err != nil {
81+
return errs.Wrap(err, "Failed to fetch latest timestamp")
82+
}
83+
script.SetAtTime(latest, true)
7884
}
7985

8086
commitParams := buildplanner.StageCommitParams{

0 commit comments

Comments
 (0)