-
Notifications
You must be signed in to change notification settings - Fork 189
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 the -v/--version
option to verdi export migrate
#3910
Add the -v/--version
option to verdi export migrate
#3910
Conversation
11c971e
to
57145b2
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.
Thanks @sphuber.
Good to see that all cmdline
stuff is pulled out of the importexport
module!
This seems to be a nice little "fix" for stopping underway in the migration as well.
There are some other migration tests that seem to fail, but other than that I only found a small "typo" and otherwise approve this change.
See specific migration functions for detailed descriptions. | ||
|
||
:param metadata: the content of an export archive metadata.json file | ||
:param data: the content of an export archive data.json file | ||
:param folder: SandboxFolder in which the archive has been unpacked (workdir) | ||
:param version: the version to migrate to, by default is the current export version |
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.
:param version: the version to migrate to, by default is the current export version | |
:param version: the version to migrate to, by default the current export version |
or it is
.
57145b2
to
e49231e
Compare
Since you're adding functionality to Furthermore, the failing test (that I see you have now fixed) was originally a request by @ltalirz that upon failure the exit code should be non-zero. Can you confirm that this is still the case? (Since we're raising in all cases, I guess this is still the case, but just to be sure.) There should probably already be another test for this? |
Good point, will add it
The behavior is still the same, I simply made the utility function raise instead of echo'ing directly. The CLI now catches this exception and turns it into a critical echo. We should not include |
Codecov Report
@@ Coverage Diff @@
## develop #3910 +/- ##
========================================
Coverage 78.00% 78.01%
========================================
Files 457 457
Lines 33708 33714 +6
========================================
+ Hits 26294 26301 +7
+ Misses 7414 7413 -1
Continue to review full report at Codecov.
|
e49231e
to
2a3a28f
Compare
I completely agree, as per my original review 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.
Thanks for the additional test.
Since I anyway found a wrong comment in the test you updated (in fact, you may remove the comment completely), I also added another suggested change - just because :)
Just ping me after the change and I'll approve.
I'm sure raising an exception/echo_critical will result in a nonzero exit code, so no complaints from my side. |
The default behavior remains the same and if not specified the export archive will be migrated to the latest version. However, with the flag any other version can be chosen, as long as it constitutes a forward migration as backward migrations are not supported.
2a3a28f
to
08f38d0
Compare
@CasperWA done and done |
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.
Thanks @sphuber ! Merge away 🚀
Fixes #3909
The default behavior remains the same and if not specified the export
archive will be migrated to the latest version. However, with the flag
any other version can be chosen, as long as it constitutes a forward
migration as backward migrations are not supported.