-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Debounce input reload on autodiscover #35645
Debounce input reload on autodiscover #35645
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
6dc9b2c
to
10eac4f
Compare
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.
Change LGTM. Just left a couple of minor suggestions.
@ycombinator all changes you requested are on b82eda4. |
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.
/test |
b82eda4
to
a255240
Compare
Rebasing onto |
This PR is finally ready for a final review. The tests were failing because of a bug I introduced, it has been fixed on 1f38a4c and @ycombinator could you review it again? |
The Kubernetes autodiscover feature now incorporates a debounce logic when reloading inputs. By default, it waits for at least 1 second before invoking the Reload method. In case of an error, it introduces a 10-second delay before retrying. The channel used for test synchronisation has been removed and tests now use (assert/require).Eventually. When Autodiscover calls `cfgfile.NewRunnerList` to instantiate a RunnerList, it now specifies a different logger name, enabling more granular log filtering. Debug logs now provide information about the reasons for invoking Reload. Certain tests that perform sequential actions now utilise `require` instead of `assert` to maintain a consistent state avoid cascading failures. Tests that required updates now leverage `require.Eventually` instead of `wait`, providing additional information on failure causes. Documentation for `cfgfile.RunnerList` has been improved to enhance clarity.
This tests seems flaky on CI, increasing the timeout might help.
Test the case when handle(Start|Stop) is called multiple times and on at least on the last one they return false.
5bd1bd8
to
e67e829
Compare
Tests were failing due to CI issues (pip was failing). I re-based onto |
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.
The Kubernetes autodiscover feature now incorporates a debounce logic when reloading inputs. By default, it waits for at least 1 second before invoking the Reload method. In case of an error, it introduces a 10-second delay before retrying. The channel used for test synchronisation has been removed and tests now use (assert/require).Eventually. When Autodiscover calls `cfgfile.NewRunnerList` to instantiate a RunnerList, it now specifies a different logger name, enabling more granular log filtering. Debug logs now provide information about the reasons for invoking Reload. Certain tests that perform sequential actions now utilise `require` instead of `assert` to maintain a consistent state avoid cascading failures. Tests that required updates now leverage `require.Eventually` instead of `wait`, providing additional information on failure causes. Documentation for `cfgfile.RunnerList` has been improved to enhance clarity. (cherry picked from commit d270536)
The Kubernetes autodiscover feature now incorporates a debounce logic when reloading inputs. By default, it waits for at least 1 second before invoking the Reload method. In case of an error, it introduces a 10-second delay before retrying. The channel used for test synchronisation has been removed and tests now use (assert/require).Eventually. When Autodiscover calls `cfgfile.NewRunnerList` to instantiate a RunnerList, it now specifies a different logger name, enabling more granular log filtering. Debug logs now provide information about the reasons for invoking Reload. Certain tests that perform sequential actions now utilise `require` instead of `assert` to maintain a consistent state avoid cascading failures. Tests that required updates now leverage `require.Eventually` instead of `wait`, providing additional information on failure causes. Documentation for `cfgfile.RunnerList` has been improved to enhance clarity. (cherry picked from commit d270536) Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>
This also seems to relate to #34717, I'll edit the description of the PR adding this information. |
What does this PR do?
The Kubernetes autodiscover feature now incorporates a debounce logic when reloading inputs. By default, it waits for at least 1 second before invoking the Reload method. In case of an error, it introduces a 10-second delay before retrying.
The channel used for test synchronisation has been removed and tests now use (assert/require).Eventually.
When Autodiscover calls
cfgfile.NewRunnerList
to instantiate a RunnerList, it now specifies a different logger name, enabling more granular log filtering.Debug logs now provide information about the reasons for invoking Reload.
Certain tests that perform sequential actions now utilise
require
instead ofassert
to maintain a consistent state avoid cascading failures.Tests that required updates now leverage
require.Eventually
instead ofwait
, providing additional information on failure causes.Documentation for
cfgfile.RunnerList
has been improved to enhance clarity.Why is it important?
Fixes #34388
Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.## Author's ChecklistHow to test this PR locally
Start a Kubernetes cluster (I used Minikube with
none
driver on a VM)Deploy some pods to generate logs constantly
Start Filebeat with the following configuration
There should be no data loss or constant log messages like:
Related issues
## Use cases## Screenshots## Logs