-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(save): recall transform on empty --apply, write run operations
On save, transform components are recalled from history if no transform component is provided to save. This used to be accomplished with a "recall: tf" param, but I've kept it as a transform-specific feature this go-round. I think it ties in a little better with the new --apply semantics. When saving with a trasnform we now build up a *run.State with the RunID event subscription. I'd initally experimented with designs that had runState built and returned within `transform.Apply`, but found it too easy to create a data race when transform.Apply's wait argument is false. In that case transform.Apply doesn't have a clear moment of when to return a run.State value without giving back a channel, or adding mutex locks & accessor methods to run.State. Seems it's easier to just build run.State from an external event listener. This commit introduces automation failure logging, but creates a new issue in the process: When a user "manually" invokes save with the apply flag and the transform fails, a record of that failure will be recorded, which might feel counterintuitive. The problem here is we're not passing any details to save that lets us disambiguate automation-driven `save` calls from user-driven ones.
- Loading branch information
Showing
6 changed files
with
77 additions
and
28 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