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

Log errors from v2 client errors channel #34392

Merged
merged 4 commits into from
Jan 26, 2023
Merged

Conversation

blakerouse
Copy link
Contributor

@blakerouse blakerouse commented Jan 25, 2023

What does this PR do?

Adds go-routine that reads errors from the Errors() channel and logs them.

Why is it important?

Without this its possible that the elastic-agent-client will block if errors are not pulled off the Errors() channel. Errors communicating with the Elastic Agent are also not reported.

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.

Related issues

@blakerouse blakerouse added Team:Elastic-Agent Label for the Agent team backport-v8.6.0 Automated backport with mergify labels Jan 25, 2023
@blakerouse blakerouse self-assigned this Jan 25, 2023
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jan 25, 2023
@blakerouse blakerouse marked this pull request as ready for review January 25, 2023 15:49
@blakerouse blakerouse requested a review from a team as a code owner January 25, 2023 15:49
@blakerouse blakerouse requested review from fearful-symmetry and faec and removed request for a team January 25, 2023 15:49
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jan 25, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-01-26T14:59:00.252+0000

  • Duration: 60 min 34 sec

Test stats 🧪

Test Results
Failed 0
Passed 7443
Skipped 343
Total 7786

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

CHANGELOG.next.asciidoc Outdated Show resolved Hide resolved
@mergify
Copy link
Contributor

mergify bot commented Jan 26, 2023

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 fix-34381 upstream/fix-34381
git merge upstream/main
git push upstream fix-34381

@blakerouse blakerouse merged commit 4c46e5d into elastic:main Jan 26, 2023
@blakerouse blakerouse deleted the fix-34381 branch January 26, 2023 16:01
mergify bot pushed a commit that referenced this pull request Jan 26, 2023
* Log errors from v2 client errors channel.

* Add changelog entry.

* Update changelog.

(cherry picked from commit 4c46e5d)
blakerouse added a commit that referenced this pull request Jan 26, 2023
* Log errors from v2 client errors channel.

* Add changelog entry.

* Update changelog.

(cherry picked from commit 4c46e5d)

Co-authored-by: Blake Rouse <[email protected]>
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
* Log errors from v2 client errors channel.

* Add changelog entry.

* Update changelog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.6.0 Automated backport with mergify Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Beat agent control protocol client does not drain the Errors channel
3 participants