k6-operator icon indicating copy to clipboard operation
k6-operator copied to clipboard

Check existence of start and stop jobs before creation

Open yorugac opened this issue 2 years ago • 2 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

yorugac avatar Oct 13 '23 19:10 yorugac

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

Rajan-226 avatar Oct 18 '23 19:10 Rajan-226