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

Closes #3262: Modify unnecessarily exported methods to unexported #3289

Merged
merged 3 commits into from
Mar 1, 2021

Conversation

kobayashi
Copy link
Contributor

@kobayashi kobayashi commented Sep 28, 2020

Changes

This is for issue #3262.

Only ConvertErrorf is kept as it is in v1beta1 because the function is imported in v1alpha1.

$ grep -r ConvertErrorf *pkg/apis/pipeline/v1alpha1/conversion_error.go:39:var convertErrorf = v1beta1.ConvertErrorf
pkg/apis/pipeline/v1beta1/conversion_error.go:45:// ConvertErrorf creates a CannotConvertError from the field name and format string.
pkg/apis/pipeline/v1beta1/conversion_error.go:46:func ConvertErrorf(field, msg string, args ...interface{}) error {
$

Submitter Checklist

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

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

Release Notes

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Sep 28, 2020
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 28, 2020

CLA Check
The committers are authorized under a signed CLA.

@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 28, 2020
@tekton-robot
Copy link
Collaborator

Hi @kobayashi. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 28, 2020
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.

Overall seems ok. I am a bit worried on pkg/git being used elsewhere (as a package) but it should be fine.

/ok-to-test

Comment on lines 25 to 36
// withDefaultConfigurationName notes on the context for nested validation
// that there is a default configuration name, which affects how an empty
// configurationName is validated.
func WithDefaultConfigurationName(ctx context.Context) context.Context {
func withDefaultConfigurationName(ctx context.Context) context.Context {
return context.WithValue(ctx, hdcnKey{}, struct{}{})
}

// HasDefaultConfigurationName checks to see whether the given context has
// hasDefaultConfigurationName checks to see whether the given context has
// been marked as having a default configurationName.
func HasDefaultConfigurationName(ctx context.Context) bool {
func hasDefaultConfigurationName(ctx context.Context) bool {
return ctx.Value(hdcnKey{}) != nil
}
Copy link
Member

Choose a reason for hiding this comment

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

If those are not exported, this means they are not used. We could remove them entirely 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the review. I removed these functions, also removed emitEvent emitErrorEvent from pkg/reconciler/events/event.go which are unused.

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 28, 2020
@vdemeester
Copy link
Member

/kind cleanup

@tekton-robot tekton-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Sep 28, 2020
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/events/event.go 86.4% 95.0% 8.6

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/events/event.go 86.4% 95.0% 8.6

@@ -102,22 +102,3 @@ func EmitError(c record.EventRecorder, err error, object runtime.Object) {
c.Event(object, corev1.EventTypeWarning, EventReasonError, err.Error())
}
}

// EmitEvent emits an event for object if afterCondition is different from beforeCondition
Copy link
Member

Choose a reason for hiding this comment

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

These were added because of backward compatibility, but since we're cleaning up all unnecessarily exported methods, I'd say it makes sense to remove them.

Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

Thanks for this!
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 1, 2020
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
/cc @imjasonh

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 3, 2020
@tekton-robot tekton-robot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 8, 2020
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/events/event.go 87.0% 95.2% 8.3

@kobayashi
Copy link
Contributor Author

Just rebased to the latest. Please let me know anything I can do to proceed this PR.

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

@kobayashi
Copy link
Contributor Author

Hi, I just make sure if I still need some changes.

@imjasonh
Copy link
Member

imjasonh commented Feb 2, 2021

Hi, I just make sure if I still need some changes.

The PR needs to be rebased on master, but other than that the change still lgtm, so we should be able to get it merged after you rebase.

@tekton-robot tekton-robot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Feb 18, 2021
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/events/event.go 87.0% 95.2% 8.3

@kobayashi
Copy link
Contributor Author

Thank you!
Just rebased my PR repo.

@kobayashi
Copy link
Contributor Author

@imjasonh , could you review this again?

@imjasonh
Copy link
Member

/lgtm

Sorry for the delay, and thanks for doing this!

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 23, 2021
@vdemeester
Copy link
Member

/lgtm cancel
Needs a rebase, cancelling the lgtm to unblock the merge queue 🙏🏼

@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 24, 2021
@vdemeester
Copy link
Member

(interesting.. it doesn't show anymore..)
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 24, 2021
@afrittoli
Copy link
Member

I'm dropping lgmt to unlock tide as this needs a rebase

@afrittoli
Copy link
Member

/lgtm cancel

@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 24, 2021
@vdemeester
Copy link
Member

@afrittoli interesting.. when in the merge loop (all checks ok), it shows the rebase message from github, when not, it doesn't show it anymore.. 😓 Putting a hold for now while we wait for a rebase.
/hold

@kobayashi can you rebase your PR against master ?

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 25, 2021
@kobayashi
Copy link
Contributor Author

Thank you, @vdemeester .
Rebased it again to master.

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/events/event.go 87.0% 95.2% 8.3

@kobayashi
Copy link
Contributor Author

/retest

@vdemeester
Copy link
Member

/hold cancel
/lgtm

@tekton-robot tekton-robot added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Mar 1, 2021
@tekton-robot tekton-robot merged commit 10865b8 into tektoncd:master Mar 1, 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

None yet

5 participants