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

🐛 fix incorrect logr usage #193

Merged
merged 1 commit into from
Nov 28, 2018

Conversation

interma
Copy link
Contributor

@interma interma commented Nov 1, 2018

Fix: #187

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 1, 2018
@@ -86,8 +86,8 @@ func (ks *Kind) Start(handler handler.EventHandler, queue workqueue.RateLimiting
i, err := ks.cache.GetInformer(ks.Type)
if err != nil {
if kindMatchErr, ok := err.(*meta.NoKindMatchError); ok {
log.Error(err, "if %s is a CRD, should install it before calling Start",
kindMatchErr.GroupKind)
log.Error(err, fmt.Sprintf("if %s is a CRD, should install it before calling Start",

Choose a reason for hiding this comment

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

For better or for worse, this is specifically discouraged by logr. https://github.com/go-logr/logr/blob/9fb12b3b21c5415d16ac18dc5cd42c1cfdd40c4e/logr.go#L11

logr wants you to use structured logging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed, thanks.

Copy link
Contributor

@DirectXMan12 DirectXMan12 left a comment

Choose a reason for hiding this comment

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

nit around working, otherwise fine

@@ -86,8 +86,8 @@ func (ks *Kind) Start(handler handler.EventHandler, queue workqueue.RateLimiting
i, err := ks.cache.GetInformer(ks.Type)
if err != nil {
if kindMatchErr, ok := err.(*meta.NoKindMatchError); ok {
log.Error(err, "if %s is a CRD, should install it before calling Start",
kindMatchErr.GroupKind)
log.Error(err, "Kind should be installed before calling Start",
Copy link
Contributor

Choose a reason for hiding this comment

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

please add the working back in as "if kind is a CRD, it should be installed before calling start"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks.

@DirectXMan12
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 5, 2018
@interma
Copy link
Contributor Author

interma commented Nov 19, 2018

looks failed travis blocked this PR.
@DirectXMan12 anything else needs me to do?
Thanks.

@interma interma mentioned this pull request Nov 21, 2018
@interma
Copy link
Contributor Author

interma commented Nov 26, 2018

/assign @DirectXMan12

@DirectXMan12
Copy link
Contributor

@interma can you rebase on the latest master? there was a pr up to fix that flake

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 27, 2018
@interma
Copy link
Contributor Author

interma commented Nov 27, 2018

Sure, rebased.

@DirectXMan12
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 28, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DirectXMan12, interma

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

@DirectXMan12 DirectXMan12 changed the title fix incorrect logr usage 🐛 fix incorrect logr usage Nov 28, 2018
@k8s-ci-robot k8s-ci-robot merged commit 5675a53 into kubernetes-sigs:master Nov 28, 2018
justinsb pushed a commit to justinsb/controller-runtime that referenced this pull request Dec 7, 2018
DirectXMan12 pushed a commit that referenced this pull request Jan 31, 2020
Update GitBook docs with warning about core-type scaffold tests failing
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants