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

Rename K6 CRD to TestRun #226

Closed
yorugac opened this issue May 4, 2023 · 8 comments
Closed

Rename K6 CRD to TestRun #226

yorugac opened this issue May 4, 2023 · 8 comments
Assignees
Labels
breaking change Breaking change can impact some existing workflows. PLZ
Milestone

Comments

@yorugac
Copy link
Collaborator

yorugac commented May 4, 2023

In order to improve readability of our interfaces, we should rename the K6 CRD from:

kind: K6

To:

kind: TestRun

Why? kind: K6 is not very descriptive as from the first glance, it might mean a lot of things. If we add new CRDs (see #191), we should try to remove the confusing names as well.

This is a breaking change for existing setups so consider supporting both names for some period of time.

@yorugac yorugac added breaking change Breaking change can impact some existing workflows. PLZ labels May 4, 2023
@yorugac yorugac self-assigned this Aug 22, 2023
@yorugac
Copy link
Collaborator Author

yorugac commented Aug 22, 2023

It appears that general Kubernetes guideline is to make "roundtrip convertible" CRD types which more commonly would mean making them backwards compatible. In our case, we should probably try to be backwards compatible with K6 resources at least for some time so TestRun should be added as a new CRD, with conversions.

Additionally, we could use this as opportunity to switch from v1alpha1 to v1beta1 for TestRun specifically. Drawback: there are a few issues related to API stability that would be good to resolve first:

@yorugac
Copy link
Collaborator Author

yorugac commented Sep 25, 2023

TestRun CRD has been added as a duplicate of K6 CRD with the latter being marked as deprecated in #286
Missing dependency: #273

We'll support both K6 and TestRun for some time, to give people the opportunity to switch. But afterwards K6 will be removed. IOW, we didn't get to the "breaking" part yet.

I'm leaving this issue open for now. What is left:

  • updating documentation
  • removing K6 CRD in the future™

@yorugac
Copy link
Collaborator Author

yorugac commented Dec 15, 2024

K6 CRD is removed in main branch (i.e. the next release) so closing this issue 🎉

@jeromeguillaume
Copy link

jeromeguillaume commented Jan 24, 2025

Not sure if it's related to this change but (on January 24, 2025) the K6s operator doesn't work (looping restart) and it complains about following error:
ERROR controller-runtime.source.EventHandler if kind is a CRD, it should be installed before calling Start {"kind": "K6.k6.io", "error": "no matches for kind \"K6\" in version \"k6.io/v1alpha1\""}

The image is: ghcr.io/grafana/k6-operator:latest

@yorugac
Copy link
Collaborator Author

yorugac commented Jan 24, 2025

Hi @jeromeguillaume, yes, absolutely, it's related. K6 has had a deprecation warning for more than a year, now it's fully removed and the latest will not work with it. The same goes to all future releases of k6-operator. Please switch to using TestRun. It's a one-line change, the API is exactly the same 🙂

@jeromeguillaume
Copy link

No you didn't correctly understand my request: I already used TestRun kind (as the K6 is deprecated).

But the latest release of K6s operator (v0.0.18) doesn't work! There is the {"kind": "K6.k6.io", "error": "no matches for kind "K6" in version "k6.io/v1alpha1" error but I don't use the K6 Kind

The workaround is to remove v0.0.18 and use the v0.0.17:
git clone https://github.com/grafana/k6-operator.git --branch v0.0.17 --single-branch

@yorugac
Copy link
Collaborator Author

yorugac commented Jan 24, 2025

@jeromeguillaume, that's very strange: v0.0.18 contains both TestRun and K6 still. There was no release yet with this removal. At the moment, only latest image and kustomize setup (main branch) contain the removal. 🤔 I guess this could happen if you're using the older installation that contains K6 CRD with the newer image: that'd break indeed.

How are you installing / upgrading k6-operator?

@yorugac
Copy link
Collaborator Author

yorugac commented Feb 2, 2025

The v0.0.19 release is the first one that contains this change fully: bundle, Helm chart and latest images were all updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Breaking change can impact some existing workflows. PLZ
Projects
Status: No status
Development

No branches or pull requests

2 participants