-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
chore(deps): Bump prometheus from v1.8.2 to v2.42.0 #13225
Conversation
c2f2853
to
36f73d7
Compare
- update types in kube_inventory input plugin tests - update kubernetes input plugin to add error handler for AddEventHandler call
36f73d7
to
bca8d60
Compare
p.watchPod(ctx, client) | ||
err = p.watchPod(ctx, client) | ||
if err != nil { | ||
p.Log.Errorf("Unable to monitor pod: %s", err.Error()) |
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.
I saw this in the other PR and it made me pause. We are ignoring these errors right now, is this going to cause instances where things are working today to stop working?
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.
Yeah, that's fair. I wouldn't have touched this except for the linter requesting some kind of error handling, now that the underlying API returns an error
.
I'll update the PR to log the error and continue, so that the behavior should be the same as what currently happens, with the addition of a warning message in the logs.
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.
Ok:
- switched to
p.Log.Warnf
, thinking that this is a non-fatal warning. - no longer calling
<-ctx.Done()
early ifAddEventHandler
returns an error. Keeping the control flow the same as it was, with the addition of capturing the error and returning it fromwatchPod
Co-authored-by: Joshua Powers <powersj@fastmail.com>
- update types in kube_inventory input plugin tests - update kubernetes input plugin to add error handler for AddEventHandler call
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
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.
Looks good to me. Thanks @LukeWinikates for the PR and for fixing the remaining issues!
Dependency version 0.42.0 corresponds to release version 2.42.0 see [prometheus versioning description](https://github.com/prometheus/prometheus#prometheus-code-base) for details. (cherry picked from commit e9f55a8)
@LukeWinikates A naive question as I do not know go lang: I see the Prometheus releases are tagged both with v0.42.0 and v2.42.0 at the same time. I am not sure why it is versioned like this but is it possible to upgrade the versions into v2.4+ as the commit message itself specify here https://github.com/LukeWinikates/telegraf/blob/7d3b725f62c27bbbf6566d081ba08f0b5d73d56f/go.mod#L147 I noticed that this is confusing some CVE image scans for some tools such as this |
@msenskp there's more context on the prometheus versions in #13159 and at https://github.com/prometheus/prometheus#prometheus-code-base As I understand it, The longer term solution is probably this: #13165 . |
@LukeWinikates thank you for the insight. Also glad to hear that there is a long term solution plan with a smaller footprint on the dependencies. |
This PR updates the
prometheus
package tov0.42
, currently the second-newest version.Bumping
prometheus
allows us to also bump a few kubernetes-related packages, and this PR also includes code changes required for compatibility with those versions.This PR is adapted from: #13159
That PR tries to update to
v0.43
, butv0.43
causes build errors that can't currently be resolved.