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

Add 'run once' logic for setup / teardown #223

Open
yorugac opened this issue Apr 28, 2023 · 2 comments
Open

Add 'run once' logic for setup / teardown #223

yorugac opened this issue Apr 28, 2023 · 2 comments
Labels
enhancement New feature or request PLZ

Comments

@yorugac
Copy link
Collaborator

yorugac commented Apr 28, 2023

Feature Description

It is mentioned in k6 docs that k6 runs setup and teardown functions only once per test. While this specific page does not mention k6 Cloud test runs, they use the same logic: no matter how many instances were involved in a test, setup and teardown run only once, in some one instance.

To be consistent with k6 Cloud test runs, k6-operator should have the same logic of running these two functions only one runner, with all the accompanying logic (like passing data returned from setup).

Suggested Solution (optional)

No response

Already existing or connected issues / PRs (optional)

No response

@yorugac yorugac added enhancement New feature or request PLZ labels Apr 28, 2023
@cmergenthaler
Copy link
Contributor

Any plans on implementing this yet? We are really interested in a once-executed setup/teardown :)

@na--
Copy link
Member

na-- commented Jul 20, 2023

Just to be thorough, I've explained my proposal for native distributed execution in k6 (see grafana/k6#3218 and grafana/k6#3217). It's not meant to replace k6-operator, but rather to make k6-operator easier to develop and focused only on the k8s specifics, not the actual distributed execution of k6 tests and on re-implementing things that already exist in k6 like setup() and teardown() handling.

One of the firsts steps in that chain of PRs (grafana/k6#3205) actually delivers this, albeit in a currently untested and non-error-handled kind of way... 😅 Still, the important part is that distributed metrics handling (grafana/k6#3213) is not actually needed for setup() and teardown(), so it might be easier to work on polishing grafana/k6#3205 (with tests and error handling) and migrate to the new distributed execution instead of re-implementing support for managing setup() and teardown() externally again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PLZ
Projects
None yet
Development

No branches or pull requests

3 participants