-
Notifications
You must be signed in to change notification settings - Fork 196
Enhancement/5235 upgrade cleans up downloads and extracted agent #9386
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
Enhancement/5235 upgrade cleans up downloads and extracted agent #9386
Conversation
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
28b43e0
to
e4d304a
Compare
@pkoutsovasilis @michel-laterman the pr is ready for review |
0174246
to
8186da8
Compare
8186da8
to
033782f
Compare
Last commit has issues, looking into it |
033782f
to
bbc909a
Compare
This pull request is now in conflicts. Could you fix it? 🙏
|
ae00198
to
66935ec
Compare
This pull request is now in conflicts. Could you fix it? 🙏
|
66935ec
to
9c67e8b
Compare
This pull request is now in conflicts. Could you fix it? 🙏
|
@ycombinator @michel-laterman I will merge changes from target to address ci failures, and will request reviews again, sorry for the inconvenience. I put a post about this in the team channel |
…nd_extracted_agent
|
💚 Build Succeeded
History
cc @kaanyalti |
@Mergifyio backport 8.18 8.19 9.0 9.1 |
✅ Backports have been created
|
* 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
* 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
* 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_test.go
* 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_test.go
…stic#9386) * 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
…and extracted agent (#10036) * Enhancement/5235 upgrade cleans up downloads and extracted agent (#9386) * 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 * resolved merge conflicts --------- Co-authored-by: Kaan Yalti <[email protected]>
…and extracted agent (#10037) * Enhancement/5235 upgrade cleans up downloads and extracted agent (#9386) * 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 * resolved merge conflicts --------- Co-authored-by: Kaan Yalti <[email protected]>
…nd extracted agent (#10038) * Enhancement/5235 upgrade cleans up downloads and extracted agent (#9386) * 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_test.go * resolved merge conflicts --------- Co-authored-by: Kaan Yalti <[email protected]>
…nd extracted agent (#10039) * Enhancement/5235 upgrade cleans up downloads and extracted agent (#9386) * 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_test.go * resolved merge conflicts --------- Co-authored-by: Kaan Yalti <[email protected]>
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