You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Simplification ideas for site aliases and backend.inc #975
Change site aliases to .yml. Dynamic changes still possible with hook_sitealias_alter. Segregate config, site selection (root+uri), and other parts of the array better. Replace array with one or more objects. - Convert alias files to .yaml #1609
Refactor remote sites to be a first class object that gets passed around. Distinct from drush_get_option()
Site lists you mean site-list and invoke-multiple or configuration such as dev, test and live in files server-1.aliases.drushrc.php, server-2, etc. Then when you want to run the same command on all your dev servers you use @dev alias (e.g. for module, core upgrade or some other quick-fix).
What would be alternative to inheritance (@parent) of shared/common options from separate files?
Can you elaborate on removing @site.live@dev, what is that?
The motivation to remove all these features is that they complicate Drush to the point where only one person ever contributes and maintains to backend.inc and sitealias.inc. Thats a big problem, and don't think "I'm against removing concurrency" is a full consideration of the risks/benefits.
One alternative for make is to take advantage of Drush's file cache. You can get that by persisting builds in the paid version of Travis. We could also email Travis about proxy caching ftp.drupal.org for us.
Instead of site alias lists, you could roll your own inheritance and merging of site alias properties using the hook that happens after yml is parsed.
Hi @weitzman I'm with @kenorb on the concurrency, id doesn't only speed up the make command, but it's (currently) also the only way to avoid issues with large make-files, see #985.
In Aegir and a number of related projects, we use much of backend.inc extensively. I'm all for simplifying it as much as possible.
In core, concurrency only appears to be used by make. We could move the relevant logic over there in a simplified manner, presumably. Are there any other projects that we know of making extensive use of concurrency (or the other proposed removals, for that matter)?
More OOP, YML and support for remote sites will benefit just about all the projects I'm working on.
@ccharlton: Yep, that's what that is. I edited the summary to make it more clear. See also the issue number referenced above, #1369.
My general impression is that these are very rarely used; if anyone has ever written a blog post about this feature, I haven't seen it. Similar things can be done by defining a custom shell alias directly inside the site alias. I suspect that would be easier for most folks to understand and use.
Although it is checked off above, 'parent' is only deprecated, not removed. We should probably make sure folks aren't using this, or have switched to a policy file, before we fully remove it from the code.
Activity
[-]Simplication ideas for site aliases and backend.inc[/-][+]Simplification ideas for site aliases and backend.inc[/+]kenorb commentedon Nov 10, 2014
I'm against removing
concurrencyfor make, as it speeds up the make building 4-8x times (5min instead of 20min, e.g. in Travis CI). Used e.g. in: https://github.com/mycognitive/ads/blob/master/build.xml#L78What would be the alternative apart of the hacks?
Site lists you mean
site-listandinvoke-multipleor configuration such asdev,testandlivein filesserver-1.aliases.drushrc.php,server-2, etc. Then when you want to run the same command on all your dev servers you use@devalias (e.g. for module, core upgrade or some other quick-fix).What would be alternative to inheritance (
@parent) of shared/common options from separate files?Can you elaborate on removing
@site.live@dev, what is that?weitzman commentedon Nov 10, 2014
The motivation to remove all these features is that they complicate Drush to the point where only one person ever contributes and maintains to backend.inc and sitealias.inc. Thats a big problem, and don't think "I'm against removing concurrency" is a full consideration of the risks/benefits.
One alternative for make is to take advantage of Drush's file cache. You can get that by persisting builds in the paid version of Travis. We could also email Travis about proxy caching ftp.drupal.org for us.
Instead of site alias lists, you could roll your own inheritance and merging of site alias properties using the hook that happens after yml is parsed.
esolitos commentedon Nov 24, 2014
Hi @weitzman I'm with @kenorb on the concurrency, id doesn't only speed up the
makecommand, but it's (currently) also the only way to avoid issues with large make-files, see #985.PS: Thanks for your efforts on drush!
weitzman commentedon Dec 9, 2014
@esolitos - thats just a make bug that anyone can fix. we aren't going to architect Drush around a bug thats easily resolved.
greg-1-anderson commentedon Jan 28, 2015
I am thinking we should make these changes in master, after we have spun off Drush 7, rather than try to make these changes at this time.
ergonlogic commentedon Jan 31, 2015
In Aegir and a number of related projects, we use much of backend.inc extensively. I'm all for simplifying it as much as possible.
In core, concurrency only appears to be used by make. We could move the relevant logic over there in a simplified manner, presumably. Are there any other projects that we know of making extensive use of concurrency (or the other proposed removals, for that matter)?
More OOP, YML and support for remote sites will benefit just about all the projects I'm working on.
greg-1-anderson commentedon Jan 31, 2015
@juampy72 recently used concurrency in one of his projects.
juampynr commentedon Jan 31, 2015
This command uses drush_invoke_concurrent() when GNU-parallel is not
available: http://drupal.org/project/syncdb.
http://drupal.org/project/concurrent_queue uses it too.
On Jan 31, 2015 4:02 PM, "Greg Anderson" [email protected] wrote:
greg-1-anderson commentedon Mar 24, 2015
I added a PR #1279 to deprecate the 'parent' element and add an alter hook. This is a first step toward supporting YAML site alias files.
ccharlton commentedon Jun 16, 2015
"Remove shell alias replacements" -- you mean the custom tokens like
%my_custom_thing?greg-1-anderson commentedon Jun 17, 2015
@ccharlton: Yep, that's what that is. I edited the summary to make it more clear. See also the issue number referenced above, #1369.
My general impression is that these are very rarely used; if anyone has ever written a blog post about this feature, I haven't seen it. Similar things can be done by defining a custom shell alias directly inside the site alias. I suspect that would be easier for most folks to understand and use.
kenorb commentedon Sep 29, 2015
Btw. Acquia Cloud still using
parentwhen generating/exportingx.aliases.drushrc.phpfiles from Drush integration for the sites.Like:
Does it mean it would break when I'll upgrade
drush, because ofparentremoval? Seems to work so far on8.0-dev.greg-1-anderson commentedon Sep 29, 2015
Although it is checked off above, 'parent' is only deprecated, not removed. We should probably make sure folks aren't using this, or have switched to a policy file, before we fully remove it from the code.
weitzman commentedon Sep 30, 2015
BarisW commentedon Jan 20, 2016
Hmm, we use it a lot in our company. All dev environments inherit a base dev alias.
http://www.bariswanschers.com/blog/working-drush-alias-files-teams (See: Bonus tip: alias files inheritance)
weitzman commentedon Jan 20, 2016
@BarisW - Some replacement code for @parent is in our example policy file
BarisW commentedon Jan 20, 2016
Thanks @weitzman!
greg-1-anderson commentedon Jul 16, 2018
Mostly done; closing.