Skip to content
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

Calling verdi export migrate on an up-to-date file should return exit code 0 #4322

Closed
ltalirz opened this issue Aug 26, 2020 · 2 comments · Fixed by #4220
Closed

Calling verdi export migrate on an up-to-date file should return exit code 0 #4322

ltalirz opened this issue Aug 26, 2020 · 2 comments · Fixed by #4220
Assignees
Milestone

Comments

@ltalirz
Copy link
Member

ltalirz commented Aug 26, 2020

Currently, when trying to migrate an export file that is already at the latest version, you get a critical error:

$ verdi export migrate old.aiida new.aiida
Critical: Your export file is already at the version 0.9

This makes it unnecessarily difficult to migrate a bunch of archives to the latest version (e.g. needed on Materials Cloud) - currently, you need to first check what version an archive has, and only if it is not already at the latest version, perform the migration.

The much simpler solution is to make the migration of an archive that is already at the latest version a no-op and return exit code 0.

@CasperWA
Copy link
Contributor

It would be nice to inform the user about the export archive already being at the latest version as well, instead of just writing "Success" or nothing at all?

@ltalirz
Copy link
Member Author

ltalirz commented Aug 27, 2020

Currently it says

Success: migrated the archive from version 0.9 to 0.9

which is also not too bad.

Anyhow, I've now adapted it a bit here 268f84e

@sphuber sphuber added this to the v1.3.2 milestone Sep 11, 2020
@sphuber sphuber modified the milestones: v1.3.2, v1.4.0 Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants