Skip to content

Conversation

@pchila
Copy link
Member

@pchila pchila commented Nov 18, 2025

What does this PR do?

This PR fixes the relative path calculation for agent versioned homes to preserve introduced with #9643.
Removes ambiguity in what a path to a versioned home to preserve should look like: it should always be data/elastic-agent-<variable unique version part here>.

Adds a few checks and resolves the relative path when calling rollback from command line.

Why is it important?

To preserve elastic-agent versioned home directories correctly during cleanup.

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

Disruptive User Impact

How to test this PR locally

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

@pchila pchila self-assigned this Nov 18, 2025
@mergify
Copy link
Contributor

mergify bot commented Nov 18, 2025

This pull request does not have a backport label. Could you fix it @pchila? 🙏
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.

@mergify
Copy link
Contributor

mergify bot commented Nov 19, 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 fix-cleanup-manual-rollback upstream/fix-cleanup-manual-rollback
git merge upstream/main
git push upstream fix-cleanup-manual-rollback

@pchila pchila force-pushed the fix-cleanup-manual-rollback branch from af2a6d5 to 174f2e4 Compare November 20, 2025 06:58
@pchila pchila marked this pull request as ready for review November 24, 2025 07:25
@pchila pchila requested a review from a team as a code owner November 24, 2025 07:25
@elasticmachine
Copy link
Contributor

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

@pchila pchila added the Team:Elastic-Agent Label for the Agent team label Nov 27, 2025
@pchila pchila requested a review from ycombinator December 1, 2025 08:45
ycombinator
ycombinator previously approved these changes Dec 1, 2025
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @pchila

@pchila pchila merged commit 193954b into elastic:main Dec 1, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-skip skip-changelog Team:Elastic-Agent Label for the Agent team 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.

3 participants