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

Stop elastic-agent inspect from printing output twice #5692

Merged
merged 3 commits into from
Oct 4, 2024

Conversation

michel-laterman
Copy link
Contributor

@michel-laterman michel-laterman commented Oct 3, 2024

What does this PR do?

Stop the elastic-agent inspect command from printing the output config twice.
Looks like this was introduced in #4074 when wrapping the returned error.

Why is it important?

output cannot be parsed into a generic yaml struct due to key collisions.

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/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

N/A

How to test this PR locally

Run elastic-agent inspect output will only appear once.

Related issues

Closes #4471

@michel-laterman michel-laterman added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team backport-8.15 Automated backport to the 8.15 branch with mergify backport-8.x Automated backport to the 8.x branch with mergify labels Oct 3, 2024
@michel-laterman michel-laterman requested a review from a team as a code owner October 3, 2024 22:32
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@ycombinator
Copy link
Contributor

Thanks for fixing this @michel-laterman! I believe it closes #4471.

@ycombinator ycombinator requested review from swiatekm and removed request for blakerouse October 3, 2024 22:41
Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
@michel-laterman michel-laterman enabled auto-merge (squash) October 3, 2024 23:01
@michel-laterman michel-laterman merged commit c6ba6b2 into elastic:main Oct 4, 2024
14 checks passed
mergify bot pushed a commit that referenced this pull request Oct 4, 2024
* Stop elastic-agent inspect from printing output twice

Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>

---------

Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
(cherry picked from commit c6ba6b2)
mergify bot pushed a commit that referenced this pull request Oct 4, 2024
* Stop elastic-agent inspect from printing output twice

Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>

---------

Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
(cherry picked from commit c6ba6b2)
pierrehilbert pushed a commit that referenced this pull request Oct 4, 2024
* Stop elastic-agent inspect from printing output twice

Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>

---------

Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
(cherry picked from commit c6ba6b2)

Co-authored-by: Michel Laterman <82832767+michel-laterman@users.noreply.github.com>
pierrehilbert pushed a commit that referenced this pull request Oct 4, 2024
* Stop elastic-agent inspect from printing output twice

Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>

---------

Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
(cherry picked from commit c6ba6b2)

Co-authored-by: Michel Laterman <82832767+michel-laterman@users.noreply.github.com>
@michel-laterman michel-laterman deleted the fix-inspect branch October 4, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify backport-8.15 Automated backport to the 8.15 branch with mergify bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inspect command prints output twice
3 participants