Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.With this module enabled it took me 6 tries to give up on 'Deploy a Composer project from a Packagist repository'
I started with a plain vagrant box with Debian stretch, and our ci-aegir-dev-install-apt-debian9.sh
- composer missing
- php-mbstrings missing
- Re-try on the task failed: (solution remove the dir from ~/platforms/)
We could not find an applicable site for that command.
Drush could not bootstrap the platform at /var/aegir/platforms/deployfrompackegist-t1/web. Please check the platform directory exists and is readable. The errors were: DRUSH_NO_SITE: We could not find an applicable site for that command. - php-curl missing
- insuficient memory (512 in a vagrant box is no longer sufficient)
- Alias not saving ???
/usr/local/bin/drush --backend=2 --yes @platform_deployfrompackegistt1 provision-save 2>&1
The command could not be executed successfully (returned: [preflight] The alias @platform_deployfrompackegistt1 could not be found. , code: 0)See task-deploy-packegist.log_.txt for the full log.
After all this 'Deploy a Composer project from a Git repository' and 'Manage with Git' worked like a charm. :)
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | hosting_deploy-fix_packagist_documentation-3038831-15.patch | 1.54 KB | llamech |
| task-deploy-packegist.log_.txt | 27.57 KB | helmo |











Comments
Comment #2
colanComment #3
colanphp-mbstringgets pulled in with Composer (in Bionic at least). More specifically, composer requires php-symfony-console, which requires php-symfony-polyfill-mbstring, which requires php-mbstring. Again, nothing to do here.php-curlfor Aegir even before I used this module. Maybe we should make it a requirement for Aegir core in a separate issue?Can you provide more logs?
Comment #4
ergonlogicWhat Packagist project are you trying to install?
Comment #5
ergonlogicNevermind, I see that it's
drupal-composer/drupal-projectI suspect this is at least half the problem. As noted, I think this is documented in #2997545: Cannot install Drupal 8 platform.
While I haven't tested this recently, I previously had success with
burdamagazinorg/thunder-projectandgoalgorilla/social_template.Comment #6
ergonlogicIf Packagist deployments work with Thunder or Open Social, then the underlying mechanism should be valid. In fact, the platform build with
composer create-projectdoes appear to work as expected. So it's just not creating a valid platform, as far as Aegir is concerned. So, if we build the platform manually, and choose the "none" deploy strategy it should fail in the same way.I'll try to make some time to test the Packagist deploy with one of the distros that should work.
We could perhaps try validating that Drush isn't in
require, and throw an explicit error if it is. I don't know if Composer supports that directly, or whether we'd need to load thecomposer.json(orcomposer.lock?) and check directly.Comment #7
ergonlogicA couple notes from testing this:
goalgorilla/social_templaterequired PHP 7.2+, so it fails on my local test VM which is at 7.0Comment #8
ergonlogicRe. #3, bumping up the RAM to 4GB allowed it to progress past the dependency re-calculation. Unfortunately, Drush 9 is in `require` here, so it fails for that reason.
I pushed fixes for #2 and #4.
It still fails to build a useable platform, but that's because of the presence of Drush 9.
Maybe we should just remove this module until we've found a proper fix for #2953349: Aegir 3 is incompatible with Drush 9+.
Comment #9
colanBut couldn't one still use it with a Packagist repository that doesn't include Drush 9? This is what I was alluding to in the in-line docs. You could fork one of the standard ones, move Drush to
require-dev, and publish it as a new repo (e.g. drupal-project-drush-in-dev)?Comment #10
colanAs discussed with @helmo, this is exactly what I'm doing. Once it's active, I'll update the help text to point to this new one instead. Repository is located at https://gitlab.com/aegir/drupal-project-composer, and the default branch is
aegir3-8.x(instead of8.x).I'm now waiting for @Jon Pugh to grant me access to the
aegirgroup on Packagist.org so that I can make the package available ataegir/drupal-project-composer.Will also need to enable auto-package updates from the Git repo. See https://packagist.org/about#how-to-update-packages for details.
Comment #11
colanThe above is now done, except that Packagist is forcing us to use
dev-aegir3-8.x. Still testing...Comment #12
colanThis is working now that we removed the remaining Drush remnants from the repo.
I'll update the example with the new source info, and clean up the help text.
Comment #14
colan@helmo et al.: Please test the dev branch now. If it's all good, I'll cut a new release.
Make sure to clean your Composer cache first. Otherwise, you'll be pulling in the old code.
Comment #15
llamechI've tested this; it does work, but requires at least 4G of RAM, so I've updated the inline documentation with the attached patch. See also this commit on aegir_objects--it was failing silently before.
Comment #16
colanThanks for figuring out the problem there, and adding the help text which highlights it.
1. However, I'm not crazy about the UX though. A
DRUSH_NO_SITEerror doesn't naturally translate into something likeMemory exceeded: Rerun this task after increasing your RAM.Assuming that it's too difficult to detect that this is happening, could we at least add something like this to the new help text, along with what you just added?
2. Let's also add this stuff to the module's README?
Comment #17
llamechApologies if I wasn't clear; with this commit in aegir_objects, the real error will no longer be suppressed; you will now see the out of memory error in the log, and the deployment will stop before it gets to the condition that triggered DRUSH_NO_SITE.
The DRUSH_NO_SITE error was happening because the out of memory error was being silently suppressed, but then the platform was being deleted as part of post-failure cleanup.
Comment #18
llamechComment #19
llamechComment #20
ergonlogicSince the errors are all legit, I think all that's left is to add the docs changes from the patch to the project's readme.
Comment #22
ergonlogicPushed docs fixes.