grafana / k6-operator

An operator for running distributed k6 tests.
Apache License 2.0
589 stars 166 forks source link

Add test abort in `created` state and cloud output mode #261

Closed yorugac closed 11 months ago

yorugac commented 1 year ago

Consider how to add monitoring of aborts from k6 Cloud in these cases:

yorugac commented 11 months ago

"Global" aborts were implemented as part of PR https://github.com/grafana/k6-operator/pull/283: each k6 Cloud test run checks the abort status at the beginning of reconcile loop. If there's an abort status, the stop Job is created and test run is stopped. This logic works for both PLZ test run and cloud output test run.

Necessary caveat: if the test run hasn't been identified as k6 Cloud test run yet, it cannot be aborted at all. This scenario can happen with cloud output test run with an error from an initializer (e.g. badly formed script or arguments). It might make sense to look into this case more during https://github.com/grafana/k6-operator/issues/260.