-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 installs do not load drush.yml
#3968
Comments
Let's give some folks a chance to fix this per what we're doing in #3966 before we close this again. I think that if we looked up uri in configuration, just as #3966 is doing with preflight args, and inject overrides into the site alias, then it could work. We'd have to be careful to only check site-specific configuration, as we would not want a |
Ah ha, we have: https://github.com/drush-ops/drush/blob/9.6.0-rc3/src/Config/ConfigLocator.php#L108 n.b. "not implemented yet (multisite)" |
Good news! |
There's one interesting possible side-effect here:
This would just be a user configuration bug, though; we could potentially detect it and throw an error if it was a concern. |
Any proposed solution here should also consider the impact of using sites.php. |
It might be better to document that multisite installations should use sites.php to set the uri rather than doing so in a site-local drush.yml. Anecdotally, that is reported to work. Users might want to have a site-local drush.yml for some other purpose, although at the moment a plausible use-case does not come to mind. Perhaps we can postpone action here until that is clear. I'd still like to finish #3966 though. |
FYI sites.php maps one incoming URI to another, more "normalized" URI. Its just a mapping array. sites.php cannot set a URI from nothing. See https://github.com/drupal/drupal/blob/8.6.x/sites/example.sites.php |
I was going to say that I don't have any multisites to confirm, but the SUT is a multisite. I thought I would try to use sites.php to correct the URI for the staging multidev: Default answer:
Upon trying it, I discovered that sites.php maps in the other direction. It can go from So, in conclusion, it seems that sites.php is orthogonal to this feature request. I suppose my concern above might still be an issue, but I didn't try to reproduce. |
This is related to #3966, but I'd still like to consider fixing it. There may be limitations as described above, but I think it might be worth doing. We should give it a shot, anyway. I might not have time to try it until after DrupalCon Seattle. |
I will also mention that regardless of whether we enable setting the uri from a mulitsite |
Not all infrastructures support the use of |
Any progress on this one? It's inconvenient to have the fix with the variable, as it will end up being executed / assumed in SO many places... Can we increase the priority of the ticket. It's critical for stable management if multi-sites. |
If you have environment variables per site, then you can set Drush config that way. Or you can specify config files with --include ... I have no alternative suggestion. I increased the priority though I doubt that will actually accomplish anything. Folks who still use multisite (I dont recommend it) are welcome to submit a PR. |
Post DrupalCon Seattle, I've been pretty busy with the Composer In Core Initiative & c., so I haven't really had time to look at things like this. I don't use multisite myself and don't recommend it, but would still be interested in seeing this feature implemented. I would also encourage folks who use multisite to submit a PR. |
I gave this a shot in #4345 and referenced any issues I thought were related. Any feedback would be appreciated. |
Describe the bug
drush.yml
is not loaded for multisite installs.To Reproduce
Put a
drush.yml
inweb/sites/default/drush.yml
Expected behavior
The path to that drush.yml file should appear in
drush status
Actual behavior
Nothing at all.
Workaround
Unknown; maybe set
uri
in settings.php. Drush.yml might be used for other things though.System Configuration
Additional information
Drush is attempting to add the configuration in ConfigLocator, but something is amis.
Fixing this was previously attempted and rejected in #3278.
The text was updated successfully, but these errors were encountered: