-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat(workflow): workflow revert command #2956
Conversation
c83046f
to
95d230f
Compare
4c3137c
to
f7f6566
Compare
f7f6566
to
ec67300
Compare
27b4f52
to
9581973
Compare
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.
Amazing how quick this was done, great work!
We should also have someone from ORDES review this (with some instructions) once we settled on a stable state.
renku/core/workflow/plan.py
Outdated
communication.confirm(prompt_text, abort=True, warning=True) | ||
|
||
for derivative_plan in get_derivative_chain(plan): | ||
derivative_plan.delete(when=when) |
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 a bit of a break from how we do deletions on datasets, where we just add a new derivation that has invalidated_at set.
I wonder if we should bring these in line. Also not sure how it affects KG if they get modified Plan nodes
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.
I already mark all activities in the activity chain as deleted. If that's an issue for KG then we shouldn't do that and #2954 cannot be done. I'll talk to KG about this.
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.
when I added renku workflow remove
, the idea way that a Plan chain ends in a node that is deleted, it means all versions are deleted. I think the filtering out of deleted plans in other commands was don't in parallel in a separate PR and only the nodes that are invalidated are ignored (but not their parents). I think the latter is wrong and we should treat it the same as datasets (an invalidation invalidates the whole chain).
For activities it's fine since they can't be edited (just removed).
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.
I've talked to Kuba about this and it's OK to set a property that didn't have a value before (prov:wasInvalidatedAt
in this case). This may affect project's fork if deletion was done after the fork (all forked projects see the plan as deleted) but they will fix this in future by name-spacing forks since this happens for all other properties as well.
aa17dd5
to
86abbeb
Compare
86abbeb
to
a1fa5a0
Compare
497035b
to
7478d8e
Compare
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.
One minor change, otherwise looks great 👍
Description
renku workflow revert
command. There are some deviations from the story definition:--soft
is renamed to--metadata-only
--plans
is renamed to--plan
ActivityGateway.get_all_activities
won't return deleted activities by default.--force
in such cases.When deleting a plan, it creates a derivative plan and marks it as deleted.
Fixes #2342
Fixes #2969
NOTE
We don't detect files that are used in datasets and might still delete them if they are not used in a workflow.