Skip to content

fix(inspect): Handle components with slashes in their name#10442

Merged
orestisfl merged 5 commits intoelastic:mainfrom
orestisfl:fix/10417-inspect-slash
Oct 9, 2025
Merged

fix(inspect): Handle components with slashes in their name#10442
orestisfl merged 5 commits intoelastic:mainfrom
orestisfl:fix/10417-inspect-slash

Conversation

@orestisfl
Copy link
Contributor

@orestisfl orestisfl commented Oct 9, 2025

What does this PR do?

The 'inspect components' command would previously fail to find a component with IDs like system/metrics-default.

Why is it important?

Confusing CLI use

Checklist

  • I have read and understood the pull request guidelines of this project.
  • 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

How to test this PR locally

sudo elastic-development-agent inspect components beat/metrics-monitoring

Related issues

The 'inspect components' command would previously fail to find a component with IDs like `system/metrics-default`.

This commit also includes minor developer tooling improvements:
- Improves the checksum mismatch error message for better diagnostics.
- Fix spurious "error closing" logs when double-closing files explicitely and with `defer`
@orestisfl orestisfl self-assigned this Oct 9, 2025
@orestisfl orestisfl requested a review from a team as a code owner October 9, 2025 07:34
@orestisfl orestisfl requested review from blakerouse and pchila October 9, 2025 07:34
@orestisfl orestisfl added the bug Something isn't working label Oct 9, 2025
@mergify
Copy link
Contributor

mergify bot commented Oct 9, 2025

This pull request does not have a backport label. Could you fix it @orestisfl? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label that automatically backports to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.
@rdner rdner added the backport-active-all Automated backport with mergify to all the active branches label Oct 9, 2025
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @orestisfl

@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Oct 9, 2025
Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@elasticmachine
Copy link
Contributor

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

@orestisfl orestisfl merged commit c95a258 into elastic:main Oct 9, 2025
23 checks passed
@orestisfl orestisfl deleted the fix/10417-inspect-slash branch October 9, 2025 15:31
@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

@Mergifyio backport 8.18 8.19 9.0 9.1 9.2

@mergify
Copy link
Contributor

mergify bot commented Oct 9, 2025

mergify bot pushed a commit that referenced this pull request Oct 9, 2025
The 'inspect components' command would previously fail to find a component with IDs like `system/metrics-default`.

(cherry picked from commit c95a258)
mergify bot pushed a commit that referenced this pull request Oct 9, 2025
The 'inspect components' command would previously fail to find a component with IDs like `system/metrics-default`.

(cherry picked from commit c95a258)
mergify bot pushed a commit that referenced this pull request Oct 9, 2025
The 'inspect components' command would previously fail to find a component with IDs like `system/metrics-default`.

(cherry picked from commit c95a258)
mergify bot pushed a commit that referenced this pull request Oct 9, 2025
The 'inspect components' command would previously fail to find a component with IDs like `system/metrics-default`.

(cherry picked from commit c95a258)
mergify bot pushed a commit that referenced this pull request Oct 9, 2025
The 'inspect components' command would previously fail to find a component with IDs like `system/metrics-default`.

(cherry picked from commit c95a258)
orestisfl added a commit that referenced this pull request Oct 10, 2025
…10459)

The 'inspect components' command would previously fail to find a component with IDs like `system/metrics-default`.

(cherry picked from commit c95a258)

Co-authored-by: Orestis Floros <orestis.floros@elastic.co>
orestisfl added a commit that referenced this pull request Oct 10, 2025
…10460)

The 'inspect components' command would previously fail to find a component with IDs like `system/metrics-default`.

(cherry picked from commit c95a258)

Co-authored-by: Orestis Floros <orestis.floros@elastic.co>
orestisfl added a commit that referenced this pull request Oct 10, 2025
…10456)

The 'inspect components' command would previously fail to find a component with IDs like `system/metrics-default`.

(cherry picked from commit c95a258)

Co-authored-by: Orestis Floros <orestis.floros@elastic.co>
swiatekm pushed a commit that referenced this pull request Oct 10, 2025
The 'inspect components' command would previously fail to find a component with IDs like `system/metrics-default`.
orestisfl added a commit that referenced this pull request Oct 10, 2025
…10458)

The 'inspect components' command would previously fail to find a component with IDs like `system/metrics-default`.

(cherry picked from commit c95a258)

Co-authored-by: Orestis Floros <orestis.floros@elastic.co>
orestisfl added a commit that referenced this pull request Oct 10, 2025
…10457)

The 'inspect components' command would previously fail to find a component with IDs like `system/metrics-default`.

(cherry picked from commit c95a258)

Co-authored-by: Orestis Floros <orestis.floros@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-all Automated backport with mergify to all the active branches bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

5 participants