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

CLUSTER-API-205: Initialize the 'flag' library to remove error message from glog #206

Merged

Conversation

spew
Copy link
Contributor

@spew spew commented May 23, 2018

What this PR does / why we need it:
Prior to this change, every line of logging had the following error message prefixing the actual log:

ERROR: logging before flag.Parse

This is because glog has a hard dependency on the flag package. This 'hack' serves to make glog happy.

Which issue(s) this PR fixes:
Fixes # #205

Special notes for your reviewer:
Tested by running a developer gce-machine-controller image. Below is the before & after for this change.

Before:

ERROR: logging before flag.Parse: I0523 21:53:41.081142       1 queue.go:38] Start Machine Queue
ERROR: logging before flag.Parse: I0523 21:53:41.081442       1 queue.go:38] Start NodeWatcher Queue
ERROR: logging before flag.Parse: E0523 21:53:41.386480       1 reflector.go:205] sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/zz_generated.api.register.go:56: Failed to list *v1alpha1.MachineDeployment: the server could not find the requested resource (get machinedeployments.cluster.k8s.io)
E

After:

I0523 21:56:26.012299       1 queue.go:38] Start Machine Queue
I0523 21:56:26.017385       1 queue.go:38] Start NodeWatcher Queue
E0523 21:56:26.388359       1 reflector.go:205] sigs.k8s.io/cluster-api/pkg/controller/sharedinformers/zz_generated.api.register.go:55: Failed to list *v1alpha1.Machine: the server could not find the requested resource (get machines.cluster.k8s.io)
E

Release note:

NONE

@kubernetes/kube-deploy-reviewers

…e from glog

Prior to this change, every line of logging had the following error message prefixing the actual log:

  ERROR: logging before flag.Parse

This is because glog has a hard dependency on the flag package. This 'hack' serves to make glog happy.
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 23, 2018
@k8s-ci-robot
Copy link
Contributor

Hi @spew. Thanks for your PR.

I'm waiting for a kubernetes or kubernetes-sigs 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.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 23, 2018
@spew
Copy link
Contributor Author

spew commented May 23, 2018

/assign @jessicaochen @mkjelland @kcoronado

@spew
Copy link
Contributor Author

spew commented May 23, 2018

/assign @justinsb

@spew
Copy link
Contributor Author

spew commented May 24, 2018

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 24, 2018
@mkjelland
Copy link
Contributor

/lgtm

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

spew commented May 25, 2018

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: spew

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 25, 2018
@k8s-ci-robot k8s-ci-robot merged commit 8168f74 into kubernetes-sigs:master May 25, 2018
chuckha pushed a commit to chuckha/cluster-api that referenced this pull request Oct 2, 2019
chuckha pushed a commit to chuckha/cluster-api that referenced this pull request Oct 2, 2019
jayunit100 pushed a commit to jayunit100/cluster-api that referenced this pull request Jan 31, 2020
…ernetes-sigs#206)

With kustomize PR 700 merged, in order to avoid attacking, all
resources are needed to saved in its sub-folder. So we use the
field bases to specify all crds. And in current kustomize code,
the commands in secretGenerator is removed, so we use files for
replacement.
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.

7 participants