-
Notifications
You must be signed in to change notification settings - Fork 86
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
Add a button to invalidate all workflows for a repo #6308
Conversation
86ccdc0
to
25400aa
Compare
67c62ee
to
c3deae1
Compare
487cfcc
to
0ec6641
Compare
1e78db5
to
f4ecaa5
Compare
77bf556
to
c5adc6e
Compare
2e23944
to
c8c731d
Compare
// In the latter case, we want to be careful to not fallback to an older, | ||
// invalid snapshot. So here we generate a new version ID to guarantee | ||
// we start from a clean snapshot. | ||
return l.env.GetSnapshotService().InvalidateSnapshot(ctx, key) |
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.
what's the difference between calling InvalidateSnapshot here and returning a new random string directly?
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.
InvalidateSnapshot saves the version metadata in the cache. We want to make sure it's set, or every VM will generate a new version ID.
Ex. Let's say the version metadata expires from the cache.
T0: A VM starts up. There's no version metadata in the cache, so it generates a new version. It completes and saves a snapshot (saving a snapshot does not update the version metadata)
T1: Another VM starts up. If we hadn't saved the version metadata at T0, this will also generate a new version
a8dd9cb
to
c8d0eaa
Compare
This PR changes the behavior of the "rerun from clean runner" button to only invalidate the relevant workflow snapshot. Previously, the button would invalidate all workflows for that repo.
Add a new button to the workflows page to invalidate all workflows for a repo. We may need this if we make a breaking change that requires a universal snapshot upgrade, like a firecracker version increase, for example.
Also remove usages of ExecuteWorkflowRequest.Clean in preparation of deprecating that field. It's strange behavior that we could invalidate snapshots of unrelated workflows when invoking ExecuteWorkflow. We should use the new targeted API for this case.
Related issues: N/A