-
-
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
Rename name.alias.yml to name.site.yml and drop support for group.aliases.yml #3107
Comments
If you do not provide an environment with your alias on the command line, then Drush 9 will default to Drush 8 (and earlier) site aliases were very loose about what sort of alias could go where. This led to a lot of variety in site alias file structure, and required Drush to do a lot of exhaustive searching. The current implementation is very opinionated about alias file structure in order to reduce the amount of searching that needs to be done. If we loosened up the rules again, Drush would need to load more files when searching for alias records. Under the current mechanism, it is a misnomer to have an alias named I recently had a conversation with @weitzman about renaming alias files to something that would be more clear. We came up with a potential name for a file that contains the environments for a single site, but did come up with names for the other variant. New proposal:
Maybe that's enough of an improvement to be worth the effort to make everyone rename. Thoughts? |
Discussed this further with @weitzman, who proposed an even simpler protocol. Below is my slightly-enhanced version of this suggestion:
This proposal would further reduce the amount of searching that Drush needed to do, at the cost of no longer supporting groups (e.g. @pantheon.site.dev). Optionally, we could loosen #4 and assume that any Also optionally, we could loosen #3 and allow |
This looks great to me. A couple reminders:
|
I like this too, but have some further questions:
In general, I like the idea of simplifying all this. Less options is far more reliable. |
|
Lets continue work at #3184 |
Regarding @ jurgenhaas's suggestions above:
|
* Simplify Drush site aliases. Remove the concept of site alias groups. Require site aliases be stored in the 'sites' directory in each search location. No longer search directly in __ROOT__/drush et. al. Update 'drush init' to match (writes ~/drush/sites rather than ~/drush as the default home directory search location for site aliases). * Set site alias search depth to '<=1' instead of '==0' to allow site aliases to be grouped together in directories.
Here too. @greg-1-anderson what is the |
@weitzman answered it in #3019 (comment) |
The docs (https://raw.githubusercontent.com/drush-ops/drush/master/examples/example.aliases.yml) have no example for a "aliases.yml". How should this fill look like? I tried the following.
Does not work.
Does not work.
Works.
This means the resulting site-aliases are quite verbose. Because its always site+environment. I use this in combination with drupal-composer/drupal-project and never have global available site-aliases. Is it still possible to use short site aliases? example.aliases.yml has
@stage
as an example but i was not able to produce such an site-alias.PS: I did some debugging.
\Drush\SiteAlias\SiteAliasFileLoader::fetchAliasRecordFromSiteAliasData
in \Drush\SiteAlias\SiteAliasFileLoader::fetchAliasRecordFromGroupAliasData returnsfalse
if the group is empty. It this the root cause? Thanks!The text was updated successfully, but these errors were encountered: