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

Rename cleanup `post` option to `all`

Open yorugac opened this issue 6 months ago • 0 comments

Feature Description

Currently .spec.cleanup in TestRun supports only one option, "post". When set, it results in k6-operator cleaning up the CR and all its resources after the test run finishes. In https://github.com/grafana/k6-operator/issues/275, a request for at least one more option was made. It makes senses to rename "post" to "all" as it better reflects what is happening.

Suggested Solution (optional)

Such a rename would be a breaking change. We can support both "post" and "all" for some time, with deprecation warning for "post".

Already existing or connected issues / PRs (optional)

As an additional context. Initially, the choice of the word was made probably to mean that resources are cleaned up "post" (after) the test run. But it's hard to imagine that we will ever have the need in, for example, cleanup: "pre" -- before the test run. At the same time, we already have a request from https://github.com/grafana/k6-operator/issues/275 to limit the amount of test runs impacted instead.

yorugac avatar Aug 23 '24 12:08 yorugac