Coder Social home page Coder Social logo

typhonius / acquia_cli Goto Github PK

View Code? Open in Web Editor NEW
32.0 6.0 19.0 737 KB

Provides a Robo console application to the Acquia CloudAPI for managing deployment tasks and environment configuration.

License: MIT License

PHP 100.00%
acquia symfony console robo phar application cli acquia-cli

acquia_cli's People

Contributors

b-sharpe avatar dependabot-preview[bot] avatar earthday47 avatar keeganstreet avatar typhonius avatar violinist-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

acquia_cli's Issues

PHP Warning: sem_remove()

PHP Warning: sem_remove(): SysV semaphore 140702091352320 does not (any longer) exist in phar:///usr/local/bin/acquiacli/vendor/symfony/lock/Store/SemaphoreStore.php on line 94

PHP: 7.4.5

Do not perform DB backup during the "code:switch" task until explicitly requested

Is your feature request related to a problem? Please describe.
Backup is performed during the code:switch task which is not suitable for all cases, e.g. performing a deployment to the PREPROD environment with a lot of huge DBs or delivering an urgent hot-fix to the PRODUCTION environment.

Describe the solution you'd like
Do not perform DB backup during the code:switch task until explicitly requested with an additional option.

Describe alternatives you've considered
Create an option to switch off the backup task (to keep the code:switch workflow backward-compatible).

Return output in custom format

Is your feature request related to a problem? Please describe.
It would be great to have commands output in custom formats, let's say in json, or csv, which would allow me to use it in custom CI tools

Describe the solution you'd like

acquiacli domain:list prod:sitename test --format=json

This would output the domains in a json format instead of the current fancy table output.

It would be an out of the box alternative to drush ac-domain-list --format=export

Describe alternatives you've considered
Custom php code to gather info from cloud api v2 using typhonius/acquia-php-sdk-v2

Additional context
Add any other context or screenshots about the feature request here.

Allow extra config to be controlled by environment variables

Is your feature request related to a problem? Please describe.
We have added in environment variables for Acquia key and secret, it would be useful to also have other config items based on environment variables e.g. timezone.

Describe the solution you'd like
To have each of the following config items controllable with env vars:

  • timezone
  • format
  • taskwait
  • timeout

Describe alternatives you've considered
The $HOME/.acquiacli/acquiacli.yml still works for phar files but may not be good to use in distributed environments.

Add in option to automatically respond 'yes' to any question

We have a number of different commands which use the 'confirm' method allowing the user to respond with a y or n to double confirm their intent to use the command. Examples of these are:

  • Disabling livedev
  • Removing domains
  • Deleting cron tasks

Advanced users may wish to make these steps completely automated and it would be good to provide an option that responds 'yes' to any confirmation.

Add --latest flag for db:backup:link

Is your feature request related to a problem? Please describe.
I want to automate grabbing the database without having to write PHP code using acquiacli. Currently I have to do some awesome bashfu to get the first item from acquiacli db:backup:list to get the link to the latest backup.

Describe the solution you'd like
I would like to have a --latest option that would automaticallly fetch the backup id from the backup list and provide me a link with that or if I don't provide an id it makes the assumption that I meant to grab the latest... much like terminus works for pantheon terminus backup:get site.live --element=db --to=db.sql.gz

Call to undefined method AcquiaCloudApi\Connector\Client::addOption()

Describe the bug
On any command call error happens

To Reproduce
Steps to reproduce the behavior including calling code:

  1. Execute vendor/bin/acquiacli database:list
  2. See error:
    PHP Fatal error: Uncaught Error: Call to undefined method AcquiaCloudApi\Connector\Client::addOption() in /project/vendor/typhonius/acquia_cli/src/Cli/AcquiaCli.php:53 Stack trace: #0 /project/vendor/typhonius/acquia_cli/bin/acquiacli-robo.php(37): AcquiaCli\Cli\AcquiaCli->__construct(Object(AcquiaCli\Cli\Config), Object(AcquiaCloudApi\Connector\Client), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #1 /project/vendor/typhonius/acquia_cli/bin/acquiacli(11): require_once('/proj...') #2 {main} thrown in /project/vendor/typhonius/acquia_cli/src/Cli/AcquiaCli.php on line 53

Expected behavior
Command returns databases list

Desktop (please complete the following information):

  • latest MacOS & Ubuntu
  • 2.0.8

BLT compatibility

Feature request related to Acquia BLT usage
I would imagine many users of acquia_cli would also use acquia/blt. But it appears they are incompatible in terms of composer packages.

Hoped for solution
This feature request is to make them compatible via composer.

Describe alternatives you've considered
Currently we have to install acquia_cli in a different location ( or repo ) so as not to interfere with the current projects composer setup that frequently requires blt. We can continue down this route but that is in-convenient when testing in a CI environment. We could also try using the phar install methods to get around the issue.

Additional context
Current environments tested in are docksal and Gitlab and Acquia Cloud.

Steps to reproduce

mkdir new-repo-test
cd new-repo-test
composer install acquia/blt
composer install typhonius/acquia_cli

I also tried this in the reverse order:

cd new-repo-test
rm -rf *
composer install typhonius/acquia_cli
composer install acquia/blt

Neither of these work at the moment.

Attaching screenshot of error. (Annotated-command & consolidation/robo issue)
blt-acquia-cli-no-bueno

WaitForNotification timeout (300s exceeded)

Hi, first of all thank you for this awesome tool.
I've been facing a issue in the code:switch command. The code is deployed but the "Notification in-progress" step keeps stuck without response and ends crashing by timeout.

To Reproduce

  1. Just run code:switch command

Screenshots
AcquiaCli_WaitForNotification_TimeOut

Additional context
Not sure if is my Acquia application or the notification that acquia_cli is waiting is not being sent by Acquia anymore.
I'm using Acquia_cli on Jenkins (and testing the commands in my machine, i.e screenshot), and using --no-wait fix the question (don't stuck my build in extra 300s).

Please let me know if I can help somehow. Thanks.

The API token is expired during the code:switch task

Describe the bug
The API token is expired during the code:switch task if the backup procedure takes more than 5 minutes.

To Reproduce
Steps to reproduce the behavior including calling code:

  1. Perform code:switch task on the environment with big DBs
  2. See error:
➜  Backing up DB (***) on Preprod
Notification in-progress
4 mins [⚬⚬⚬⚬⚬⚬⚬⚬⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0% [error]  The access token has expired.

Expected behavior
Database backup is not performed until it was requested in an explicit way (with the separate option).

Too many arguments, expected arguments "command" "environmentId" error when using "code-switch"

Describe the bug
When running this command

acli api:environments:code-switch myapp.dev "my-feature-branch"

... the process fails with the following error

In ArgvInput.php line 171: [Symfony\Component\Console\Exception\RuntimeException] Too many arguments, expected arguments "command" "environmentId". Exception trace: at phar:///usr/local/bin/acli/vendor/symfony/console/Input/ArgvInput.php:171 Symfony\Component\Console\Input\ArgvInput->parseArgument() at phar:///usr/local/bin/acli/vendor/symfony/console/Input/ArgvInput.php:82 Symfony\Component\Console\Input\ArgvInput->parse() at phar:///usr/local/bin/acli/vendor/symfony/console/Input/Input.php:55 Symfony\Component\Console\Input\Input->bind() at phar:///usr/local/bin/acli/vendor/symfony/console/Command/Command.php:217 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/acli/src/Command/CommandBase.php:243 Acquia\Cli\Command\CommandBase->run() at phar:///usr/local/bin/acli/vendor/symfony/console/Application.php:929 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/acli/vendor/symfony/console/Application.php:264 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/acli/vendor/symfony/console/Application.php:140 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/acli/bin/acli:95 require() at /usr/local/bin/acli:12 api:environments:code-switch [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--] <command> <environmentId>

This error has been reproduced on own environments too.

Could you please help us investigate why ? Thanks

Sophie

Symfony 3

Currently, this cannot be installed on the project that uses Symfony 3 components, like filesystem.

I tried to composer require this project but there were simply too many dependency versions to resolve.

@typhonius any chance you could update the project to work with Symfony 3?
I would hate to fork only to update dependencies.

downloading database backups with the acquia_cli doesn't work with the latest version of curl

Description

It is not possible to download database backups on a system that has a recent version of libcurl

To Reproduce

./vendor/bin/acquiacli db:backup:download \
	--progress-delay=15 \
	-n prod:********* \
	dev downloads --path="/tmp" --filename="backup_dl"
➜  Downloading database backup to /tmp/backup_dl.sql.gz
    0 [➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]PHP Warning:  curl_exec(): Cannot call the CURLOPT_PROGRESSFUNCTION in phar:///home/circleci/project/vendor/bin/acquiacli/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php on line 40
PHP Warning:  curl_exec(): Cannot call the CURLOPT_PROGRESSFUNCTION in phar:///home/circleci/project/vendor/bin/acquiacli/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php on line 40

Expected behavior

The database backup is downloaded successfuly

Desktop (please complete the following information):

  • OS: I've seen this both on ubuntu 20 in CI and macOS 12.4

Additional context
I believe this has been patched in guzzle so updating should hopefully fix it

CI acquia task number output?

Issue that prompts the request
We use gitlab + kubernetes + acquia_cli to do autodeploys each night. Some nights the builds&deploys fail for various reasons. However the standard output does not indicate which Acquia task is the one that failed. We obviously know the job that failed but not the Acquia Task ID in the standard out. Usually, if there is a failure, we go to the Acquia Admin UI and browse through the task list and look for the failed job. This works fine until the acquia task list is truncated by the interface and we can no longer browse for the task in question.

Our output looks like this:

  Looking up notification                      
 < 1 sec [➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 6 secs [⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 >  Moving DB (WXXXXXXd8) from Sandbox2 to Dev
 11 secs [⚬⚬⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0% Looking up notification                      
 < 1 sec [➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 5 secs [⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 11 secs [⚬⚬⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 16 secs [⚬⚬⚬⚬⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 21 secs [⚬⚬⚬⚬⚬⚬⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 27 secs [⚬⚬⚬⚬⚬⚬⚬⚬⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 32 secs [⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 38 secs [⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 43 secs [⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 49 secs [⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 54 secs [⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0% [error]  Acquia task failed. 
 command terminated with exit code 1

Proposed Solution
What would be great is to see the task ID that the progress meter is monitoring so we can research them better. So an output like this would be great:

>  Backing up DB (WXXXXXXD8) on Dev
  Looking up notification                      
 < TASKID 993456 1 sec [➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 TASKID 993456 6 secs [⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 >  Moving DB (wXXXXXXXX8) from Sandbox2 to Dev
TASKID 993457 11 secs [⚬⚬⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0% Looking up notification                      
 < TASKID 993457 1 sec [➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 TASKID 993457 5 secs [⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 TASKID 993457 11 secs [⚬⚬⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 TASKID 993457 16 secs [⚬⚬⚬⚬⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%
  Notification in-progress                     
 TASKID 993457 21 secs [⚬⚬⚬⚬⚬⚬⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%

Describe alternatives you've considered
I've only briefly looked through the options to see if one exists for this already. Does it?

Error checking when dbName doesn't exist in `acquiacli db:backup:download`

Just putting this here to make things a little bit better, not trying to nit pic :)

Is your feature request related to a problem? Please describe.
When I had a typo in the dbName parameter in the db:backup:download command I just recieved some PHP notice and an error saying a resource didn't exist.

Describe the solution you'd like
Lets throw an error if $backup is an empty arrayobject. Dumping it on line 182 gave me

object(AcquiaCloudApi\Response\BackupsResponse)#595 (1) {
  ["storage":"ArrayObject":private]=>
  array(0) {
  }
}

because the query before returned 0 results.

Additional context
Add any other context or screenshots about the feature request here.
image

Environment Key variables Not working?

Describe the bug
I'm not able to get the environment variable keys to be used. When the keys are specified within the acquiacli.yml file then acquiacli connects to acquia just fine.

To Reproduce
in bash:

vendor/bin/acquiacli application:info XXXXX
export ACQUIACLI_SECRET=ASDFASDFDBASDF
export ACQUIACLI_KEY=ASDFADFASDFASDF

On line two of acquiacli.yml file change key value to be bogus value.
On line three of acquiacli.yml file change secret value to be bogus value.

vendor/bin/acquiacli application:info XXXXXX

The first execution of acquiacli connects and prints info. The second does not. Tried several variations of editing the acquiacli.yml to try and ensure that the tool is using the environment variables and not the values in the yml file. None of the editing variations caused the tool to work.

Expected behavior
After either emptying the values of the yml file key and secrets and setting the environment variables appropriately the tool should connect to acquia.

Desktop (please complete the following information):

  • OS: Mac 10.15.3
    [ - Code version/tag : 1.0.3]
  • Installed as part of project folder and not as phar standalone.

Additional context
Even with a successful connection I get these php warnings:

PHP Warning: Declaration of AcquiaCli\Commands\AcquiaCommand::confirm($question) should be compatible with Robo\Tasks::confirm($question, $default = false) in /Users/dan/work/Phase2/webster/webster-bank/vendor/typhonius/acquia_cli/src/Commands/AcquiaCommand.php on line 19

Warning: Declaration of AcquiaCli\Commands\AcquiaCommand::confirm($question) should be compatible with Robo\Tasks::confirm($question, $default = false) in /Users/dan/work/Phase2/webster/webster-bank/vendor/typhonius/acquia_cli/src/Commands/AcquiaCommand.php on line 19

PHP Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Console\Helper\ProgressBar::advance() must be of the type integer, null given

Describe the bug
Getting a PHP Fatal error as soon as a progress bar appears, when attempting to use many cloud operations, using the latest 2.0.2 PHAR.

Full error:

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Symfony\Component\Console\Helper\ProgressBar::advance() must be of the type integer, null given, called in phar:///usr/local/bin/acquiacli/src/Commands/AcquiaCommand.php on line 184 and defined in phar:///usr/local/bin/acquiacli/vendor/symfony/console/Helper/ProgressBar.php:310
Stack trace:
#0 phar:///usr/local/bin/acquiacli/src/Commands/AcquiaCommand.php(184): Symfony\Component\Console\Helper\ProgressBar->advance(NULL)
#1 phar:///usr/local/bin/acquiacli/src/Commands/AcquiaCommand.php(282): AcquiaCli\Commands\AcquiaCommand->waitForNotification(Object(AcquiaCloudApi\Response\OperationResponse))
#2 phar:///usr/local/bin/acquiacli/src/Commands/AcquiaCommand.php(240): AcquiaCli\Commands\AcquiaCommand->backupDb('d9b9dc88-f2c2-d...', Object(AcquiaCloudApi\Response\EnvironmentResponse), Object(AcquiaCloudApi\Response\DatabaseResponse))
#3 phar:///usr/local/bin/acquiacli/src/Commands/DeployCommand.php(38): AcquiaCli\Commands\AcquiaCommand->backupAndMoveDbs('d9b9dc88-f2c2-d...' in phar:///usr/local/bin/acquiacli/vendor/symfony/console/Helper/ProgressBar.php on line 310

To Reproduce
Steps to reproduce the behavior including calling code:

  1. Downloaded the PHAR for release 2.0.2, made executable, moved into /usr/local/bin
  2. Set environment variables ACQUIACLI_KEY, ACQUIACLI_SECRET to credentials.
  3. Attempted to use acquiacli deploy:prepare and acquiacli code:switch under both PHP7.2 and 7.3, and got the same exact error.

Expected behavior
Command to complete successfully.

Screenshots
2020-03-23_16-00

Desktop (please complete the following information):

  • OS: Tried both under Ubuntu 18.04 and 19.10, with PHP from Ubuntu repositories
  • Code version/tag: 2.0.2

Additional context
Trying to set up for a CI/CD system... is there a switch to disable the progress bar? I tried passing -y, -n, --ansi, and even --progress-delay=600s with no difference in the output.

Missed path to project's ./acquiacli.yml when not root package

I suppose acquia_cli is normally used as a root package, as I'm having some trouble getting it to pick up the acquiacli.yml when located in ./vendor. Focussing here: https://github.com/typhonius/acquia_cli/blob/master/bin/acquiacli-robo.php#L10-L35

When i dump $paths I get:

array(3) {
  [0]=>
  string(78) "/PROJECTPATH/vendor/typhonius/acquia_cli/default.acquiacli.yml"
  [1]=>
  string(34) "/Users/si/.acquiacli/acquiacli.yml"
  [2]=>
  string(84) "/PROJECTPATH/vendor/typhonius/acquia_cli/bin/../../..//acquiacli.yml"
}

and the third one is ./vendor/acquiacli.yml, when it should be ./acquiacli.yml according to the docs - missed it by one.

I don't know what the right solution is, but I'll do a patch to check for getcwd() . '/acquiacli.yml - since on my machine getcwd() returns the project root.

files:copy exits with error "missing source"

Describe the bug
image

To Reproduce
Steps to reproduce the behavior including calling code:

  1. Checkout latest 2.0 release. (currently 7865e08)
  2. run the command ./bin/acquiacli files:copy REALM:SITENAME prod dev
  3. See error

Expected behavior
Other commands are working... just seems to be this one is wonky. Expected to not get an error as this worked with 1.* releases

Desktop (please complete the following information):

  • OS: Linux (on acquia itself too)
  • latest 2.0 branch (7865e08)

Remove Cloudflare code

As this is the Acquia Cli, I'm going to remove the Cloudflare code and dependencies as part of the 2.0 release.

Option to disable backups when moving DBs

Is your feature request related to a problem? Please describe.
I want to use the cli to copy databases from a multisite with >30 databases. By default database:copy and database:copy:all backup the DBs on the target environment first, which could create a lot of clutter on the server. I've had issue with running out of disk space as well.

Describe the solution you'd like
Add the --no-backup option to database:copy and database:copy:all so you can skip the copy operation.

Describe alternatives you've considered
N/A

Additional context
N/A

preprod:prepare throwns an exception

It happens each time when I call

acquiacli preprod:prepare devcloud:<app> test dev

The command continues to execute, but I think it's just not handled exception.

The full log is:

$ acquiacli preprod:prepare devcloud:<app> test dev                                                                                                                                                                                  [11:31:43]
PHP Notice:  Undefined property: stdClass::$insight in /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentResponse.php on line 44
PHP Stack trace:
PHP   1. {main}() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli:0
PHP   2. require_once() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli:11
PHP   3. AcquiaCli\AcquiaCli->run() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli-robo.php:44
PHP   4. Robo\Runner->run() /home/mbaev/.acquia/api-v2-cli/src/AcquiaCli.php:98
PHP   5. Robo\Application->run() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/robo/src/Runner.php:175
PHP   6. Robo\Application->doRun() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:148
PHP   7. Robo\Application->doRunCommand() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:240
PHP   8. Consolidation\AnnotatedCommand\AnnotatedCommand->run() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:956
PHP   9. Consolidation\AnnotatedCommand\AnnotatedCommand->execute() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Command/Command.php:252
PHP  10. Consolidation\AnnotatedCommand\CommandProcessor->process() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:404
PHP  11. Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/CommandProcessor.php:148
PHP  12. Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher->validate() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/CommandProcessor.php:167
PHP  13. Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher->callValidator() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/ValidateHookDispatcher.php:27
PHP  14. AcquiaCli\Commands\DeployCommand->validateUuidHook() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/ValidateHookDispatcher.php:43
PHP  15. AcquiaCli\Commands\DeployCommand->getEnvironmentFromEnvironmentName() /home/mbaev/.acquia/api-v2-cli/src/Commands/AcquiaCommand.php:115
PHP  16. AcquiaCloudApi\CloudApi\Client->environments() /home/mbaev/.acquia/api-v2-cli/src/Commands/AcquiaCommand.php:134
PHP  17. AcquiaCloudApi\Response\EnvironmentsResponse->__construct() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/CloudApi/Client.php:473
PHP  18. array_map() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18
PHP  19. AcquiaCloudApi\Response\EnvironmentsResponse->AcquiaCloudApi\Response\{closure:/home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18-20}() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18
PHP  20. AcquiaCloudApi\Response\EnvironmentResponse->__construct() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:19
PHP Notice:  Undefined property: stdClass::$insight in /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentResponse.php on line 44
PHP Stack trace:
PHP   1. {main}() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli:0
PHP   2. require_once() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli:11
PHP   3. AcquiaCli\AcquiaCli->run() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli-robo.php:44
PHP   4. Robo\Runner->run() /home/mbaev/.acquia/api-v2-cli/src/AcquiaCli.php:98
PHP   5. Robo\Application->run() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/robo/src/Runner.php:175
PHP   6. Robo\Application->doRun() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:148
PHP   7. Robo\Application->doRunCommand() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:240
PHP   8. Consolidation\AnnotatedCommand\AnnotatedCommand->run() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:956
PHP   9. Consolidation\AnnotatedCommand\AnnotatedCommand->execute() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Command/Command.php:252
PHP  10. Consolidation\AnnotatedCommand\CommandProcessor->process() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:404
PHP  11. Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/CommandProcessor.php:148
PHP  12. Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher->validate() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/CommandProcessor.php:167
PHP  13. Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher->callValidator() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/ValidateHookDispatcher.php:27
PHP  14. AcquiaCli\Commands\DeployCommand->validateUuidHook() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/ValidateHookDispatcher.php:43
PHP  15. AcquiaCli\Commands\DeployCommand->getEnvironmentFromEnvironmentName() /home/mbaev/.acquia/api-v2-cli/src/Commands/AcquiaCommand.php:115
PHP  16. AcquiaCloudApi\CloudApi\Client->environments() /home/mbaev/.acquia/api-v2-cli/src/Commands/AcquiaCommand.php:134
PHP  17. AcquiaCloudApi\Response\EnvironmentsResponse->__construct() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/CloudApi/Client.php:473
PHP  18. array_map() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18
PHP  19. AcquiaCloudApi\Response\EnvironmentsResponse->AcquiaCloudApi\Response\{closure:/home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18-20}() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18
PHP  20. AcquiaCloudApi\Response\EnvironmentResponse->__construct() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:19
PHP Notice:  Undefined property: stdClass::$insight in /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentResponse.php on line 44
PHP Stack trace:
PHP   1. {main}() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli:0
PHP   2. require_once() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli:11
PHP   3. AcquiaCli\AcquiaCli->run() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli-robo.php:44
PHP   4. Robo\Runner->run() /home/mbaev/.acquia/api-v2-cli/src/AcquiaCli.php:98
PHP   5. Robo\Application->run() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/robo/src/Runner.php:175
PHP   6. Robo\Application->doRun() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:148
PHP   7. Robo\Application->doRunCommand() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:240
PHP   8. Consolidation\AnnotatedCommand\AnnotatedCommand->run() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:956
PHP   9. Consolidation\AnnotatedCommand\AnnotatedCommand->execute() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Command/Command.php:252
PHP  10. Consolidation\AnnotatedCommand\CommandProcessor->process() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:404
PHP  11. Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/CommandProcessor.php:148
PHP  12. Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher->validate() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/CommandProcessor.php:167
PHP  13. Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher->callValidator() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/ValidateHookDispatcher.php:27
PHP  14. AcquiaCli\Commands\DeployCommand->validateUuidHook() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/ValidateHookDispatcher.php:43
PHP  15. AcquiaCli\Commands\DeployCommand->getEnvironmentFromEnvironmentName() /home/mbaev/.acquia/api-v2-cli/src/Commands/AcquiaCommand.php:115
PHP  16. AcquiaCloudApi\CloudApi\Client->environments() /home/mbaev/.acquia/api-v2-cli/src/Commands/AcquiaCommand.php:134
PHP  17. AcquiaCloudApi\Response\EnvironmentsResponse->__construct() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/CloudApi/Client.php:473
PHP  18. array_map() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18
PHP  19. AcquiaCloudApi\Response\EnvironmentsResponse->AcquiaCloudApi\Response\{closure:/home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18-20}() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18
PHP  20. AcquiaCloudApi\Response\EnvironmentResponse->__construct() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:19
PHP Notice:  Undefined property: stdClass::$insight in /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentResponse.php on line 44
PHP Stack trace:
PHP   1. {main}() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli:0
PHP   2. require_once() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli:11
PHP   3. AcquiaCli\AcquiaCli->run() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli-robo.php:44
PHP   4. Robo\Runner->run() /home/mbaev/.acquia/api-v2-cli/src/AcquiaCli.php:98
PHP   5. Robo\Application->run() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/robo/src/Runner.php:175
PHP   6. Robo\Application->doRun() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:148
PHP   7. Robo\Application->doRunCommand() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:240
PHP   8. Consolidation\AnnotatedCommand\AnnotatedCommand->run() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:956
PHP   9. Consolidation\AnnotatedCommand\AnnotatedCommand->execute() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Command/Command.php:252
PHP  10. Consolidation\AnnotatedCommand\CommandProcessor->process() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:404
PHP  11. Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/CommandProcessor.php:148
PHP  12. Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher->validate() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/CommandProcessor.php:167
PHP  13. Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher->callValidator() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/ValidateHookDispatcher.php:27
PHP  14. AcquiaCli\Commands\DeployCommand->validateUuidHook() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/ValidateHookDispatcher.php:43
PHP  15. AcquiaCli\Commands\DeployCommand->getEnvironmentFromEnvironmentName() /home/mbaev/.acquia/api-v2-cli/src/Commands/AcquiaCommand.php:120
PHP  16. AcquiaCloudApi\CloudApi\Client->environments() /home/mbaev/.acquia/api-v2-cli/src/Commands/AcquiaCommand.php:134
PHP  17. AcquiaCloudApi\Response\EnvironmentsResponse->__construct() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/CloudApi/Client.php:473
PHP  18. array_map() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18
PHP  19. AcquiaCloudApi\Response\EnvironmentsResponse->AcquiaCloudApi\Response\{closure:/home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18-20}() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18
PHP  20. AcquiaCloudApi\Response\EnvironmentResponse->__construct() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:19
PHP Notice:  Undefined property: stdClass::$insight in /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentResponse.php on line 44
PHP Stack trace:
PHP   1. {main}() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli:0
PHP   2. require_once() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli:11
PHP   3. AcquiaCli\AcquiaCli->run() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli-robo.php:44
PHP   4. Robo\Runner->run() /home/mbaev/.acquia/api-v2-cli/src/AcquiaCli.php:98
PHP   5. Robo\Application->run() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/robo/src/Runner.php:175
PHP   6. Robo\Application->doRun() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:148
PHP   7. Robo\Application->doRunCommand() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:240
PHP   8. Consolidation\AnnotatedCommand\AnnotatedCommand->run() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:956
PHP   9. Consolidation\AnnotatedCommand\AnnotatedCommand->execute() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Command/Command.php:252
PHP  10. Consolidation\AnnotatedCommand\CommandProcessor->process() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:404
PHP  11. Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/CommandProcessor.php:148
PHP  12. Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher->validate() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/CommandProcessor.php:167
PHP  13. Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher->callValidator() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/ValidateHookDispatcher.php:27
PHP  14. AcquiaCli\Commands\DeployCommand->validateUuidHook() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/ValidateHookDispatcher.php:43
PHP  15. AcquiaCli\Commands\DeployCommand->getEnvironmentFromEnvironmentName() /home/mbaev/.acquia/api-v2-cli/src/Commands/AcquiaCommand.php:120
PHP  16. AcquiaCloudApi\CloudApi\Client->environments() /home/mbaev/.acquia/api-v2-cli/src/Commands/AcquiaCommand.php:134
PHP  17. AcquiaCloudApi\Response\EnvironmentsResponse->__construct() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/CloudApi/Client.php:473
PHP  18. array_map() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18
PHP  19. AcquiaCloudApi\Response\EnvironmentsResponse->AcquiaCloudApi\Response\{closure:/home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18-20}() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18
PHP  20. AcquiaCloudApi\Response\EnvironmentResponse->__construct() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:19
PHP Notice:  Undefined property: stdClass::$insight in /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentResponse.php on line 44
PHP Stack trace:
PHP   1. {main}() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli:0
PHP   2. require_once() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli:11
PHP   3. AcquiaCli\AcquiaCli->run() /home/mbaev/.acquia/api-v2-cli/bin/acquiacli-robo.php:44
PHP   4. Robo\Runner->run() /home/mbaev/.acquia/api-v2-cli/src/AcquiaCli.php:98
PHP   5. Robo\Application->run() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/robo/src/Runner.php:175
PHP   6. Robo\Application->doRun() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:148
PHP   7. Robo\Application->doRunCommand() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:240
PHP   8. Consolidation\AnnotatedCommand\AnnotatedCommand->run() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Application.php:956
PHP   9. Consolidation\AnnotatedCommand\AnnotatedCommand->execute() /home/mbaev/.acquia/api-v2-cli/vendor/symfony/console/Command/Command.php:252
PHP  10. Consolidation\AnnotatedCommand\CommandProcessor->process() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:404
PHP  11. Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/CommandProcessor.php:148
PHP  12. Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher->validate() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/CommandProcessor.php:167
PHP  13. Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher->callValidator() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/ValidateHookDispatcher.php:27
PHP  14. AcquiaCli\Commands\DeployCommand->validateUuidHook() /home/mbaev/.acquia/api-v2-cli/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/ValidateHookDispatcher.php:43
PHP  15. AcquiaCli\Commands\DeployCommand->getEnvironmentFromEnvironmentName() /home/mbaev/.acquia/api-v2-cli/src/Commands/AcquiaCommand.php:120
PHP  16. AcquiaCloudApi\CloudApi\Client->environments() /home/mbaev/.acquia/api-v2-cli/src/Commands/AcquiaCommand.php:134
PHP  17. AcquiaCloudApi\Response\EnvironmentsResponse->__construct() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/CloudApi/Client.php:473
PHP  18. array_map() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18
PHP  19. AcquiaCloudApi\Response\EnvironmentsResponse->AcquiaCloudApi\Response\{closure:/home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18-20}() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:18
PHP  20. AcquiaCloudApi\Response\EnvironmentResponse->__construct() /home/mbaev/.acquia/api-v2-cli/vendor/typhonius/acquia-php-sdk-v2/src/Response/EnvironmentsResponse.php:19

Support Windows usage

Over in #57 I've included some variables that would support Windows. I'd like someone with a Windows machine to be able to test out that branch to check that it works.

Other commands which would specifically need testing are:

  • setup
  • drush:aliases
  • log:download
  • database:backup:download

Update to acquia-php-sdk-v2 2.0

Work has commenced on restructuring the underlying API in typhonius/acquia-php-sdk-v2#34.

This is quite a large restructure as it splits the endpoints into individual classes. The impact will be to completely break the underlying API which means we'll need a new major release. I'll be creating a 2.0 release on the SDK and a corresponding 2.0 release here. I'll also be taking this opportunity to bump dependencies.

New work will go into the 2.0 release and be selectively backported, to 1.x where applicable. New features that will likely be backported (but haven't yet been added in) will be:

  • Logstreaming
  • Integration of waitForTask with Notifications

Wrong example of deploy:prepare

Describe the bug

Wrong execution when calling acquiacli deploy:prepare.
On the example section on Readme file, it says acquiacli deploy:prepare UUID, environmentFrom, environmentTo

# Copy the files and db from alpha to dev for testing new code
acquiacli deploy:prepare prod:myacquiasite alpha dev

but looking deeply on DeployCommand.php it is public function deployPrepare($uuid, $environmentTo, $environmentFrom = null).

Expected behavior

I believe the expected behavior must be:

# Copy the files and db to dev from alpha for testing new code.
acquiacli deploy:prepare prod:myacquiasite **dev alpha** 

Also, it could be more clear regarding not passing the last argument, which means that it is going to pull the db and files from production.

Additional context
Tested on acquia_cli:2.0.3 tag.

Thanks for this very helpful project.

--path to allow you to specify filename so we know exactly where the DB is.

Is your feature request related to a problem? Please describe.
As a user, working on automated deploys, I need the database to be at a specific filename so that my automated script knows where to grab it from.

Example: acquiacli db:backup:download prod:sdsuextension prod sdsuextenstion --path=./references/latest.sql.gz makes a file in the folder ./references/latest.sql.gz with the contents of what ever the backup database file contained.

Describe the solution you'd like
It would be wonderful if the --path argument would take either a directory or a filename. I'm comparing functionality to terminus. Their command allows a --to parameter where you can specify the exact filename.

Describe alternatives you've considered

Other alternatives would be:

  • To return the path somehow... I guess I could always grep the output for it?
  • To return the file as a stream so that we can pipe it to the place we want... example acquiacli db:backup:download prod:sdsuextension prod sdsuextenstion > references/latest.sql.gz
  • To get the link to the latest db, but that requires a logged in session to grab it.

For now I'm going to just do a mv using a glob and move it from an always empty directory to the filename I want like mv /tmp/prod-sdsuextenstion-*.sql.gz ./references/latest.sql.gz`.

Additional context

Here's what happens when I try to do it now

$ acquiacli db:backup:download prod:sdsuextension prod sdsuextenstion --path=./db.sql.gz
PHP Notice:  Undefined offset: 0 in /home/allan/.local/lib/acquia_cli/src/Commands/DbBackupCommand.php on line 157
PHP Notice:  Trying to get property 'id' of non-object in /home/allan/.local/lib/acquia_cli/src/Commands/DbBackupCommand.php on line 157
➜  Downloading database backup to ./db.sql.gz/prod-sdsuextenstion-.sql.gz
    0 [➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬] [error]  Directory ./db.sql.gz does not exist for sink value of ./db.sql.gz/prod-sdsuextenstion-.sql.gz 

Allow users to override the lock

Is your feature request related to a problem? Please describe.
Sometimes, we might want to run acquiacli in two concurrent processes e.g. to have two log streaming windows open.

Describe the solution you'd like
An override on the command line of the lock functionality built in e.g. --no-lock

Describe alternatives you've considered
N/A

Additional context
N/A

setup:config creates an unwritable ~/.acquiacli directory.

Describe the bug
When the user first configures their account with setup:config, the process fails because acquiacli creates a directory it cannot write to.

To Reproduce

franklin@llama:~$ rm -rf ~/.acquiacli/
franklin@llama:~$ ./acquiacli.phar setup:config
➜                                                                  
➜   Global configuration (/home/franklin/.acquiacli/acquiacli.yml) 
➜                                                                  
?  Global configuration file not found. Would you like to add one? (y/n) y
?  What is your Acquia key? [redacted]
?  What is your Acquia secret? 
➜                                                            
➜   /home/franklin/.acquiacli/acquiacli.yml is not writeable 
➜                                                            
franklin@llama:~$ ls -al .acquiacli/
ls: cannot open directory '.acquiacli/': Permission denied
franklin@llama:~$ ls -ald .acquiacli
d-w-r-xr-T 2 franklin franklin 4096 Nov 20 10:46 .acquiacli
franklin@llama:~$ php -v
PHP 7.3.19-1~deb10u1 (cli) (built: Jul  5 2020 06:46:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.19, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.19-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies
franklin@llama:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 10 (buster)
Release:	10
Codename:	buster
franklin@llama:~$ ./acquiacli.phar --version
AcquiaCli 2.0.9

Expected behavior
A new $HOME/.acquiacli/acquiacli.yml with the API key.

Desktop (please complete the following information):

  • Debian 10
  • PHP 7.3.19
  • AcquiaCLI 2.0.9

Skipping Drush tasks fails on PROD

Learned this the hard way unfortunately...

in function acquiaDeployProd($uuid, $branch, $skipDrushTasks = false) the variable name $skipDrushTasks is passed to acquiaDeployEnv() incorrectly as $drushTasks so never can be set to true.

PHP Fatal error: Uncaught Error: Class 'Robo\Config\YamlConfigLoader' not found

I included "typhonius/acquia_cli": "1.0.1" in my composer project, and ran ./vendor/bin/acquiacli setup and I got:

PHP Fatal error:  Uncaught Error: Class 'Robo\Config\YamlConfigLoader' not found in /PROJECTPATH/vendor/typhonius/acquia_cli/bin/acquiacli-robo.php:27
Stack trace:
#0 /PROJECTPATH/vendor/typhonius/acquia_cli/bin/acquiacli(11): require_once()
#1 {main}
  thrown in /PROJECTPATH/vendor/typhonius/acquia_cli/bin/acquiacli-robo.php on line 27

Semaphore extension

getting the below error when using this, please let me know how we can address this

+ vendor/bin/acquiacli app:list
PHP Warning:  Declaration of AcquiaCli\Commands\AcquiaCommand::confirm($question) should be compatible with Robo\Tasks::confirm($question, $default = false) in /vendor/typhonius/acquia_cli/src/Commands/AcquiaCommand.php on line 19
PHP Fatal error:  Uncaught Symfony\Component\Lock\Exception\InvalidArgumentException: Semaphore extension (sysvsem) is required in /vendor/symfony/lock/Store/SemaphoreStore.php:41
Stack trace:
#0 /vendor/typhonius/acquia_cli/src/AcquiaCli.php(88): Symfony\Component\Lock\Store\SemaphoreStore->__construct()
#1 /vendor/typhonius/acquia_cli/bin/acquiacli-robo.php(44): AcquiaCli\AcquiaCli->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /vendor/typhonius/acquia_cli/bin/acquiacli(11): require_once('/home/jenkins/w...')
#3 {min}
  ​thrown in /vendor/symfony/lock/Store/SemaphoreStore.php on line 41

Code commit task is missing

Describe the bug
The task list or notification list does not show any activities related to code commit. (CodeDeployed
CodeSwitched)

To Reproduce
tried using both v1 & v2

./bin/acquiacli task:list $APP
./bin/acquiacli notification:list $APP

Expected behavior
Should display CodeDeployed, CodeSwitched items in the list

Additional context
Not sure whether the Acquia API is not returning these data

Allow different config directory definition

When running acquiaConfigUpdate it assumes 'sync' as the config directory definition:
->drush(['config-import', 'sync'])

Would be great if this could be configurable from the extraconfig or the likes, Acquia for example uses 'vcs' as the default.

Acquia key and secret via environment variable

I would like to add this as part of a docker-based environment where each member of our team has their key and secret stored as an environment variable. We would not want a file containing that information to be placed into the git repository.

Will it read it if the file is set as:

acquia:
  key: ${SECRET_ACAPI_KEY}
  secret: ${SECRET_ACAPI_SECRET}

Or is there another way to accomplish the same thing?

300 Second task timeout limit reached

Issue
Due to several lengthy acquia post-code-deploy hooks we are using that regenerate the search index for drupal. Our acquiacli jobs are taking longer than 5 minutes (300 seconds). Thus we get a timeout on the job

acquia_cli-timeout

Notification in-progress                     
 4 mins [⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬➤⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%I0521 15:03:09.999927      75 log.go:172] (0xc000676000) Data frame received for 5
 I0521 15:03:09.999957      75 log.go:172] (0xc00082a960) (5) Data frame handling
 I0521 15:03:09.999973      75 log.go:172] (0xc00082a960) (5) Data frame sent
  [error]  Task timeout of 300 seconds exceeded. 
 I0521 15:03:10.088292      75 log.go:172] (0xc000676000) (0xc000696000) Stream removed, broadcasting: 3
 I0521 15:03:10.088368      75 log.go:172] (0xc000676000) Data frame received for 1
 I0521 15:03:10.088378      75 log.go:172] (0xc000403f40) (1) Data frame handling
 I0521 15:03:10.088387      75 log.go:172] (0xc000403f40) (1) Data frame sent
 I0521 15:03:10.088394      75 log.go:172] (0xc000676000) (0xc000403f40) Stream removed, broadcasting: 1
 I0521 15:03:10.088646      75 log.go:172] (0xc000676000) (0xc00082a960) Stream removed, broadcasting: 5
 I0521 15:03:10.089299      75 log.go:172] (0xc000676000) Go away received
 I0521 15:03:10.089478      75 log.go:172] (0xc000676000) (0xc000403f40) Stream removed, broadcasting: 1
 I0521 15:03:10.089655      75 log.go:172] (0xc000676000) (0xc000696000) Stream removed, broadcasting: 3
 I0521 15:03:10.089753      75 log.go:172] (0xc000676000) (0xc00082a960) Stream removed, broadcasting: 5
 command terminated with exit code 1

Sollution Proposal & Question
I don't see anywhere that I can adjust the acquiacli ssh timeouts. Is it possible to make the timeout longer? I know I can use the -no-wait flag to make acquiacli return quickly but this is a CI job that needs to wait for a artifact:deploy job to finish before other jobs start acquiacli c:s (for example).

A nice option to have would be '--ssh-timeout'. Or perhaps change the way the task progress is determined and reported so that it doesn't have to keep a single connection open that long. Perhaps opening a shell to check on the task every thirty seconds or something. I have not tried the --progress-delay option. But that option seems to be only output related and not ssh related.

Describe alternatives you've considered
I've tried making the job faster by limiting the io with these options

--no-ansi
-n
--no-lock
-q

But those didn't eliminate the problem.

Code Switch error

Describe the bug
"acquiacli c:s uuid branch environment" seems to fail on the second parameter.

To Reproduce
Steps to reproduce the behavior including calling code:

  1. composer global require typhonius/acquia_cli:2.0.x-dev
  2. authenticate with acquiacli setup
  3. acquiacli c:s uuid tags/asdf dev

Expected behavior
This command should switch the "dev" server to the tags/asdf branch.

Screenshots

codeSwitch-bug-

Desktop (please complete the following information):

  • OS: Debian Linux 10
  • Code version/tag 2.0

Additional context
Error output

Fatal error: Uncaught TypeError: Argument 2 passed to AcquiaCli\Commands\CodeCommand::codeSwitch() must be an instance of AcquiaCloudApi\Response\EnvironmentResponse, string given in /home/docker/.composer/vendor/typhonius/acquia_cli/src/Commands/CodeCommand.php:111
Stack trace:
#0 [internal function]: AcquiaCli\Commands\CodeCommand->codeSwitch('3d2cc3e2-d32d-4...', 'qa-build', Object(AcquiaCloudApi\Response\EnvironmentResponse), Array)
#1 /home/docker/.composer/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#2 /home/docker/.composer/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#3 /home/docker/.composer/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#4 /home/do in /home/docker/.composer/vendor/typhonius/acquia_cli/src/Commands/CodeCommand.php on line 111

"Limit" & "Sort" Options does not work for backups list

Describe the bug
Acquia API V2 supports offset/limit/sort options. Seems that this tool does not support them.

To Reproduce
Steps to reproduce the behavior including calling code:

  1. Call acquiacli database:backup:list {appUuid} {envName} {dbName} --limit 1 for database with few backups
  2. See full list of backups returned instead of one

Expected behavior
Only one database backup is returned

Desktop (please complete the following information):

  • OS: latest macOS & latest Ubuntu
  • 2.0.6

Update to use ^3 of consolidation/robo

Currently acquia_cli requires "consolidation/robo": "^2" which works fine with Drush 10 which had a requirement of "consolidation/robo": "^1.4.11 || ^2 || ^3". Since Drush 11 though the requirement is now "consolidation/robo": "^3". This means it is no longer possible to have the latest versions of both acquia_cli and drush in the same project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.