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(cli): add renku rollback command #2426
Conversation
a9b879c
to
97d7bcb
Compare
97d7bcb
to
88bace0
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.
🚀
+1 on the PR description 😻 |
This looks great @Panaetius - just a few quick observations:
|
88bace0
to
4a45603
Compare
Well I thought if we ever allow running renku commands without commit (i.e. you have to explicitly commit once you're happy) we wouldn't have one. But at the moment we can add it, might be useful.
it starts paging after 50 entries (you press 'm' to show the next 50), in a lazy way (so we don't have to parse the whole commit history every time the command is run).
👍
? |
Hmm good point regarding the sha. How would this work if commands were not tied to commits? I guess we would make a new commit that would undo whatever had been done? Or we would revert to a commit before the command in question? In the latter case, having the commit sha would still be useful since it would allow the user to quickly place the command in the broader context. The emoji suggestion was mostly a joke, but I like 🔥 😄 |
25430dc
to
6f228d9
Compare
Hi @Panaetius I'm currently testing the repo out - I've run into a bug - I can't seem to fetch datasets |
@gavin-k-lee You can't use that project on renkulab, it uses renku-python version 1.0.0 and is not supported by the current version of renkulab. You should be able to start an interactive session and work there (the Dockerfile is set up to use this branch) or clone it locally, install this branch and work there. |
@gavin-k-lee The garbage bin? I didn't want to spam emojis and just added the flame |
Oh right ok. |
This looks good (apologies for taking a while to re-review)! |
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.
🔥 ♻️
c69f7b7
to
57a1fc8
Compare
57a1fc8
to
5d6e19d
Compare
from renku.core.models.workflow.plan import AbstractPlan | ||
from renku.core.utils import communication | ||
|
||
CHECKPOINTS_PER_PAGE = 50 |
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.
why define twice this static var? see in renku/cli/rollback.py
above CHECKPOINTS_PER_PAGE = 10
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.
closes #2351
closes #440
adds a
renku rollback
command. The user gets presented with a (paginated) history of renku actions and can pick a point in time to return to, they are then shown all entities and files that would be changed by this action and, if they confirm, the repo is reset to that state.Also removes the need for most renku commands to create multiple commits (with the exception of migrations).
Can be tested in https://renkulab.io/projects/ralf.grubenmann/test-rollback
Command to run:
renku rollback