Skip to content

Simplification ideas for site aliases and backend.inc #975

Closed

Description

@weitzman

Activity

  1. changed the title [-]Simplication ideas for site aliases and backend.inc[/-] [+]Simplification ideas for site aliases and backend.inc[/+] on Nov 9, 2014
  2. kenorb commented on Nov 10, 2014

    @kenorb
    Contributor

    I'm against removing concurrency for 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#L78
    What would be the alternative apart of the hacks?

    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?

  3. weitzman commented on Nov 10, 2014

    @weitzman
    MemberAuthor

    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.

  4. esolitos commented on Nov 24, 2014

    @esolitos

    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.

    PS: Thanks for your efforts on drush!

  5. weitzman commented on Dec 9, 2014

    @weitzman
    MemberAuthor

    @esolitos - thats just a make bug that anyone can fix. we aren't going to architect Drush around a bug thats easily resolved.

  6. greg-1-anderson commented on Jan 28, 2015

    @greg-1-anderson
    Member

    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.

  7. ergonlogic commented on Jan 31, 2015

    @ergonlogic
    Contributor

    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.

  8. greg-1-anderson commented on Jan 31, 2015

    @greg-1-anderson
    Member

    @juampy72 recently used concurrency in one of his projects.

  9. greg-1-anderson commented on Mar 24, 2015

    @greg-1-anderson
    Member

    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.

  10. ccharlton commented on Jun 16, 2015

    @ccharlton

    "Remove shell alias replacements" -- you mean the custom tokens like %my_custom_thing?

  11. greg-1-anderson commented on Jun 17, 2015

    @greg-1-anderson
    Member

    @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.

  12. kenorb commented on Sep 29, 2015

    @kenorb
    Contributor

    Btw. Acquia Cloud still using parent when generating/exporting x.aliases.drushrc.php files from Drush integration for the sites.

    Like:

    $aliases['test.livedev'] = array(
      'parent' => '@foo.test',
      'root' => '/mnt/foo.test/livedev/docroot',
    );
    

    Does it mean it would break when I'll upgrade drush, because of parent removal? Seems to work so far on 8.0-dev.

  13. greg-1-anderson commented on Sep 29, 2015

    @greg-1-anderson
    Member

    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.

  14. weitzman commented on Sep 30, 2015

    @weitzman
    MemberAuthor
  15. BarisW commented on Jan 20, 2016

    @BarisW
  16. weitzman commented on Jan 20, 2016

    @weitzman
    MemberAuthor

    @BarisW - Some replacement code for @parent is in our example policy file

  17. BarisW commented on Jan 20, 2016

    @BarisW

    Thanks @weitzman!

  18. greg-1-anderson commented on Jul 16, 2018

    @greg-1-anderson
    Member

    Mostly done; closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions