-
Notifications
You must be signed in to change notification settings - Fork 488
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 doesn't override phases in environments #2738
Comments
thanks for the bug report @milosgajdos! |
Took a bit of time to refresh my memory - the behavior is inherited from Lodash For your specific scenario, the best thing to do would be to extract the phase definition under |
Interesting! Thanks for looking into that and suggesting a workaround. I still feel like this isn't particularly intuitive but I get that maintaining compatibility with the existing scripts is important. Do you want me to close this report or should I keep it open? It would be nice if this was documented in the docs better, maybe. |
So you're suggesting ditching the default phases config and simply focus fully on environments only i.e. something like this: config:
environments:
default:
target: https://foo-stage
phases:
- duration: 60
arrivalRate: 1
rampTo: 5
name: Warm up
- duration: 60
arrivalRate: 5
rampTo: 10
name: Ramp up
- duration: 30
arrivalRate: 10
rampTo: 30
name: Spike up
local:
target: http://localhost:3000
phases:
- duration: 30
arrivalRate: 1
rampTo: 10
name: Local test
variables:
token: '{{ $env.API_KEY }}'
json_ct: 'application/json'
version: v1
scenarios:
- name: '/{{ version }}/foos'
flow:
- get:
url: '/{{ version }}/foos'
headers:
authorization: 'Bearer {{ token }}' And then drive the load test via |
@milosgajdos yep something like that! and if that doesn't work either then we're in trouble 😆 |
Version info:
Running this command:
I expected to see this happen:
I was hoping the phases in the specified environment would FULLY override the ones defined in the default target. Instead, it would appear if your default target settings contain a list of phases and your environment defines say, only one phase, only the first one from the default target is replaced and the remaining two are happily used in the load test. This seems like a very strange UX.
If your environment defines number of phases larger than the default target they all override the default target
Instead, this happened:
I can see in the output the default target phases are happily being used
Files being used:
The text was updated successfully, but these errors were encountered: