-
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
Closes #3262: Modify unnecessarily exported methods to unexported #3289
Conversation
|
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 Once the patch is verified, the new status will be reflected by the 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. |
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.
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
pkg/contexts/contexts.go
Outdated
// 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 | ||
} |
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.
If those are not exported, this means they are not used. We could remove them entirely 😉
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.
Thank you for the review. I removed these functions, also removed emitEvent
emitErrorEvent
from pkg/reconciler/events/event.go which are unused.
/kind cleanup |
The following is the coverage report on the affected files.
|
d7f5fa5
to
e6a9bb9
Compare
The following is the coverage report on the affected files.
|
@@ -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 |
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.
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.
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 for this!
/lgtm
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
/cc @imjasonh
e6a9bb9
to
1bc032a
Compare
The following is the coverage report on the affected files.
|
Just rebased to the latest. Please let me know anything I can do to proceed this PR. |
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
Hi, I just make sure if I still need some changes. |
The PR needs to be rebased on |
The following is the coverage report on the affected files.
|
Thank you! |
@imjasonh , could you review this again? |
/lgtm Sorry for the delay, and thanks for doing this! |
/lgtm cancel |
(interesting.. it doesn't show anymore..) |
I'm dropping lgmt to unlock tide as this needs a rebase |
/lgtm cancel |
@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. @kobayashi can you rebase your PR against master ? |
c2e9e6d
to
8ce7312
Compare
Thank you, @vdemeester . |
The following is the coverage report on the affected files.
|
/retest |
/hold cancel |
Changes
This is for issue #3262.
Only
ConvertErrorf
is kept as it is in v1beta1 because the function is imported in v1alpha1.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.
Double check this list of stuff that's easy to miss:
cmd
dir, please updatethe release Task to build and release this image.
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