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

[8.17](backport #42435) Remove erroneous status reporting #42540

Open
wants to merge 2 commits into
base: 8.17
Choose a base branch
from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 31, 2025

Proposed commit message

This commit removes a erroneous status reporting from the Filestream input. inp.readFromSource can only return the error from the canceler, this error should not be reported to the manager/Elastic-Agent.

inp.readFromSource is called by filestream.Run, which is called by the startHarvester function. This function already reports the error returned by filestream.Run and correctly filters out 'context cancelled' errors.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

## Disruptive User Impact
## Author's Checklist

How to test this PR locally

That's a tricky PR to test because there is a timing issue involved, essentially using a local Kubernets cluster, deploy Elastic-Agent v8.17.1 collecting logs, make containers generate so many logs the host machine is going to have it's CPU at 100%, the Filestream input will start reporting unhealthy without the changes of this PR.

There are some more details of how I reproduced/tested it here: elastic/elastic-agent#6596 (comment)

Related issues

## Use cases
## Screenshots
## Logs


This is an automatic backport of pull request #42435 done by Mergify.

This commit removes a redundant status reporting from the Filestream
input. `inp.readFromSource` can only return the error from the
canceler, this error should not be reported to the
manager/Elastic-Agent.

`inp.readFromSource` is called by `filestream.Run`, which is called by
the `startHarvester` function. This function already reports the error
returned by `filestream.Run` and correctly filters out 'context
cancelled' errors.

(cherry picked from commit 1a0a732)
@mergify mergify bot added the backport label Jan 31, 2025
@mergify mergify bot requested a review from a team as a code owner January 31, 2025 16:18
@mergify mergify bot requested review from AndersonQ and VihasMakwana and removed request for a team January 31, 2025 16:18
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 31, 2025
@botelastic
Copy link

botelastic bot commented Jan 31, 2025

This pull request doesn't have a Team:<team> label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant