Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.Problem/Motivation
Verifying a platform does not sync up codebase on remote server. Tested against 7.x-3.19.x
Platform is deployed via 'Deploy a Composer project from a Git repository' method
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | fix-platform-sync-repopath.patch | 674 bytes | gval |











Comments
Comment #2
acComment #3
acAlso can not create a new platformComment #4
colanAdded to #3087029: [meta] Aegir 3.19.x release as a regression. Please remove if it didn't work before either.
Comment #5
acOk found out *why* this isn't working. From a platform-verify:
rsync -e 'ssh ' -akzv --exclude=".git" --exclude=".gitignore" --exclude=".hg" --exclude=".hgignore" --exclude=".hgrags" --exclude=".bzr" --exclude=".bzrignore" --exclude=".bzrtags" --exclude=".svn" --include="sites/all" --exclude="sites/*" --stats --progress --relative --keep-dirlinks --omit-dir-times --delete '/var/aegir/config/server_remote' 'aegir@remote.example.com:/'Should be:
rsync -e 'ssh ' -akzv --exclude=".git" --exclude=".gitignore" --exclude=".hg" --exclude=".hgignore" --exclude=".hgrags" --exclude=".bzr" --exclude=".bzrignore" --exclude=".bzrtags" --exclude=".svn" --include="sites/all" --exclude="sites/*" --stats --progress --relative --keep-dirlinks --omit-dir-times --delete '/var/aegir/platforms/platform_name' 'aegir@remote.example.com:/'For some reason it is trying to rsync the platform to the config path, not the platform path. I will try find out where this happens in the code if I get a chance but if someone else knows, please provide a patch/point me to the correct place.
Tested on 7.x-3.192
Comment #6
acSo the problem is in Provision/Context/server.php on line 173 there is the following:
When it is syncing the codebase, $path is NULL and so it is being set to $this->config_path. It doesn't seem to be aware of composer_git_path which is probably what it should be syncing.
Comment #7
acProblem also happens with a manually created codebase, so not composer specific.
Comment #8
gval CreditAttribution: gval as a volunteer commentedI encountered the same problem with a "composer + git" platform.
I found it was related to hosting_git module (that implements hook_provision_platform_sync_path_alter()), which is enabled on my server. So i made a quick patch (php 7+) to fix that.
Comment #9
colanComment #10
acSo this patch solves the issue for git + composer platforms when hosting_git is enabled, however traditional platforms (and possibly other types - couldn't test those) still don't sync with this module enabled.