grafana / k6-operator

An operator for running distributed k6 tests.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check existence of start and stop jobs before creation

yorugac opened this issue · comments

Feature Description

It's common to see the following lines in k6-operator logs during test runs:

2023-10-13T19:32:16Z    ERROR   controllers.TestRun     Failed to launch k6 test starter        {"namespace": "default", "name": "k6-sample", "reconcileID": "a04a3862-895c-4b66-985d-f98d558c66c6", "error": "jobs.batch \"k6-sample-starter\" already exists"}

Both for start and stop job. This happens because there's no check for existence of those jobs prior to creating them and the state of TestRun hasn't caught up yet.

Suggested Solution (optional)

Unless something else comes up, it should be a straight-forward addition.

Already existing or connected issues / PRs (optional)

No response

Hey @yorugac , Would like to work on this. Possible to any more details or point me to code from where I can start?