Add configuration flags to ddev pull, fixes #405 #1138
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Problem/Issue/Bug:
#405
The entire pull process was required for each invocation of
ddev pull
, which is not ideal when file and database assets can be in the many gigabytes.How this PR Solves The Problem:
This adds several configuration flags to
ddev pull
:--skip-db
does not download or import the remote database backup asset--skip-files
does not download or import the remote file backup asset--env
determines the remote environment to pull from--skip-confirmation
will bypass the interactive confirmation and begin the pull--skip-import
will download file or database backup assets, but skip the importAdditionally, an update was made to respect the
DRUD_NONINTERACTIVE
environment variable to bypass confirmation, and is functionally equivalent to the--skip-confirmation
flag.Manual Testing Instructions:
With a remote environment configured, execute
ddev pull
with combinations of the above flags. These changes are not adding much new functionality other than the ability to configure the environment being pulled from, but are adding options to bypass default steps of the pull process.--skip-db
flag only pulls the files archive--skip-files
flag only pull the database archive--env
flag switched the default environment to be pulled from--skip-confirmation
flag bypasses the interactive confirmation step--skip-import
flag only downloads the relevant archives and skips the import stepAutomated Testing Overview:
There remain to be no automated tests for
ddev pull
. I plan to refactor the Provider code into an interface to allow for easy mocking and improved testability.Related Issue Link(s):
#405