Skip to content

[9.0] [Fleet] fix latest_executed_state error (#212935)#212969

Merged
kibanamachine merged 2 commits intoelastic:9.0from
kibanamachine:backport/9.0/pr-212935
Mar 4, 2025
Merged

[9.0] [Fleet] fix latest_executed_state error (#212935)#212969
kibanamachine merged 2 commits intoelastic:9.0from
kibanamachine:backport/9.0/pr-212935

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

Fix schema validation error when `latest_executed_state: {}`.

The logic sets an empty object here:
https://github.com/elastic/kibana/blob/63394e6bfdedf8c8e76a457673d662d57afdc2a0/x-pack/platform/plugins/shared/fleet/server/services/epm/packages/install_state_machine/steps/update_latest_executed_state.ts#L63
This caused an error on the Integration Details page:

`Failed output validation: [response
body.items.4.installationInfo.latest_executed_state.name]: expected
value of type [string] but got [undefined]`

Tested locally by manually updating `latest_executed_state` to `{}`, now
the `/epm/packages` API works as expected.

<img width="1459" alt="image"
src="https://github.com/user-attachments/assets/bbee7787-93a7-4099-ba9b-ff5d031f7637"
/>

(cherry picked from commit d291339)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Mar 3, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) March 3, 2025 18:14
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Mar 3, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@elasticmachine
Copy link
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] Fleet Cypress Tests #1 / View agents list Agent status filter should filter on healthy and unhealthy
  • [job] [logs] Fleet Cypress Tests #1 / View agents list Bulk actions should allow to bulk upgrade agents and cancel that upgrade
  • [job] [logs] Fleet Cypress Tests #1 / View agents list Bulk actions should allow to bulk upgrade agents and cancel that upgrade

cc @juliaElastic

@kibanamachine kibanamachine merged commit 4d0c442 into elastic:9.0 Mar 4, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR Team:Fleet Team label for Observability Data Collection Fleet team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants