Skip to content

[8.19](backport #51940) Set shutdown timeout for beat receivers to 5s by default#51949

Open
mergify[bot] wants to merge 1 commit into
8.19from
mergify/bp/8.19/pr-51940
Open

[8.19](backport #51940) Set shutdown timeout for beat receivers to 5s by default#51949
mergify[bot] wants to merge 1 commit into
8.19from
mergify/bp/8.19/pr-51940

Conversation

@mergify

@mergify mergify Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Proposed commit message

Set shutdown timeout for beat receivers to 5s by default.

Beat receivers need a longer timeout than the default 1s, as it needs to exceed the batcher flush timeout. The current code gives the impression of this already happening, but in reality, if the beater handles pipeline shutdown on its own, the default timeout wins.

The PR adds the default in NewBeatForReceiver and adds a test for filebeat receiver which asserts that the timeout is at least 5 seconds.

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. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.
  • [ ] I have added an entry in ./changelog/fragments using the changelog tool.

Related issues


This is an automatic backport of pull request #51940 done by [Mergify](https://mergify.com).

Beat receivers need a longer timeout than the default 1s, as it needs to
exceed the batcher flush timeout. The current code gives the impression
of this already happening, but in reality, if the beater handles
pipeline shutdown on its own, the default timeout wins.

(cherry picked from commit 8f4bbab)

# Conflicts:
#	x-pack/filebeat/fbreceiver/receiver_test.go
@mergify mergify Bot requested a review from a team as a code owner July 14, 2026 22:27
@mergify mergify Bot added backport conflicts There is a conflict in the backported pull request labels Jul 14, 2026
@mergify mergify Bot requested review from leehinman and orestisfl and removed request for a team July 14, 2026 22:27
@mergify mergify Bot added the conflicts There is a conflict in the backported pull request label Jul 14, 2026
@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 14, 2026
@mergify

mergify Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Cherry-pick of 8f4bbab has failed:

On branch mergify/bp/8.19/pr-51940
Your branch is up to date with 'origin/8.19'.

You are currently cherry-picking commit 8f4bbab77.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   x-pack/libbeat/cmd/instance/beat.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   x-pack/filebeat/fbreceiver/receiver_test.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@github-actions

Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)
  • /test : Run the Buildkite pipeline.

@github-actions github-actions Bot added bug Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team skip-changelog labels Jul 14, 2026
@botelastic botelastic Bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 14, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@github-actions

Copy link
Copy Markdown
Contributor

TL;DR

Both failed Buildkite jobs are reporting the same deterministic pre-commit failure: x-pack/filebeat/fbreceiver/receiver_test.go still contains unresolved cherry-pick conflict markers. This is a backport conflict, not an infrastructure or test-runtime failure.

Remediation

  • Resolve the conflict in x-pack/filebeat/fbreceiver/receiver_test.go, preserving the 8.19 branch changes and the backported receiver tests as appropriate; remove all <<<<<<<, =======, and >>>>>>> markers.
  • Re-run pre-commit run --all-files (or the two affected Buildkite pipelines) after committing the resolved file.
Investigation details

Root Cause

The PR is an automatic backport of #51940 and is marked with a conflicts label. The PR diff contains conflict markers in x-pack/filebeat/fbreceiver/receiver_test.go: import conflicts at lines 21-25, a conflict block beginning at lines 503-504, and its closing marker at line 789.

Evidence

Verification

Not run locally because this workflow is read-only and the failure is directly identified by the pre-commit output.

Follow-up

After resolving the conflict, regenerate/update the PR branch so the backport is no longer blocked before retrying CI.


What is this? | From workflow: PR Buildkite Detective

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport bug conflicts There is a conflict in the backported pull request skip-changelog Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant