-
Notifications
You must be signed in to change notification settings - Fork 69
Do not re-execute campaign spec steps when the diff is still valid #282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
LawnGnome
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an elegant solution. (Actually, quite a bit more elegant than I expected it to be when we talked about it!)
Since it took me a couple of reads to get why this was OK, I'd love a touch more commentary in the cache path, but otherwise I think this is good to go. 👍
mrnugget
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this was ... less hairy than I thought it would be. Well done! 👏
Agree with Adam that a comments would be cool
|
Credit for elegance of the solution goes entirely to Erik. 😄 |
LawnGnome
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but I am interested in @mrnugget's thoughts on the multiple commit scenario, at least in theory. (I think what's in place right now is fine.)
|
Left my thoughts here #282 (comment) (and linking to them because it's easy to miss in GitHub's PR view). I'm going to merge this now so it's in |
By changing the JSON marshalling of
Taskto ignore theTemplate, this makes it so that changes to the template (assuming no changes tosteps:oron:) will serialize to the same JSON, so the previous run is found in the cache.We then reuse the diff from the cache, and otherwise use the new spec.
Testing: I tested this manually with the hello world campaign. I think everything worked correctly, and that my errors were unrelated to this feature, but I'd really appreciate someone else running a campaign and verifying that this works for them, too.
Closes #13172