-
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
Rename ArrayOrString to ParamValues #5304
Rename ArrayOrString to ParamValues #5304
Conversation
Skipping CI for Draft Pull Request. |
/test all |
The following is the coverage report on the affected files.
|
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.
This is going to be a breaking change to downstream clients. Can we use a type alias (example) instead and deprecate the old ArrayOrString type before removing it?
Yes I added type alias just under this type: So other libraries shouldn't break. |
Gah! Totally missed it! 🤦 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.
Let's add a simple test to ensure we don't break existing ArrayOrString compatibility, but otherwise lgtm!
I just retitled the PR to start with |
Oh thank you! |
32b151b
to
2865db4
Compare
The following is the coverage report on the affected files.
|
/retest |
47f0124
to
d6b9248
Compare
4414b55
to
f5fc2de
Compare
The following is the coverage report on the affected files.
|
f5fc2de
to
156bc30
Compare
The following is the coverage report on the affected files.
|
e2028cc
to
cdd3c13
Compare
@@ -151,12 +151,12 @@ func resolveResultRef(pipelineState PipelineRunState, resultRef *v1beta1.ResultR | |||
} | |||
|
|||
var runName, runValue, taskRunName string | |||
var resultValue v1beta1.ArrayOrString | |||
var resultValue v1beta1.ParamValue |
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.
should this be a ResultValue? I think you may be able to cast the return value (not sure). As an aside when we update to go 1.18 we might be able to use generics for that function.
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.
Oh yes! This should be result value. I have went through the ParamValue
used in result files again and fix some other places as well
Now they can be used interchangeably due to the type alias.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lbernick 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 |
This commit fixes issue tektoncd#4858. With the implementation of Tep75, ArrayOrString contains object type and it would be confusing if still use the same name. This commit renames it to ParamValues and type alias ResultValues to ParamValues. Also use type alias to make sure dependant libraries can still use ArrayOrString and NewArrayOrString.
cdd3c13
to
cf39802
Compare
/lgtm |
/cc @tektoncd/cli-maintainers we will need to update our usage of |
please make sure to include this kind of notice in the release notes 🙏 |
Changes
This commit fixes issue #4858. With the implementation of Tep75,
ArrayOrString contains object type and it would be confusing if still
use the same name. This commit renames it to ParamValues and type alias
ResultValues to ParamValues. Also use type alias to make sure dependant
libraries can still use ArrayOrString and NewArrayOrString.
/kind cleanup
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