Skip to content
This repository has been archived by the owner on Dec 12, 2019. It is now read-only.

drush_extras can cause provisioning to fail (D8 + Composer) #310

Closed
zxaos opened this issue Nov 25, 2015 · 6 comments
Closed

drush_extras can cause provisioning to fail (D8 + Composer) #310

zxaos opened this issue Nov 25, 2015 · 6 comments

Comments

@zxaos
Copy link
Contributor

zxaos commented Nov 25, 2015

In a scenario where you're using a new VM, with an existing drupal 8 install, and where drush is included in the composer build for that drupal 8 project, the default configuration for drush_extras will cause provisioning failure, as registry_rebuild doesn't have a working d8 version. And even if it did, including it by default for d8 is of arguable utility since d8's drush cr includes drush rr --fire-bazooka, essentially.

TASK: [drush_extras | Download additional Drush commands] *********************
changed: [192.168.100.100] => (item={'version': '-7.x-2.x', 'name': 'coder'})
changed: [192.168.100.100] => (item={'version': '', 'name': 'site_audit'})
failed: [192.168.100.100] => (item={'version': '', 'name': 'registry_rebuild'}) => {"changed": true, "cmd": ["drush", "dl", "registry_rebuild", "--destination=/home/vagrant/.drush/commands/registry_rebuild", "--yes"], "delta": "0:00:00.551445", "end": "2015-11-25 15:58:36.885931", "item": {"name": "registry_rebuild", "version": ""}, "rc": 1, "start": "2015-11-25 15:58:36.334486", "warnings": []}
stderr: No release history available for registry_rebuild 8.x.               [error]
Could not download requested project(s).                             [error]
stdout: The directory /home/vagrant/.drush/commands/registry_rebuild does not exist.
Would you like to create it? (y/n): y

FATAL: all hosts have already failed -- aborting

However, attempting re-provision will work successfully after it has failed once.

@dixhuit
Copy link
Contributor

dixhuit commented Nov 25, 2015

Good spot. I guess the simplest solution here is to not include it by default. All in favour?

@zxaos
Copy link
Contributor Author

zxaos commented Nov 25, 2015

I'd almost prefer a d8 toggle somewhere. I feel like for 7, having rr available is expected behaviour unfortunately.

@dixhuit
Copy link
Contributor

dixhuit commented Nov 25, 2015

OK. This is very much related to #305 in that case.

@dixhuit
Copy link
Contributor

dixhuit commented Nov 26, 2015

For the time being I think it's simplest to just remove registry_rebuild from the defaults. The way Drush commands are now handled in Vlad makes it possible to re-add registry_rebuild via the vlad_settings.yml file, just set the relevant variable to include the commands you want installed (code copied from the current drush_extras role's default vars file):

drush_install_commands:
  - { name: 'coder', version: '-7.x-2.x'}
  - { name: 'site_audit', version: ''}
  - { name: 'registry_rebuild', version: ''}

In the short term, I'd rather introduce this minor inconvenience for when working with D7 sites in order to prevent an outright provisioning fail in the scenario you describe for D8. Hopefully, as ideas solidify over at #305 we can look at having different defaults for D7/D8 and re-introduce registry_rebuild as a default for D7.

@dixhuit
Copy link
Contributor

dixhuit commented Nov 26, 2015

In fact, looking at the defaults, it looks like it may be wise to remove the version from the entry for coder.

@dixhuit dixhuit changed the title drush_extras causes can cause provisioning to fail drush_extras can cause provisioning to fail Nov 26, 2015
@dixhuit dixhuit changed the title drush_extras can cause provisioning to fail drush_extras can cause provisioning to fail (D8 + Composer) Nov 26, 2015
dixhuit added a commit that referenced this issue Nov 26, 2015
- Fixes #310.
- Now more D8 compatible.
@zxaos
Copy link
Contributor Author

zxaos commented Nov 26, 2015

Since it was the default before, would it make sense to add it to the example settings if it's not going to happen automatically?

@zxaos zxaos closed this as completed Nov 26, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants