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 init checks for valid label and field selectors #7198

Merged
merged 2 commits into from
Mar 18, 2020

Conversation

danielnelson
Copy link
Contributor

@danielnelson danielnelson commented Mar 18, 2020

Importing these libraries starts a goroutine at init time. The removal of the checks will push a startup time error to a runtime error.

goroutine 8 [chan receive]:
k8s.io/klog.(*loggingT).flushDaemon(0x454f3c0)
        /home/dbn/src/influx/pkg/mod/k8s.io/[email protected]/klog.go:1010 +0x8b
created by k8s.io/klog.init.0
        /home/dbn/src/influx/pkg/mod/k8s.io/[email protected]/klog.go:411 +0xd6

related #6969

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

Including these libraries starts a goroutine at init time.
@danielnelson danielnelson added the fix pr to fix corresponding bug label Mar 18, 2020
@danielnelson danielnelson added this to the 1.14.0 milestone Mar 18, 2020
@danielnelson
Copy link
Contributor Author

cc @mg03

@danielnelson danielnelson merged commit 9fbf288 into master Mar 18, 2020
@danielnelson danielnelson deleted the klog-goroutine branch March 18, 2020 20:48
@mg03
Copy link
Contributor

mg03 commented Mar 19, 2020

@danielnelson : thank you

qs: I'm assuming the goroutine launched by klog is not an acceptable. can you please help me understand why ?

@danielnelson
Copy link
Contributor Author

That's right, it appears that this goroutine is launched during package init so even if you are not using the prometheus input it is started. You can imagine that if every plugin did this it would be quite a mess. I haven't looked into why this goroutine is launched, if it were optional or if we could control when it starts and stops we could add these checks back.

@mg03
Copy link
Contributor

mg03 commented Mar 19, 2020

@danielnelson : I agree and have reached out to the creator of the packages on GitHub and asked them the qs of either not importing the dependency or control the start/stop of the goroutine. In the meantime, runtime failure should be acceptable since the code snippets were testing input format and should not have any detrimental effect on usability of the PR I submitted initially.

denzilribeiro pushed a commit to denzilribeiro/telegraf that referenced this pull request Mar 27, 2020
Importing k8s.io/klog starts a long running goroutine at init time.
athoune pushed a commit to bearstech/telegraf that referenced this pull request Apr 17, 2020
Importing k8s.io/klog starts a long running goroutine at init time.
veorlo pushed a commit to GlobalNOC/telegraf that referenced this pull request May 4, 2020
Importing k8s.io/klog starts a long running goroutine at init time.
HarshitOnGitHub pushed a commit to HarshitOnGitHub/telegraf that referenced this pull request May 8, 2020
Importing k8s.io/klog starts a long running goroutine at init time.
idohalevi pushed a commit to idohalevi/telegraf that referenced this pull request Sep 29, 2020
Importing k8s.io/klog starts a long running goroutine at init time.
arstercz pushed a commit to arstercz/telegraf that referenced this pull request Mar 5, 2023
Importing k8s.io/klog starts a long running goroutine at init time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants