-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate export file migration for
verdi import
(#2820)
Fixes #2739. Invoke `verdi export migrate` in `verdi import` if it turns out the export file archive cannot be imported due to an IncompatibleArchiveVersionError. The default is to automatically migrate it (via a temporary file). Introduce the `--non-interactive` flag for `verdi import`. Add tests for new functionality. Make sure `--non-interactive` does not print confirm messages. Make sure old export files are automatically migrated, both local files and from URLs. Introduce the `--migration`/`--no-migration` choice to force migration, if needed or avoid automatic migration. This makes sure that an error code != 0 is still present, when automatic migration is not performed on old export files. Following behaviour is expected and implemented: | `migration` | `non_interactive` | Result | | ------------- | ---------------------- | ------------- | | `True`* | `False`* | Query user, migrate| | `True` | `True` | No query, migrate| | `False` | `False` | No query, no migrate| | `False` | `True` | No query, no migrate| *Default. Separate code into two utility functions that help to import and migrate.
- Loading branch information
Showing
3 changed files
with
234 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.