-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more methods to control cache invalidation of completed process n…
…ode (#3637) A new attribute `invalidates_cache` is added to the `ExitCode` named tuple which is false by default. If a process node has an exit status that corresponds to an exit code with `invalidate_cache=False`, the node should not be considered for caching. This functionality is leveraged in the `ProcessNode.is_valid_cache` method which will return false if the exit code set on the node belongs to an invalid cache exit code. This method provides an additional hook over the same method on the `ProcessNode` class to allow plugins to add additional custom logic in `Process` sub-classes. Note that this is a backwards-incompatible change, which can break code that uses unpacking of `ExitCode` tuples, for example: status, message = ExitCode(...) Finally, the new `Process.is_valida_cache` implementation requires the class to be importable for it to be considered cachable. In the case of process functions this means that the function is importable. This meant that process function definitions in the unit tests had to be moved to the module level.
- Loading branch information
Showing
8 changed files
with
161 additions
and
35 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
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