Open kopeboy opened 2 years ago
Just chipping in here to say that I experience the exact same thing when following the README. The project is created with this template.
Here's my output:
ddev pull platform
You're about to delete the current database and files and replace with the results of a fresh pull.
Would you like to continue? [Y/n] (yes):
Authenticating...
Obtaining databases...
[InvalidArgumentException]
Specifying the --app or --worker is required in non-interactive mode
Usage: platform relationships [-P|--property PROPERTY] [--refresh] [-p|--project PROJECT] [-e|--environment ENVIRONMENT] [-A|--app APP] [-i|--identity-file IDENTITY-FILE] [--] [<environment>]
For more information, type: platform help environment:relationships
Pull failed: Failed to exec # set -x # You can enable bash debugging output by uncommenting
set -eu -o pipefail
export PLATFORMSH_CLI_NO_INTERACTION=1
ls /var/www/html/.ddev >/dev/null # This just refreshes stale NFS if possible
# /tmp/db_relationships.yaml is the full yaml output of the database relationships
db_relationships_file=/tmp/db_relationships.yaml
PLATFORM_RELATIONSHIPS="" platform relationships -y -e "${PLATFORM_ENVIRONMENT}" | yq 'with_entries(select(.[][].type == "mariadb:*" or .[][].type == "*mysql:*" or .[][].type == "postgresql:*")) ' >${db_relationships_file}
db_relationships=($(yq ' keys | .[] ' ${db_relationships_file}))
db_names=($(yq '.[][].path' ${db_relationships_file}))
db_count=${#db_relationships[@]}
# echo "db_relationships=${db_relationships} sizeof db_relationships=${#db_relationships[@]} db_names=${db_names} db_count=${db_count} PLATFORM_PRIMARY_RELATIONSHIP=${PLATFORM_PRIMARY_RELATIONSHIP}"
# If we have only one database, import it into local database named 'db'
if [ ${#db_names[@]} -eq 1 ]; then db_names[0]="db"; fi
for (( i=0; i<${#db_relationships[@]}; i++ )); do
db_name=${db_names[$i]}
rel=${db_relationships[$i]}
# if PLATFORM_PRIMARY_RELATIONSHIP is set, then when doing that one, import it into local database 'db'
if [ "${rel}" = "${PLATFORM_PRIMARY_RELATIONSHIP:-notset}" ] ; then
echo "PLATFORM_PRIMARY_RELATIONSHIP=${PLATFORM_PRIMARY_RELATIONSHIP:-} so using it as database 'db' instead of the upstream '${db_name}'"
db_name="db"
fi
platform db:dump --yes --relationship=${rel} --gzip --file=/var/www/html/.ddev/.downloads/${db_name}.sql.gz --project="${PLATFORM_PROJECT:-setme}" --environment="${PLATFORM_ENVIRONMENT:-setme}"
done
echo "Downloaded db dumps for databases '${db_names[@]}'"
on web: exit status 1
In recent versions of DDEV you don't have to edit any template; please try using the unaltered .ddev/providers/platform.yaml that DDEV provides. If you have one there that isn't the one provided by DDEV (if it doesn't have #ddev-generated
in the top) then please move it out of the way and ddev start
and see what you get. Mostly ddev pull platform
works fine for single-app projects, without any modifications or extra add-ons. (It does not require the ddev-platformsh add-on).
Thanks to @rfay pointing me in the right direction, I managed to get the ddev pull platform
working. I followed the solution mentioned here, in the Drupal slack: https://drupal.slack.com/archives/C5TQRQZRR/p1687392288373959?thread_ts=1687389136.701539&cid=C5TQRQZRR
I first removed the #ddev-generated
at the top of providers/platform.yaml
file, then added --app drupal
to lines 51, 68 & 79
I was hoping that you'd provide a full explanation in an issue in the DDEV issue queue, https://github.com/ddev/ddev/issues :)
After following the instructions in your readme.md, running
ddev pull platform
I get this error below (and can't access my site as per the other issue I posted).(that happened even before installing xdebug)
The api token from https://console.platform.sh/-/users/lorenzo-giovenali/settings/tokens is correctly set to /Users/kopeboy/.ddev/global_config.yaml