-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Distiguishing "finished exec" and "built specs" in TaskStatus (#542)
This fixes the regression reported in sourcegraph/sourcegraph#21230 and introduced by yours truly in d6c876c. With the introduction of the Coordinator and the explicit steps of checking-the-cache-for and building-of ChangesetSpecs outside the executor, the `TaskStatus.ChangesetSpecs` field wasn't set at the time when `FinishedAt` was set. The `batchProgressPrinter` assumed, though, that this was the case and that if `FinishedAt` was set that `len(taskStatus.ChangesetSpecs) == 0` means "No changes". This change here fixes the problem by distinguishing between the two states: finished execution of steps and finished building changeset specs. The problem is that it's still a slight regression in behaviour: previously the diff stats would be printed in the status bar and in the verbose mode *as tasks were finishing*. Now that we build all changeset specs at once, after all of them have been executed, we can't update the status bar to include diff stats and the verbose messages will be logged all at once. I still think that the current code (with the Coordinator) is better than what we had before and the hard problem here is fixed (no wrong information being displayed), but longer term I think there's a solution possible in which we decouple the task execution and its status much more and make it possible to build better UIs for the status of execution. That I think should be approached separately though.
- Loading branch information
Showing
5 changed files
with
119 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters