acquia / cli

Command-line interface for Acquia Cloud Platform products
https://docs.acquia.com/acquia-cli/
GNU General Public License v2.0
42 stars 47 forks source link

CLI-1296: auth:login on 2.23.1 > Invalid key in Cloud datastore fixed #1710

Closed alchatti closed 5 months ago

alchatti commented 5 months ago

Motivation When using the latest version of acli which is 2.23.1 the command auth:login [-k|--key KEY] [-s|--secret SECRET] no longer works and generates the following error. This occurs when acli -n telemetry:disable is set before auth for CI/CD pipelines.

The issue is triggered during CI/CD pipeline by set some settings for the CLI before auth function such as switching on/off the telemetry.

Fixes #1708

Proposed changes if condition fix, update the cli only.

Alternatives considered reduce the number of required changes in code

Testing steps

  1. Follow the contribution guide to set up your development environment or download a pre-built acli.phar for this PR.
  2. Clear the kernel cache to pick up new and changed commands: ./bin/acli ckc
  3. Disable telemetry acli -n telemetry:disable to create the ~/.acquia/cloud_api.conf
  4. Login using auth:login [-k|--key KEY] [-s|--secret SECRET]
  5. Exception should not be raised and the authentication is a success
codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.23%. Comparing base (0c453ac) to head (47f2e00).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1710 +/- ## ========================================= Coverage 91.23% 91.23% - Complexity 1800 1801 +1 ========================================= Files 122 122 Lines 6455 6455 ========================================= Hits 5889 5889 Misses 566 566 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

danepowell commented 5 months ago

Thanks for the PR! I added some tests.