-
Notifications
You must be signed in to change notification settings - Fork 197
[8.18] (backport #9386) Enhancement/5235 upgrade cleans up downloads and extracted agent #10036
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
Conversation
* enhancement(5235): added comments describing updates in error handling. returning path in error cases if the download is completed * enhancement(5235): added wrapper var for verifier constructor in download step to improve testability * enhancement(5235): added test for downloadArtifact verifier errors * enhancement(5235): addded cleanupPaths slice. added deferred call to remove paths in the cleanupPaths slice * enhancement(5235): add archive and hash path to cleanup paths after artifact download * enhancement(5235): update error handling after unpack. add new versioned home to cleanup paths enhancement(5235): move newHome declaration * enhancement(5235): added upgrade cleanup test * enhancement(5235): added changelog fragment enhancement(5235): updated changelog fragment * enhancement(5235): fix errors in step_download after rebase * enhancement(5235): fix error in step_download_test after rebase * enhancement(5235): refactor disk space error check and path cleanup into one deferred call * enhancement(5235): refactored verifier factory and updated relevant download tests * enhancement(5235): removed separate test for cleanup, added cleanup checks in error handling test * enhancement(5235): changed function name in verifier * enhancement(5235): using AddHashExtension instead of hard coded hash extension string in upgrader (cherry picked from commit ab23962) # Conflicts: # internal/pkg/agent/application/upgrade/upgrade.go # internal/pkg/agent/application/upgrade/upgrade_test.go
Cherry-pick of ab23962 has failed:
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 |
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
This pull request has not been merged yet. Could you please review and merge it @kaanyalti? 🙏 |
@kaanyalti can you take a look at this backport? |
@ebeahan I'm going through all the backports today |
|
💛 Build succeeded, but was flaky
Failed CI StepsHistory
cc @kaanyalti |
PR 5/6
What does this PR do?
Why is it important?
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added an entry in./changelog/fragments
using the changelog tool[ ] I have added an integration test or an E2E testDisruptive User Impact
none
How to test this PR locally
Related issues
This is an automatic backport of pull request #9386 done by [Mergify](https://mergify.com).