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

Remove last lingering unnecessarily exported functions #4296

Merged

Conversation

abayer
Copy link
Contributor

@abayer abayer commented Oct 11, 2021

Changes

fixes #3262

There are a few things left, either by design or uncertainty:

  • pkg/apis/pipeline/v1beta1/conversion_error.go's ConvertErrorf - I'm not entirely clear on whether this should be around or not. CannotConvertError is still used in tests in pkg/apis/pipeline/v1alpha1, and the whole thing is just messy enough that I'm not sure what to do.
  • pkg/apis/pipeline/v1beta1/version_validation.go's ValidateEnabledAPIFields - it's referenced in docs/developers/README.md and I can't tell if that's something that could be intended to eb used in something depending on Tekton, not just in Tekton itself.
  • pkg/pipelinerunmetrics/injection.go and pkg/taskrunmetrics/injection.go's WithInformer - these are both used as function references in their respective .../fake/fake.gos.

/kind cleanup

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs included if any changes are user facing
  • Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been filled in or deleted (only if no user facing changes)

Release Notes

NONE

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Oct 11, 2021
@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 11, 2021
@abayer
Copy link
Contributor Author

abayer commented Oct 11, 2021

/assign @imjasonh @vdemeester

@abayer
Copy link
Contributor Author

abayer commented Oct 11, 2021

/retest

fixes tektoncd#3262

There are a few things left, either by design or uncertainty:
* `pkg/apis/pipeline/v1beta1/conversion_error.go`'s `ConvertErrorf` - I'm not entirely clear on whether this should be around or not. `CannotConvertError` is still used in tests in `pkg/apis/pipeline/v1alpha1`, and the whole thing is just messy enough that I'm not sure what to do.
* `pkg/apis/pipeline/v1beta1/version_validation.go`'s `ValidateEnabledAPIFields` - it's referenced in `docs/developers/README.md` and I can't tell if that's something that could be intended to eb used in something depending on Tekton, not just in Tekton itself.
* `pkg/pipelinerunmetrics/injection.go` and `pkg/taskrunmetrics/injection.go`'s `WithInformer` - these are both used as function references in their respective `.../fake/fake.go`s.

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
@abayer abayer force-pushed the cleanup-unnecessary-exported-functions branch from 58b7fef to 40774e3 Compare October 11, 2021 15:19
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 11, 2021
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 Oct 11, 2021
@pritidesai
Copy link
Member

/lgtm

thanks @abayer

pkg/apis/pipeline/v1beta1/conversion_error.go's ConvertErrorf - I'm not entirely clear on whether this should be around or not. CannotConvertError is still used in tests in pkg/apis/pipeline/v1alpha1, and the whole thing is just messy enough that I'm not sure what to do.

#4281 is removing all the references of the CannotConvertError.

pkg/apis/pipeline/v1beta1/version_validation.go's ValidateEnabledAPIFields - it's referenced in docs/developers/README.md and I can't tell if that's something that could be intended to eb used in something depending on Tekton, not just in Tekton itself.

ValidateEnabledAPIFields is a function which is used internally to check if the enable-api-fields is set to the appropriate version and I think the idea here is to keep this for the pipeline controller and also for the dependencies too.

Screen Shot 2021-10-11 at 2 59 12 PM

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 11, 2021
@tekton-robot tekton-robot merged commit 70a7b8d into tektoncd:main Oct 11, 2021
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup: multiple unnecessarily exported methods
5 participants