newrelic / newrelic-lambda-cli

A CLI to install the New Relic AWS Lambda integration and layers.
https://newrelic.com/products/serverless-aws-lambda
Apache License 2.0
47 stars 53 forks source link

`newrelic-lambda integrations update` docs suggest `--nr-account-id` and `--nr-api-key` are optional, but they must be passed #266

Open huonw opened 6 months ago

huonw commented 6 months ago

Description

The docs in the README for newrelic-lambda integrations update suggests that two arguments are optional: with the phrase "Only required if changing the account to which the logs are sent" and . They appear to be required in practice:

https://github.com/newrelic/newrelic-lambda-cli/blob/f472e28ce78227986d0e1625cce1f54c7f76e075/README.md#L148-L149

Steps to Reproduce

  1. Run newrelic-lambda integrations update without any args
  2. Run newrelic-lambda integrations update --nr-account-id 0

Expected Behaviour

One of:

  1. arguments are just documented as required
  2. the arguments are optional in practice
  3. more details on how to omit an arg, e.g. if there's some special way to indicate something doesn't change like --nr-account-id unchanged or something

Relevant Logs / Console output

  1. without any args: Error: Missing option '--nr-account-id' / '-a'.
  2. --nr-account-id 0 only: Error: Missing option '--nr-api-key' / '-k'.

Your Environment

macOS

# requirements.txt
newrelic-lambda-cli==0.9.0
boto3==1.34.59
botocore==1.34.59
jmespath==1.0.1
python-dateutil==2.9.0.post0
six==1.16.0
urllib3==2.0.7
s3transfer==0.10.0
click==8.1.7
colorama==0.4.6
emoji==2.10.1
gql==2.0.0
graphql-core==2.3.2
promise==2.3
Rx==1.6.3
requests==2.31.0
charset-normalizer==3.3.2
idna==3.6
certifi==2024.2.2
tabulate==0.9.0

Additional context

N/A