-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Inject options from core:rsync and sql:sync alias parameters. #3075
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
Conversation
… the appropriate alias parameter.
|
consider adding docs to example.drush.yml and/or example.aliases.yml. |
|
Right now I am entombed in the hellish quagmire called backend invoke, which resists divulging the secret of |
|
Ah. |
… to set up test sites with only a settings.php + database entries (no installed site) and alias records for testing in --simulate mode.
weitzman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll test this and possibly add more feedback. Thanks for your hard work here (and Consolidation).
My one thought is to pause and ask if we really need this alias-parameters feature. It looks analogous to the source-/target- prefixes of old. That feature was little used. My thinking is that folks can get used to the rule that command specific options will be honored depending where the command runs. That is:
drush sql-sync @foo @bar. local command-specific is honoreddrush @bar sql-sync @foo @self. @bar's command-specific is honored
| # - 'alias-parameters': These options will only be set if the alias is | ||
| # used as the specified parameter. `sql:sync` and `core:rsync` are the two | ||
| # core commands that use this entry. These commands both have `source` | ||
| # and `target` parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add config-pull to this list?
|
Perhaps in this scenario, if we also took the command-specific options from @foo and @bar, that might be sufficient. I used to use This feature only takes a small amount of code now, so it shouldn't be too hard to maintain. I'm not convinced that it's critical, but I'm reluctant to give it up. Maybe take a survey and see if it is used? |
|
@greg-1-anderson @weitzman please, don't use my handle to document your code :p thanks |
|
Seems like it is safe to use |
| # Relative aliases are always taken from the Drupal root. | ||
| # - 'files': Path to 'files' directory. This will be looked up if not | ||
| # specified. | ||
| # - 'drush-script': Path to the remot Drush command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo. :s/remot/remote/.
|
FTR from #5675:
For some use cases, default command options defined by aliases can NOT be replaced by default command options defined by drush config, because in a deployment use case, there is NO drush config before the first deployment. |
Includes tests for both, and documentation in example.aliases.yml.