Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multisite compatibility #112

Open
vever001 opened this issue Mar 3, 2020 · 1 comment
Open

Multisite compatibility #112

vever001 opened this issue Mar 3, 2020 · 1 comment

Comments

@vever001
Copy link

vever001 commented Mar 3, 2020

Hi,

We inherited a D8 multisite a few months ago (ECDC project).
ATM I have made some workarounds to be able to work on it using the task-runner and the toolkit but it is far from optimal.
Ideally, we should make both the task-runner and the toolkit multisite-compatible.
This is I think a big task so perhaps some of you have ideas or plans already?

Here are some things I have in mind:

  1. I think we should first make the task-runner multisite-compatible so that we can run it with aliases (e.g: ./vendor/bin/run @myalias command:name)
    I investigated the possibility to use SiteAlias (used by drush) but that would require a lot of changes.
    Another simpler approach is to do something similar to what Drupal Console does.
  2. I noticed a lot of commands in the toolkit are spawning new processes (./vendor/bin/run ...) which makes it loose the current context (e.g: the alias or options passed in the first command).
    This could be solved in a similar way to BLT which defines an invokeCommands() method: https://github.com/acquia/blt/blob/12.x/src/Robo/BltTasks.php#L53
@vever001
Copy link
Author

  1. I made a very rough POC here https://github.com/vever001/task-runner/tree/multisite-support based on Acquia BLT.
    Still needs a lot of work to be even usable but it's a start.
  2. Point 2 still needs to be implemented to make it truly usable with the NE toolkit, which itself, would also need a lot of changes as well.
    The approach from BLT (https://github.com/acquia/blt/blob/12.x/src/Robo/BltTasks.php#L53) works but cannot be implemented within a task since we do not have access to the container or application.
    There's also Allow commands to call other commands consolidation/annotated-command#64 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant