Skip to content

Conversation

@greg-1-anderson
Copy link
Member

Deprecate 'parent' element in site aliases, for eventual removal (probably in Drush 8).

…nt' element in site aliases, for eventual removal (probably in Drush 8).
@greg-1-anderson
Copy link
Member Author

'parent' might be a seldom-used feature. If we think folks aren't using it much, we could just flat-out remove it in Drush 7 and be done with it.

@nerdcorenet
Copy link

I am using the 'parent' elemtn quite extensively in drush aliases. It allows us to define a server environment and have all sites residing on that server inherit things like the remote-host and root values.

@esolitos
Copy link

Does the 'parent' complicate the code a lot?
Because in our case it's a "must" feature of drush, using multiple remote servers we're using it quite extensively.

@greg-1-anderson
Copy link
Member Author

To follow up on my tweet:

If you are using the 'parent' feature, read the patch and see if the policy file solution works well for your use-case.

The thing we are trying to change here is transitioning to loading alias files from yaml rather than loading them in code.

@davereid
Copy link
Contributor

Acquia uses @parent in all of their Drush alias files for Cloud sites. Might want to get someone from their infrastructure team's input?

@greg-1-anderson
Copy link
Member Author

Probably deprecate this in Drush7, remove in Drush8, I'm guessing, then.

We'll also have to consider if the submitted patch is too noisy for folks. :)

@greg-1-anderson
Copy link
Member Author

I mis-spoke above: there is no real requirement to remove 'parent' if we switch to yaml alias files. We could keep 'parent', and commit just the alter hook. But I know that moshe has wanted to get rid of 'parent' for a while (see #975)

@weitzman
Copy link
Member

I really like this PR. It moves the complexity of parents to a policy. It is valuable, independant of the transition to YAML site alias files.

The core issue is that greg is the sole person who works on backend and site aliases. Much of the code others could maintain but some is gnarly and rarely used; I think 'parent' is in that category. Drush project is too crucial to ignore this SPOF problem.

@greg-1-anderson
Copy link
Member Author

Shall we commit it as-is, then, with 'parent' deprecated and noisy, but still functional?

@weitzman
Copy link
Member

I think we can turn down the log level a notch and then merge.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's usually advised to use array_key_exists() for arrays instead.

@greg-1-anderson
Copy link
Member Author

Deprecated: http://en.wiktionary.org/wiki/deprecated

@greg-1-anderson greg-1-anderson merged commit 9c0dda7 into drush-ops:master Mar 25, 2015
@greg-1-anderson
Copy link
Member Author

I turned the log level down to 'debug' and merged.

End effect: 'parent' element is now deprecated in Drush 7, although it still works just fine, and the deprecation warnings are only visible in "debug" mode.

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

Successfully merging this pull request may close these issues.

6 participants