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

Add configuration flags to ddev pull, fixes #405 #1138

Merged
merged 7 commits into from Oct 10, 2018

Conversation

andrewfrench
Copy link
Contributor

@andrewfrench andrewfrench commented Sep 27, 2018

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 import

Additionally, 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.

  • Ensure that the --skip-db flag only pulls the files archive
  • Ensure that the --skip-files flag only pull the database archive
  • Ensure that the --env flag switched the default environment to be pulled from
  • Ensure that the --skip-confirmation flag bypasses the interactive confirmation step
  • Ensure that the --skip-import flag only downloads the relevant archives and skips the import step

Automated 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

@andrewfrench andrewfrench added this to the v1.3.0 milestone Sep 27, 2018
@andrewfrench andrewfrench self-assigned this Sep 27, 2018
@andrewfrench andrewfrench force-pushed the 2018-09-26_pull-flags branch 2 times, most recently from 9b7dc5b to e17d57b Compare October 2, 2018 19:53
Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had no trouble with this or with the code. I tested on macOS Mojave against Pantheon. I tried ddev pull, ddev pull -y, ddev pull --skip-db, ddev pull --skip-files, all behaved as expected. Brad's mom will be very happy.

@andrewfrench andrewfrench merged commit c9e3cb5 into ddev:master Oct 10, 2018
@andrewfrench andrewfrench deleted the 2018-09-26_pull-flags branch October 10, 2018 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants