TEP-0114: Support Both V1alpha1 and V1beta1 for Custom Task in the Initial Release#867
TEP-0114: Support Both V1alpha1 and V1beta1 for Custom Task in the Initial Release#867tekton-robot merged 1 commit intotektoncd:mainfrom XinruZhang:TEP-0114-retries
Conversation
|
/approve cancel I need to think more about this-- if we introduce customruns without retries/retriesstatus at first and then add it in later, that's not really a backwards compatible change because we would expect all customruns to support retries, so it forces all controllers to update. |
|
What does it mean to support both ? 🤔 |
understood it to mean that both cc @XinruZhang |
|
Thanks for your comment @vdemeester! And thanks @jerop for your reply! As far as I understand, to support both, we have two options to go:
|
|
My thoughts on that are along the lines of a feature flag you can set to have the I think it's important to have some way of supporting continuing to use |
|
As long as |
|
Oh actually, if we go with the feature flag solution, do we want to define a new feature flag instead of |
Oh, definitely a new feature flag. I'm thinking of this similarly to the |
|
Thanks @abayer, I am just thinking aloud here:
Wouldn't that cause two changes for the operator?
Defaulting to
The users can choose to set the flag to |
|
That's a fair point. I think the right choice depends on how many users of custom tasks there are out in the wild right now - if having the default be |
|
/kind tep |
|
/unhold As we've decided to support both versions gated by a new feature flag, this PR is ready for review now. PTAL! |
I would definitely go for that one then, a feature flag specific to this particular feature. Having it tied to For the sake of it, this is what we say in our api compatibility policy for alpha feature and API.
I know we discussed it multiple times during the API working group, and in different PRs, and I'll go with whatever we collectively decide, but… I think one of the reason we are doing this (feature-flag, support both, …) is because our "views" on what the On the same vein, any reason to do a |
👍 I agree ! Adding two source paths -> extra complexity to the code and also for the custom tasks. Infact, my team was discussing we will build our own layer similar to tekton i.e. the ability to switch b/w 2 API using feature-flag for custom task controllers as well.
Even after |
Right, but a |
|
In terms of promotion readiness: It seems to me like the best path forward would be to resolve TEP-0121 before releasing custom tasks beta. In terms of what the migration plan should be: even if there were no changes between v1alpha1 Run and v1beta1 CustomRun, we would still want to have a feature flag IMO, because you need to update your controllers to use v1beta1, and having the flag makes the migration easier. (This would still be true even if we didn't rename from Run -> CustomRun.) IMO we should default to alpha and swap to beta after 1 release, and remove the flag after a few more releases. I'm confused about how gating custom task fields behind feature flags would work, although that's probably a discussion for the future. One potential compatibility policy that would make sense for CustomRun is that we can introduce new "optional" fields, but must give 9 months of warning if we want to make these fields required for all custom task controllers to support. (In general I think we should hesitate before adding anything to CustomRun spec or status, and ask ourselves if it would make sense in the custom spec or custom status instead.) |
Imho it does not 😅. The feature-flags controls what the "user" (operator) wants to use as API. The fact that a Custom Task controller listen to an api version, or another (or both), is outside its control. The only thing it allows is to be able to use a non-updated Custom Task a little bit longer (the time we support the feature flag). Supporting |
oh ok interesting. Imagine we are not going to make any changes to v1beta1 CustomRun compared to v1alpha1 Run. What would be your preferred migration plan in this case? Would you still want the feature flag, and what would its defaults/timeline be? |
I think I would announce ahead of time that in X release, |
|
IMHO, the biggest benefit that feature flag provides is to give custom task authors and end users enough time to test out the new Beta API, and at the same time, they are also able to use other new features or security patch etc. introduced after beta release. Otherwise, they have to make sure custom task beta works before updating to newer releases. |
@vdemeester I'm not sure If I uderstand correctly here: do you mean after making the new feature flag (say |
I think what vincent is saying is that we don't want to use |
|
Closing this PR as we decided to make decisions on TEP-0121 before promoting Custom Task Beta. |
|
Even though we have made a decision on TEP-0121, I still think it's valuable for the TEP to capture the discussion around how we will introduce v1beta1 CustomRuns (i.e. feature flag vs new field in the api vs just swapping to creating CustomRuns instead of Runs). It's not clear that we made a decision on that |
|
@lbernick will open a PR addressing that |
|
Oh sorry I missed this thread notification, and yes this is related to migration Plan, thanks for capturing this! Since @lbernick is going to open a PR to address it. I'll leave this as closed. |
|
/assign @jerop Waiting on the approval |
Support both v1alpha1.Run and v1beta1.CustomRun for 4 LTS releases after Beta release so that custom task end users and developers are able to fully test and migrate Custom Task from alpha to beta To achieve this, this commit introduces a new feature flag to control the version switch between alpha and beta when defining a custom task within a Pipeline.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jerop, vdemeester The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
API WG - ready to merge /lgtm |
This PR serves as a follow-up PR of #862 to reflect @lbernick's comment here #862 (comment)
We will support both v1alpha1.Run and v1beta1.CustomRun in the initial release until the design decision is made in TEP-0121.
cc @jerop, @lbernick, @abayer