-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
TEP-0076 (array results and indexing into array) promoted to beta 🎓 #6103
Conversation
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
36d8c5c
to
def864e
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
def864e
to
a9f8f6e
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
a9f8f6e
to
9f7716c
Compare
The following is the coverage report on the affected files.
|
/assign @afrittoli @JeromeJu |
/assign |
@afrittoli @JeromeJu @Yongxuanzhang I appreciate if you can review the changes in this PR, my team is looking for this feature as part of 0.45. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Thanks! Sorry I thought we want to merge other issues fixes before this one. I think it's ok to get this merged in v0.45
I will update other PRs (like #6120) once we get this merged.
/hold |
Cc @abayer @afrittoli @jerop to remove the hold 😛 but yay 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pritidesai 🎉 - this looks mostly good to me, only a couple of minor things - it would be nice to have the docs updated, especially given the fact that we don't have v1/v1beta separate docs, so the docs should default to the latest API which is v1
docs/pipelines.md
Outdated
Both are alpha features and can be enabled by setting `enable-api-fields` to `alpha`. | ||
Object result is alpha feature and can be enabled by setting `enable-api-fields` to `alpha`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: shouldn't we say that "array results are a beta feature. They can be enabled in the v1
API by setting the enable-api-fields
to beta
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure, with v1beta1
API, for this feature to work, enable-api-fields
does not have to be alpha
anymore which means it can be set to either beta
or stable
.
@chitrangpatel how did you approach this when we promoted propagated params/workspaces features? 🤔 Or these features were not classified as beta
? will appreciate any guidance. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Propagated Params was moved straight to stable since stable and beta were same at the time.
Propagated workspaces is currently beta meaning that it will work if enable-api-fields
is alpha
or beta
but not stable
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, we should clarify that array results is an beta feature
@pritidesai it seems that in both v1 and v1beta1, we check that beta feature flag is enabled -- @lbernick we may need clarification in the TEP about whether the flag should be the same in both versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Propagated workspaces is currently beta meaning that it will work if enable-api-fields is alpha or beta but not stable.
Thanks @chitrangpatel for getting back. How did we document that propagated workspace is beta
feature? At the same time, I am checking docs. I just want to make sure its consistent across many different features.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/tektoncd/pipeline/pull/6030/files is all I had done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I just checked the PR #6030, there is no specific guidelines other than the replacing alpha
with beta
in the docs 🙃 I will update the docs here but it's really very confusing for folks using v1beta1
APIs.
docs/tasks.md
Outdated
@@ -833,7 +833,7 @@ or [at the `Pipeline` level](./pipelines.md#emitting-results-from-a-pipeline). | |||
#### Emitting Array `Results` | |||
|
|||
Tekton Task also supports defining a result of type `array` and `object` in addition to `string`. | |||
Emitting a task result of type `array` is an `alpha` feature implemented based on the | |||
Emitting a task result of type `array` is implemented based on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto: shouldn't me mention that arrays are a beta feature?
expectedResult: true, | ||
}, { | ||
name: "when enable-api-fields is set to stable", | ||
c: config.EnableStableAPIFields(ctx), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: stable is the default (and will always be), so this feels a bit redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup I completely agree, stable
is a default. its just added to be consistent with the
/approve
Good by me!
thanks @abayer 🙏
@vdemeester can we cancel the hold? I do not think there is anything pending here now. If there is a concern of array params in a matrix
and when
expressions, we had examples and doc updated for both features in PR #6092 and PR #6077. @Yongxuanzhang please confirm!
// EnableStableAPIFields enables stable features in an existing context (for use in testing) | ||
func EnableStableAPIFields(ctx context.Context) context.Context { | ||
return setEnableAPIFields(ctx, StableAPIFields) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this? As far as I can tell it's only used in the unit test for CheckAlphaOrBetaAPIFields
- and it doesn't look like it's really needed there either as stable is the default value.
// By default the result type is string | ||
if tr.Type != ResultsTypeString { | ||
// By default, the result type is string | ||
case tr.Type != ResultsTypeString: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto: same as above, I would prefer using default
here
Thank you @afrittoli, how can we resolve this? |
thanks @vdemeester 🙏 |
/approve Good by me! |
Pipelines 0.38 introduced two alpha features - producing array results and indexing into array param. This commit is promoting these two features to beta such that these features can be used by the task authors and pipeline authors by setting enable-api-fields to either beta or alpha. These features are still not availalbe in stable API i.e. these features will not work with enable-api-fields set to stable Signed-off-by: pritidesai <pdesai@us.ibm.com>
9f7716c
to
2aa5ac9
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
thank you @Yongxuanzhang @afrittoli @vdemeester @abayer @JeromeJu @jerop and @chitrangpatel 🙏 I have updated this PR to document that this feature is |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abayer, JeromeJu, jerop, vdemeester The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
/lgtm |
/hold cancel |
This commit includes two changes to the table with beta features: 1. Alpha Release: an additional column to keep history of when the feature was first available as alpha 2. TEP-0076: Array results was promoted to beta in PR - tektoncd#6103 Signed-off-by: pritidesai <pdesai@us.ibm.com>
This commit includes two changes to the table with beta features: 1. Alpha Release: an additional column to keep history of when the feature was first available as alpha 2. TEP-0076: Array results was promoted to beta in PR - #6103 Signed-off-by: pritidesai <pdesai@us.ibm.com>
Changes
Pipelines 0.38 introduced two alpha features - producing array results and indexing into array param (proposed in TEP-0076). This commit is promoting these two features to
beta
such that these features can be used by the task authors and pipeline authors in a cluster whenenable-api-fields
is either set tobeta
oralpha
.These features are still not available in stable API i.e. these features will not work when
enable-api-fields
set tostable
Before we can merge this PR, I have following three PRs to update the doc and examples. Please review the outstanding PRs first. These PRs are merged now.
Fixes part of #5688.
Signed-off-by: pritidesai pdesai@us.ibm.com
/kind feature
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes