Conversation
|
This pull request does not have a backport label. Could you fix it @pchila? 🙏
|
4d4ccd2 to
3ac0d8a
Compare
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
blakerouse
left a comment
There was a problem hiding this comment.
This overall looks good, but the part that really prevents me from giving this a +1 is an integration test. I think having this in an integration tests is critical. We should full observe in the test that the available rollback is removed once the upgrade is complete.
bee1173 to
3d6063a
Compare
@blakerouse have a look at 3d6063a and fea6eb1 |
…pired_rollback_after_upgrading_to_a_repackaged_version on windows
cmacknz
left a comment
There was a problem hiding this comment.
Generally looks good after latest changes, just need CI to pass.
…lear_expired_rollback_after_upgrading_to_a_repackaged_version on windows
💔 Build Failed
Failed CI StepsHistory
cc @pchila |
* Cleanup rollbacks when triggering a new upgrade * refactor available rollback normalization at startup * WIP - scheduled rollback cleanup * WIP - wire scheduled rollback cleanup at agent startup * remove appDone handling from PeriodicallyCleanRollbacks * Pass the correct relative path to the rollback cleanup goroutine * refactor from commit and repackaged fixtures for rollback tests * Add Hash() to agent integration test fixture * Define a minimum cleanup interval for available rollbacks * create ttl marker files without world-readable permissions * introduce integration test for automatic cleanup of expired rollbacks * fixup! Define a minimum cleanup interval for available rollbacks * fixup! fixup! Define a minimum cleanup interval for available rollbacks * fixup! Add Hash() to agent integration test fixture * Add cleanup rollback test for multiple upgrades within the window * Use an additional subcontext for cleanup goroutine * add debug logging and skip TestCleanupRollbacks/agent_should_clear_expired_rollback_after_upgrading_to_a_repackaged_version on windows * fixup! add debug logging and skip TestCleanupRollbacks/agent_should_clear_expired_rollback_after_upgrading_to_a_repackaged_version on windows * Check upgrade details status more frequently during upgrade integration tests --------- Co-authored-by: Eric Beahan <eric.beahan@elastic.co> (cherry picked from commit 5e3c865)
* Cleanup rollbacks when triggering a new upgrade * refactor available rollback normalization at startup * WIP - scheduled rollback cleanup * WIP - wire scheduled rollback cleanup at agent startup * remove appDone handling from PeriodicallyCleanRollbacks * Pass the correct relative path to the rollback cleanup goroutine * refactor from commit and repackaged fixtures for rollback tests * Add Hash() to agent integration test fixture * Define a minimum cleanup interval for available rollbacks * create ttl marker files without world-readable permissions * introduce integration test for automatic cleanup of expired rollbacks * fixup! Define a minimum cleanup interval for available rollbacks * fixup! fixup! Define a minimum cleanup interval for available rollbacks * fixup! Add Hash() to agent integration test fixture * Add cleanup rollback test for multiple upgrades within the window * Use an additional subcontext for cleanup goroutine * add debug logging and skip TestCleanupRollbacks/agent_should_clear_expired_rollback_after_upgrading_to_a_repackaged_version on windows * fixup! add debug logging and skip TestCleanupRollbacks/agent_should_clear_expired_rollback_after_upgrading_to_a_repackaged_version on windows * Check upgrade details status more frequently during upgrade integration tests --------- (cherry picked from commit 5e3c865) Co-authored-by: Paolo Chilà <paolo.chila@elastic.co> Co-authored-by: Eric Beahan <eric.beahan@elastic.co>
* Cleanup rollbacks when triggering a new upgrade * refactor available rollback normalization at startup * WIP - scheduled rollback cleanup * WIP - wire scheduled rollback cleanup at agent startup * remove appDone handling from PeriodicallyCleanRollbacks * Pass the correct relative path to the rollback cleanup goroutine * refactor from commit and repackaged fixtures for rollback tests * Add Hash() to agent integration test fixture * Define a minimum cleanup interval for available rollbacks * create ttl marker files without world-readable permissions * introduce integration test for automatic cleanup of expired rollbacks * fixup! Define a minimum cleanup interval for available rollbacks * fixup! fixup! Define a minimum cleanup interval for available rollbacks * fixup! Add Hash() to agent integration test fixture * Add cleanup rollback test for multiple upgrades within the window * Use an additional subcontext for cleanup goroutine * add debug logging and skip TestCleanupRollbacks/agent_should_clear_expired_rollback_after_upgrading_to_a_repackaged_version on windows * fixup! add debug logging and skip TestCleanupRollbacks/agent_should_clear_expired_rollback_after_upgrading_to_a_repackaged_version on windows * Check upgrade details status more frequently during upgrade integration tests --------- Co-authored-by: Eric Beahan <eric.beahan@elastic.co>
What does this PR do?
This PR will cleanup available rollbacks when:
Why is it important?
To avoid having to clean up manually when upgrading again an agent still within the rollback window and not to wait until the agent restart to clean up obsolete installs
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/fragmentsusing the changelog tool[ ] I have added an integration test or an E2E testDisruptive User Impact
How to test this PR locally
Related issues
Questions to ask yourself