-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Seeing the ReferenceError: __ITER is not defined
for execution context variables.
#2086
Comments
Thank for reporting this, I can reproduce it with the following simple script: export function setup() {
console.log("setup(): ", __VU, __ITER);
}
export default function () {
} It "works" in k6 v0.32.0, but returns I am putting "works" and "broke" in quotes because I am not sure if I should treat this as a bug 😕 If anything, the fact that we had Maybe I'm wrong about its utility though... @ahmetoz, can you explain what your use case for |
No need to apologize 😄 Thanks for the explanation, thanks for supporting this great tool. I'm using the __VU and __ITER context variables, to make correlation id header unique and traceable. Simply, in our backend logs, I could filter which VU runs which requests, similar to ITER like span ids to track which http requests run in this iteration. |
Thanks for explaining, and you might want to also chime in #1320 with your use case. We're currently in the middle of implementing the first version of that new |
This should close grafana/k6#2086
Environment
Expected Behavior
__ITER should be defined. But code throws
ReferenceError: __ITER is not defined
, This is happening when we install the k6 to a linux server, same code runs as expected in local machine with different k6 version (k6 v0.29.0 ((devel), go1.15.5, darwin/amd64))Actual Behavior
__ITER should be defined as __VU, the code is called in a setup context with a code added as local file system module. When I log the execution variables, I could see the __VU set to 0 but __ITER is undefined.
Steps to Reproduce the Problem
My assumption is sth changed in latest release.
The text was updated successfully, but these errors were encountered: