-
Notifications
You must be signed in to change notification settings - Fork 478
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
add tracking and comparison of latest healthy content before loading a module #5054
Conversation
…a module Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com>
Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com>
component/module/module.go
Outdated
func (c *ModuleComponent) LoadFlowContent(args map[string]any, contentValue string) error { | ||
if contentValue == c.getLatestContent() { |
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.
Do we need to check args also?
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.
Thinking of if an argument with a default was not specified and then the argument was added and the content is the same.
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.
This sounds right to me, LoadFlowContent should be a no-op if both the content or the args change. If either of them changed, then it should go through.
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.
@mattdurham, take a peek at what I did in the latest. I'm a little uncomfortable with the arguments being a map[string]any
for correct comparison in all cases. do you think we need to do something more significant in how arguments are handled or do you think this covers it for now?
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.
That should work, since DeepEqual errs on the side of return false.
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 % Matt's comment that needs to be resolved.
Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com>
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
…a module (#5054) * add tracking and comparison of latest healthy content before loading a module * add tracking and check for arguments in module loaders Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> --------- Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> (cherry picked from commit 597bb6b)
* add tracking and comparison of latest healthy content before loading a module (#5054) * add tracking and comparison of latest healthy content before loading a module * add tracking and check for arguments in module loaders Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> --------- Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> (cherry picked from commit 597bb6b) * add changelog version header Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> * fix(http): allow override default user-agent header for http.remote (#5059) (cherry picked from commit 1eb5817) * fix(agentctl): prevent panic when validating integration-included cfg file (#5070) * fix(agentctl): prevent panic when validating integration-included cfg file Also add unit tests to prevent regression * doc(changelog): add new BUGFIXES entry (cherry picked from commit acc06f6) * loki.process: fix deadlock in case of frequent updates (#5065) Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com> (cherry picked from commit 501cf69) Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> * loki.process: make deadlock test condition less sensitive (#5096) Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com> (cherry picked from commit 7b15144) * integrations/eventhandler: remove double-logging of events (#5100) This removes the info-level log line indicating that an event is logged. When agent logs are being collected, this makes the event appear as if it was double-collected, as the event appears both in the logs sent directly to Loki and in the agent logs. (cherry picked from commit 276355e) Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> * Operator: update default reloader version * misc: use github.com/grafana/river (#4949) (cherry picked from commit 9a12485) Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> * add more complete river identifier validation and sanitization (#4998) * use river functions to validate and sanitize river identifiers Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> --------- Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> (cherry picked from commit ce3fe1c) Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> * Converter fix identifiers (#5102) * catch some places missing river label sanitization Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> --------- Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> (cherry picked from commit 6991ff2) Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> * refactor promtail converter sd configs so they reuse prometheus conve… (#5069) * refactor promtail converter sd configs so they reuse prometheus converter functionality Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> * cleanup words Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> * unexport a bunch of stuff that isn't needed outside the prometheusconvert package Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> * don't do SD targets in backwards order during converter Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> * get rid of static SD boilerplate --------- Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> Co-authored-by: Piotr Gwizdala <17101802+thampiotr@users.noreply.github.com> (cherry picked from commit 89b334e) * update test for older go version ordering Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> * Add a couple more unsupported fields to the prometheus converter Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> --------- Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com> Co-authored-by: Đỗ Trọng Hải <41283691+hainenber@users.noreply.github.com> Co-authored-by: Paschalis Tsilias <tpaschalis@users.noreply.github.com> Co-authored-by: Robert Fratto <robertfratto@gmail.com> Co-authored-by: Craig Peterson <192540+captncraig@users.noreply.github.com>
PR Description
Which issue(s) this PR fixes
Fixes #5028
Notes to the Reviewer
PR Checklist