Skip to content

Conversation

michalpristas
Copy link
Contributor

@michalpristas michalpristas commented Oct 2, 2025

In a context of agent migration.

When agent is migrated and still has some upgrade details or upgrade was triggered manually for some reason we should reflect that in UI.

This PR makes action optional and updates upgrade details anyways.

I'd like ACK handling of upgrade to be reworked, but ideally in a separate PR to lower risk as I'd like this one to be in 9.2

Fixes: #5564

@michalpristas michalpristas requested a review from cmacknz October 2, 2025 08:22
@michalpristas michalpristas self-assigned this Oct 2, 2025
@michalpristas michalpristas requested a review from a team as a code owner October 2, 2025 08:22
@michalpristas michalpristas added the bug Something isn't working label Oct 2, 2025
@prodsecmachine
Copy link

prodsecmachine commented Oct 2, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@michalpristas michalpristas changed the title Fix/migrate watching Make action optional when upgrade details are provided Oct 2, 2025
Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

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

Sorry I am having trouble following how this PR works.

Does this fix the issue where if you check-in to a new cluster for the first time after migrate that it will reflect the upgrade state of that agent? If so, could you walk me through how this is done in this code.

action, err := ct.verifyActionExists(ctx, vSpan, agent, details)
if err != nil {

var actionTraceparent string
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@blakerouse normally when no actin is present we stop here
but we make loading optional and if action is not present we just set traceparent (only property used here in the code) to ""

then later we check if we have here when setting parent span and continue until we reach a point where we update details on line 543

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-9.2 bug Something isn't working 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.

Ingored upgrade details after migration

3 participants