-
Notifications
You must be signed in to change notification settings - Fork 192
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
Capture ImportTestRun
as dry-run
success
#6403
Conversation
2bc6f5e
to
70949c7
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 @GeigerJ2 Changes look good. Just kind of surprised that this wasn't tested yet. Could you please add a quick test? Should be very straightforward to add in tests/cmdline/commands/test_archive_import.py
. Just need to make sure the command finishes correctly as opposed to excepting like it does now 😄
70949c7
to
7f377fc
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6403 +/- ##
==========================================
+ Coverage 77.51% 77.67% +0.16%
==========================================
Files 560 562 +2
Lines 41444 41660 +216
==========================================
+ Hits 32120 32354 +234
+ Misses 9324 9306 -18 ☔ View full report in Codecov by Sentry. |
7f377fc
to
b0b0606
Compare
f2cc633
to
2ca485c
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 @GeigerJ2
aiidateam#6403) The import module raises `ImportTestRun` after a dry-run of a importing archive has finished successfully. This was not caught separately by the `verdi archive import` command resulting in a critical error being returned even in the case of a successful dry-run. The exception is now caught and a success message is logged instead.
Fixes #6401
In the
_import_archive_and_migrate
function, theImportTestRun
exception is specifically captured, success communicated to the user, and the function returned to not print the finalecho_successs
which is issued after actual archive import into the profile.