Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
# Backport This will backport the following commits from `main` to `9.0`: - [[Fleet] fix `latest_executed_state` error (#212935)](#212935) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Julia Bardi","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-03-03T18:07:28Z","message":"[Fleet] fix `latest_executed_state` error (#212935)\n\nFix schema validation error when `latest_executed_state: {}`.\n\nThe logic sets an empty object here:\nhttps://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\nThis caused an error on the Integration Details page:\n\n`Failed output validation: [response\nbody.items.4.installationInfo.latest_executed_state.name]: expected\nvalue of type [string] but got [undefined]`\n\nTested locally by manually updating `latest_executed_state` to `{}`, now\nthe `/epm/packages` API works as expected.\n\n<img width=\"1459\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/bbee7787-93a7-4099-ba9b-ff5d031f7637\"\n/>","sha":"d2913395afd2d2a1e740663e9546fd94a569be64","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:prev-minor","backport:prev-major","v9.1.0"],"title":"[Fleet] fix `latest_executed_state` error","number":212935,"url":"https://github.com/elastic/kibana/pull/212935","mergeCommit":{"message":"[Fleet] fix `latest_executed_state` error (#212935)\n\nFix schema validation error when `latest_executed_state: {}`.\n\nThe logic sets an empty object here:\nhttps://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\nThis caused an error on the Integration Details page:\n\n`Failed output validation: [response\nbody.items.4.installationInfo.latest_executed_state.name]: expected\nvalue of type [string] but got [undefined]`\n\nTested locally by manually updating `latest_executed_state` to `{}`, now\nthe `/epm/packages` API works as expected.\n\n<img width=\"1459\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/bbee7787-93a7-4099-ba9b-ff5d031f7637\"\n/>","sha":"d2913395afd2d2a1e740663e9546fd94a569be64"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212935","number":212935,"mergeCommit":{"message":"[Fleet] fix `latest_executed_state` error (#212935)\n\nFix schema validation error when `latest_executed_state: {}`.\n\nThe logic sets an empty object here:\nhttps://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\nThis caused an error on the Integration Details page:\n\n`Failed output validation: [response\nbody.items.4.installationInfo.latest_executed_state.name]: expected\nvalue of type [string] but got [undefined]`\n\nTested locally by manually updating `latest_executed_state` to `{}`, now\nthe `/epm/packages` API works as expected.\n\n<img width=\"1459\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/bbee7787-93a7-4099-ba9b-ff5d031f7637\"\n/>","sha":"d2913395afd2d2a1e740663e9546fd94a569be64"}}]}] BACKPORT--> Co-authored-by: Julia Bardi <[email protected]>
- Loading branch information