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

Refactor TaskParam and PipelineParam. #1037

Merged
merged 1 commit into from
Jul 3, 2019

Conversation

EliZucker
Copy link
Member

Changes

Taken directly from commit message:

Make a new ParamSpec type and place it in its own file along with the
already existing Param type. ParamSpec replaces TaskParam and
PipelineParam.

TaskParam and PipelineParam are identical types, and with future
features including array/string parameters, consolidating
parameter-related code in param_types.go makes sense for better
code-reusability and logical structure.

Additionally, I think "ParamSpec" is a better name; TaskParam and
PipelineParam currently represent a name and description (with
potentially more information in the future such as whether the parameter
is an array or string), while the Param type represents the parameter
value itself. Previously, it was not as intuitive that Param contains
the actual parameter value, not TaskParam or PipelineParam.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide
for more details.

Release Notes

N/A

Make a new ParamSpec type and place it in its own file along with the
already existing Param type. ParamSpec replaces TaskParam and
PipelineParam.

TaskParam and PipelineParam are identical types, and with future
features including array/string parameters, consolidating
parameter-related code in param_types.go makes sense for better
code-reusability and logical structure.

Additionally, I think "ParamSpec" is a better name; TaskParam and
PipelineParam currently represent a name and description (with
potentially more information in the future such as whether the parameter
is an array or string), while the Param type represents the parameter
value itself. Previously, it was not as intuitive that Param contains
the actual parameter value, not TaskParam/PipelineParam.
@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Jul 2, 2019
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 2, 2019
@EliZucker
Copy link
Member Author

For context, I'm currently implementing a way for arrays to be accepted as parameters (#207), and I believe these changes will help improve code reusability for that feature.

Either way, though, I still think that this is a good organizational change; almost everyone I have interacted with while trying to implement the feature had trouble keeping track of the difference between Param and TaskParam and their different purposes (and the same could be said for Param/PipelineParam).

@EliZucker
Copy link
Member Author

/test pull-tekton-pipeline-integration-tests

1 similar comment
@bobcatfish
Copy link
Collaborator

/test pull-tekton-pipeline-integration-tests

@bobcatfish
Copy link
Collaborator

Thanks for the quick, well contained clean up @EliZucker !

If that test failure is a flake ( 🤞 ) then:

/lgtm
/meow space

@tekton-robot
Copy link
Collaborator

@bobcatfish: cat image

In response to this:

Thanks for the quick, well contained clean up @EliZucker !

If that test failure is a flake ( 🤞 ) then:

/lgtm
/meow space

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 2, 2019
@bobcatfish
Copy link
Collaborator

I0702 22:49:22.940] ERROR: tests timed out
I0702 22:49:22.940] >> Checking test results for taskrun
I0702 22:49:23.576] ERROR: test demo-pipeline-run-1-build-skaffold-app-fmxs7=SucceededUnknown but should be succeededtrue
I0702 22:49:23.577] ERROR: test demo-pipeline-run-1-deploy-web-q9w9w=SucceededFalse but should be succeededtrue

v interesting! 🤔 seems consistent anyway, looks like a real problem!

@vdemeester
Copy link
Member

/test pull-tekton-pipeline-integration-tests

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: EliZucker, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 3, 2019
@afrittoli
Copy link
Member

/retest

@tekton-robot tekton-robot merged commit 4e67a6a into tektoncd:master Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants