Skip to content
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

ARTILLERY_CLOUD_API_KEY has no effect in .env file #2582

Closed
bessey opened this issue Mar 15, 2024 · 3 comments · Fixed by #2585
Closed

ARTILLERY_CLOUD_API_KEY has no effect in .env file #2582

bessey opened this issue Mar 15, 2024 · 3 comments · Fixed by #2585
Assignees

Comments

@bessey
Copy link

bessey commented Mar 15, 2024

ARTILLERY_CLOUD_API_KEY has to be in your actual environment, whereas .env works for other environment variables.

Version info:


        ___         __  _ ____
  _____/   |  _____/ /_(_) / /__  _______  __ ___
 /____/ /| | / ___/ __/ / / / _ \/ ___/ / / /____/
/____/ ___ |/ /  / /_/ / / /  __/ /  / /_/ /____/
    /_/  |_/_/   \__/_/_/_/\___/_/   \__  /
                                    /____/


VERSION INFO:

Artillery: 2.0.7
Node.js:   v18.19.0
OS:        darwin

Running this command:

$ npx artillery run-fargate --dotenv ./.env  --count 1 --record test.yml

I expected to see this happen:

The test runs with results pushed to Artillery Cloud, because my Artillery Cloud key is set in the .env file

Instead, this happened:

Error: API key is required to record test results to Artillery Cloud
See https://docs.art/get-started-cloud for more information

Files being used:

# .env
ARTILLERY_CLOUD_API_KEY=<redacted>

If you run with a true env var, i.e. ARTILLERY_CLOUD_API_KEY npx artillery run-fargate it works fine, but this makes it unique in this regard I think?

@simonlewandowski
Copy link

+1

@hassy
Copy link
Member

hassy commented Mar 15, 2024

thanks for the bug report @bessey, will fix in the upcoming v2.0.8 release (due on Monday)

@hassy hassy self-assigned this Mar 17, 2024
hassy added a commit that referenced this issue Mar 17, 2024
Make values available as early as possible for any code that may need them.

Fixes #2582
hassy added a commit that referenced this issue Mar 18, 2024
Make values available as early as possible for any code that may need them.

Fixes #2582
@bernardobridge
Copy link
Contributor

bernardobridge commented Mar 18, 2024

Fix now released on v.2.0.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants