opensearch-project / reporting-cli

Apache License 2.0
4 stars 13 forks source link

[BUG] OpenSearch Reporting CLI Lambda not evaluating certain environment variables #38

Closed aaronbrighton closed 1 year ago

aaronbrighton commented 1 year ago

What is the bug?

When using the OpenSearch Reporting CLI Lambda function, the following environment variables are not evaluated correctly. Instead they are using the default values.

How can one reproduce the bug?

Follow the instructions here (https://opensearch.org/docs/latest/dashboards/reporting-cli/rep-cli-lambda/) and set any of the above environment variables on the Lambda function instead of passing them as the event object.

What is the expected behavior?

Expectation is that the email sent by the Lambda function would contain a non-default subject and note.

What is your host/environment?

N/A

Do you have any screenshots?

See description for observed behavior.

Do you have any additional context?

It appears the following code function causes bypass of the environment variables: https://github.com/opensearch-project/reporting-cli/blob/af8d3073ec5488d487410f6e70a626f970399f05/src/arguments.js#L78

rupal-bq commented 1 year ago

@aaronbrighton Thanks for reporting the issue. I will take a look.

rupal-bq commented 1 year ago

Hi @aaronbrighton, this will be fixed in next release v1.1.0.

If you would like to try/test before the release, you can refer to doc for building docker image from source code https://github.com/opensearch-project/reporting-cli/blob/main/docs/examples/lambda_container_image_from_source.md.