fix: migration of old datasets#639
Conversation
|
can you make sure to check for any paths in a even if the bug which causes the reported problem is fixed... |
I'm trying to reproduce it, but still not fully understanding how that happened. Let's merge this as is until I can look more in-depth into #646 issue. |
|
Using https://dev.renku.ch/projects/lorenzo.cavazzi.tech/zurich-bikes-tutorial I get: |
rokroskar
left a comment
There was a problem hiding this comment.
Thanks for looking into this! I think checking for the old-style relative paths that point to outside the repo is the final thing to add.
|
Running through the toy example from #636 (comment) but using the code from this PR instead of renku and I still have a submodule in the repo: checked out in the |
|
argh... I'm finding now another issue where the file paths are absolute - so they can't be resolved when the repo is cloned somewhere else. Do you want to deal with that in the migration as well? Otherwise I need to check for this every time I instantiate a |
|
How did you test this? I tested it again this morning and it works for me and also I have a test which reproduces the report from #636 which is passing. |
|
looks good :D |
|
Trying to migrate the dataset from https://renkulab.io/gitlab/ACE-ASAID/meteorology (after deleting the new one) I get which I guess is because of absolute paths: |
rokroskar
left a comment
There was a problem hiding this comment.
Looking more closely at the migration code, there is a lot of looping through the datasets and files - this could get annoyingly expensive. Wouldn't it be better to loop once and define the necessary functions either at the Dataset or DatasetFile level?
I also have some issues with the tests, getting output like:
fatal: repository '/home/sam/Work/data_repos/old-datasets-v0.3.0' does not exist
fatal: clone of '/home/sam/Work/data_repos/old-datasets-v0.3.0' into submodule path '/private/var/folders/99/jng0jljd13db0h4jwbwtx4mh0000gn/T/pytest-of-rok/pytest-18/repo0/.renku/vendors/local/home/sam/Work/data_repos/old-datasets-v0.3.0' failed
Failed to clone '.renku/vendors/local/home/sam/Work/data_repos/old-datasets-v0.3.0'. Retry scheduled
fatal: repository '/home/sam/Work/data_repos/old-datasets-v0.3.0' does not exist
fatal: clone of '/home/sam/Work/data_repos/old-datasets-v0.3.0' into submodule path '/private/var/folders/99/jng0jljd13db0h4jwbwtx4mh0000gn/T/pytest-of-rok/pytest-18/repo0/.renku/vendors/local/home/sam/Work/data_repos/old-datasets-v0.3.0' failed
Failed to clone '.renku/vendors/local/home/sam/Work/data_repos/old-datasets-v0.3.0' a second time, aborting
Structurally, I don't understand why the migrations (or the tests) are lumped under "CLI"? In both contexts it should be under "models" imho.
|
Another thing I noticed - |
|
apologies, my repo found itself in a state from which the only easy way out was a force-push... |
rokroskar
left a comment
There was a problem hiding this comment.
almost there - I think the lock file handling is the last small detail. Otherwise all the other problems seem to be fixed. Thanks!!
| ) | ||
|
|
||
|
|
||
| class NothingToCommit(RenkuException, click.ClickException): |
There was a problem hiding this comment.
I wonder if this should be an error or a warning?
There was a problem hiding this comment.
IMHO, empty commits should never happen from renku side. Now I agree that it's not the best UX, but currently, due to how things are implemented (via decorators) we don't have an effective way of capturing this exception and showing nice message to the user. 😞
rokroskar
left a comment
There was a problem hiding this comment.
I'm not entirely sure about returning an error when there is nothing to commit, but otherwise it all seems to work now!! 🎉
closes #636
closes #646