Repository navigation
Conversation
Tasks often create things for themselves, such as clients of other services, which leaves a graph with no way to give it fakes in a test. An input wrapped in Override replaces the task providing its key, which does not run, instead of being a duplicate binding. A plain input for a provided key is still an error, so a key is only ever replaced on purpose. Overriding a key no task provides, or only some of the keys a task provides, is an error too, as is overriding a key twice. An absent override replaces the task with a failure. Overrides are part of the Binder returned from Run, and inputs only a replaced task needed are no longer required. Graph.Check validates overrides. Skipped tasks are not signalled by the tasks they depend on, which would otherwise block on a channel with no receiver. taskgraphtest's Test and Suite take Overrides, those of a Test replacing those of its Suite for the same key.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tasks often create things for themselves, such as clients of other services, which leaves a graph with no way to give it fakes in a test. An input wrapped in Override replaces the task providing its key, which does not run, instead of being a duplicate binding.
A plain input for a provided key is still an error, so a key is only ever replaced on purpose. Overriding a key no task provides, or only some of the keys a task provides, is an error too, as is overriding a key twice. An absent override replaces the task with a failure. Overrides are part of the Binder returned from Run, and inputs only a replaced task needed are no longer required. Graph.Check validates overrides.
Skipped tasks are not signalled by the tasks they depend on, which would otherwise block on a channel with no receiver.
taskgraphtest's Test and Suite take Overrides, those of a Test replacing those of its Suite for the same key.