Reputation: 157
I am trying to setup DDEV on a Drupal 10 project pulled from Acquia Cloud Platform. Following the docs related to Acquia integration, I got to the point where the DB is imported as expected, but I get an error when pulling the files:
Obtaining files...
+ set -eu -o pipefail
+ ls /var/www/html/.ddev
+ pushd /var/www/html/.ddev/.downloads
+ drush -r docroot rsync --exclude-paths=styles:css:js '--alias-path=~/.drush' -q -y @mysite.dev:%files ./files
In BackendPathEvaluator.php line 88:
Cannot evaluate path alias %files for site alias @mysite.dev
Pull failed: Failed to exec set -x # You can enable bash debugging output by uncommenting
set -eu -o pipefail
ls /var/www/html/.ddev >/dev/null # This just refreshes stale NFS if possible
pushd /var/www/html/.ddev/.downloads >/dev/null;
drush -r docroot rsync --exclude-paths='styles:css:js' --alias-path=~/.drush -q -y @${project_id}:%files ./files
on web: exit status 1
Do you have any suggestions on overcoming this error? Do I need to add an aliases file somewhere (although this is not mentioned in the docs)?
Later edit: I have added an aliases file under drush/sites/
folder in the project with the content that can be seen below, but the error is still thrown.
# Application 'mysite', environment 'dev'.
dev:
root: /var/www/html/docroot
ac-site: mysite
ac-env: ...
ac-realm: ...
uri: mysite.prod.acquia-sites.com
host: mysite.ssh.prod.acquia-sites.com
user: mysite.dev
paths:
- drush-script: drush9
- files: sites/default/files
Also tried "%files": sites/default/files
but had the same behavior.
Using ddev drush sa
command I get the following output:
'@mysite.dev':
root: /var/www/html/docroot
ac-site: mysite
ac-env: ...
ac-realm: ...
uri: mysite.prod.acquia-sites.com
host: mysitedev.ssh.prod.acquia-sites.com
user: mysite.dev
paths:
-
drush-script: drush9
-
files: sites/default/files
After further investigation, I found out that the aliases file that was added in drush/sites/
folder is not used because the drush rsync
command is reading aliases from a different location (--alias-path=~/.drush). At that location are the aliases files downloaded from Acquia Cloud Platform, in which there is no files
path alias defined.
Upvotes: 1
Views: 389
Reputation: 157
As mentioned in the update made to the question, the error is generated by the fact that drush rsync
command is called with --alias-path=~/.drush
paramter. In that folder are located the aliases files downloaded from Acquia Cloud Platform, but in those files there are no path aliases defined for files
. The aliases file added in the project is not used when --alias-path=~/.drush
parameter is specified.
I was not able to determine what is wrong in the overall process (since I am following docs and I suppose those steps are tested and verified). Maybe there is some configuration that needs to be done on Acquia Cloud Platform to include a path alias for files
, or maybe aliases files from Acquia Cloud Platform should not define a path alias for files
and that should be resolved somehow automatically when default folders are used, but didn't find an answer for these assumptions.
However, I was able to find a workaround by adding an aliases file in the project in which is defined a path alias for files
and after that modify the drush rsync
command to not specify the --alias-path=~/.drush
parameter anymore.
Upvotes: 0