-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Upgrade Tekton Model to v0.47.0 #4989
Conversation
@dziemba : I think we should keep old generators v1alpha1 and v1beta1 for backward compatibility. |
First off: This whole PR turned out a bit larger than I anticipated. If you like me to split up some things or revert some of the (opinionated) changes, I'm happy to do that :)
Do you mean keeping them pinned to the older Tekton versions? I thought about that, and backwards compatibility would be super nice to have. The problem I see with that approach though is how Tekton creates new APIs. They start in alpha, then get promoted to beta and then to stable apparently. Looking at the changes for v1alpha1, we are losing most of the old objects, which breaks backwards compatibility. But we also get two new objects, which we wouldn't be able to use if we're pinning v1alpha1 to an older Tekton version. I think ideally we would need to have multiple packages for different Tekton versions, that each contain all API group models for that given version. That will quickly become a lot of code and maintenance effort though. Especially since Tekton is still on v0.x. How do you suggest we proceed here? I'm happy to revert the changes to v1alpha1 back to how it was, but I'm a bit worried that won't be very future-proof. |
3859bc1
to
32c8c96
Compare
SonarCloud Quality Gate failed. |
@rohanKanojia @shawkins @manusa Any update on which direction to go in? I'm happy to change this PR as you see fit :) |
@vdemeester @afrittoli @bobcatfish (Tekton topical owners for API Versioning) do you have any suggestions on what the right approach here is? |
I am not sure I fully followed but tekton follow the same practices as k8s. API versions go from alpha to stable. Some alpha types can be removed as, as state in most api practice, alpha is.. breakable, from one release to the other, breaking changes on field or removal of a type can happen. I think a library should focus more on the api it supports than tekton version themselves. A gist from the doc
As of today (0.46), most types are either in |
extensions/tekton/examples/src/main/java/io/fabric8/tekton/api/examples/TaskCreate.java
Outdated
Show resolved
Hide resolved
...ions/tekton/examples/src/main/java/io/fabric8/tekton/api/examples/v1beta1/TaskRunCreate.java
Outdated
Show resolved
Hide resolved
extensions/tekton/tests/src/test/java/io/fabric8/tekton/pipeline/v1beta1/TaskTest.java
Outdated
Show resolved
Hide resolved
@dziemba : I think we can move forward with this change |
Thanks for the review, I'll address the feedback soon |
a0657e9
to
b33b8e3
Compare
@rohanKanojia I addressed all feedback now, please have another look :) |
Hi @dziemba, Sorry for the late feedback. This morning we noticed that some of the structs are missing. More specifically, the Interceptor in the triggers module (https://pkg.go.dev/github.com/tektoncd/triggers@v0.23.1/pkg/apis/triggers/v1alpha1#Interceptor). Could you please add that one too? |
b33b8e3
to
f726040
Compare
@manusa Sure, I've now added the Update: I forgot to add the new type to the API DSL, I just pushed a new commit that includes these changes as well. |
1be519c
to
f50ce0e
Compare
Hi @dziemba, sorry for the late updates. We've been trying to release a stable 6.6 version. If you covered everything we mentioned, then it should be good to go. Don't worry about changelog conflicts or similar. If you checked the |
This is also affected by #5113 . We should refactor trigger generators to remove the split package warning. |
f50ce0e
to
9c4ff0a
Compare
Should we update triggers to 0.24 that got released last week? |
- Upgrade Tekton Pipelines to v0.47.0 - Upgrade Tekton Triggers to v0.23.0 - Add the new `v1` Tekton Pipelines API Group - Merge generator code into single package per module (to avoid duplicating boilerplate + version drifts between API groups) and remove obsolete Golang setup (e.g. vendoring) - Rename `ArrayOrString` to `ParamValue` (has been renamed upstream) - Fix various tests, delete obsolete ones
9c4ff0a
to
804c625
Compare
SonarCloud Quality Gate failed. |
CHANGELOG was not correctly updated, I'll fix after merging to avoid re-running all pipelines. Improvement entries need to be removed |
LGTM, thx @dziemba! |
Description
v1
Tekton Pipelines API GroupArrayOrString
toParamValue
(has been renamed upstream)Type of change
test, version modification, documentation, etc.)
Checklist