Skip to content

Handle rollback in upgrade flow #8786

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

Closed
wants to merge 8 commits into from

Conversation

michalpristas
Copy link
Contributor

@michalpristas michalpristas commented Jul 2, 2025

Added handling for rollback in upgrade flow

This path is not invokable so far, CLI and Action handling will be added later.

Flow

  • when flag is set to true we enter handleRollback
  • handleRollback loads and store marker with updated desired outcome in case
    • marker file is present and there are available rollbacks in marker file
    • we are in a valid state (watching, rollback available)
  • then it starts watcher if necessary that handles rollback itself

Unit tests added to make sure rollback flow is triggered when flagged
Tested manually with tweak to enter the flow and manual set up of data dir incl marker file
Fixes: #6889

@michalpristas michalpristas self-assigned this Jul 2, 2025
@michalpristas michalpristas requested a review from a team as a code owner July 2, 2025 11:54
@michalpristas michalpristas added enhancement New feature or request skip-changelog backport-9.1 Automated backport to the 9.1 branch labels Jul 2, 2025
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Jul 2, 2025
@elasticmachine
Copy link
Collaborator

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

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 2, 2025

Copy link
Member

@pchila pchila left a comment

Choose a reason for hiding this comment

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

Please hold off any PR that would impact manual rollback for the moment.
The solution is being revisited so no need to add more code that may need changes

Copy link

@michalpristas
Copy link
Contributor Author

closing PR as per @pchila comment. can reopen if this turns up viable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-9.1 Automated backport to the 9.1 branch enhancement New feature or request skip-changelog 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.

Handle rollback command/action in upgrade flow
4 participants