Skip to content

[8.19](backport #45733) Fix error handling from BeatV2Manager reload#45758

Closed
mergify[bot] wants to merge 1 commit into8.19from
mergify/bp/8.19/pr-45733
Closed

[8.19](backport #45733) Fix error handling from BeatV2Manager reload#45758
mergify[bot] wants to merge 1 commit into8.19from
mergify/bp/8.19/pr-45733

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Aug 6, 2025

Proposed commit message

BeatV2Manager `reload` method calls `reloadInputs`, however it did not
handle the errors returned correctly. This commit fixes it by making
`reloadInputs`, whenever possible, use a cfgfile.UnitError to indicate
the failed unit and `reload` now handles any unexpected error case/type.

Multiple lint warnings are fixed, including:
 - An unused wait group is removed
 - The parameters order in a `errors.Is` call is fixed

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

Related issues

## Use cases
## Screenshots
## Logs


This is an automatic backport of pull request #45733 done by [Mergify](https://mergify.com).
BeatV2Manager `reload` method calls `reloadInputs`, however it did not
handle the errors returned correctly. This commit fixes it by making
`reloadInputs`, whenever possible, use a cfgfile.UnitError to indicate
the failed unit and handling any unexpected error case/type.

(cherry picked from commit d8b1f1a)

# Conflicts:
#	x-pack/libbeat/management/managerV2.go
@mergify mergify bot requested a review from a team as a code owner August 6, 2025 12:00
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Aug 6, 2025
@mergify mergify bot requested review from belimawr and rdner and removed request for a team August 6, 2025 12:00
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Aug 6, 2025
@mergify
Copy link
Contributor Author

mergify bot commented Aug 6, 2025

Cherry-pick of d8b1f1a has failed:

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

You are currently cherry-picking commit d8b1f1afd.
  (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:   CHANGELOG.next.asciidoc
	modified:   x-pack/filebeat/tests/integration/managerV2_test.go
	modified:   x-pack/libbeat/management/simple_input_config_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   x-pack/libbeat/management/managerV2.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

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 6, 2025
@github-actions github-actions bot added Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team bugfix labels Aug 6, 2025
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 6, 2025
@elasticmachine
Copy link
Contributor

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

@mergify
Copy link
Contributor Author

mergify bot commented Aug 8, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b mergify/bp/8.19/pr-45733 upstream/mergify/bp/8.19/pr-45733
git merge upstream/8.19
git push upstream mergify/bp/8.19/pr-45733
@belimawr
Copy link
Contributor

belimawr commented Aug 8, 2025

Closing this backport as the code has diverged too much from the original PR.

@belimawr belimawr closed this Aug 8, 2025
@mergify mergify bot deleted the mergify/bp/8.19/pr-45733 branch August 8, 2025 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

2 participants