[Fleet] fix latest_executed_state error#212935
Merged
juliaElastic merged 3 commits intoelastic:mainfrom Mar 3, 2025
Merged
Conversation
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
Contributor
|
Starting backport for target branches: 8.16, 8.17, 8.18, 8.x, 9.0 https://github.com/elastic/kibana/actions/runs/13637432666 |
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
|
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Mar 3, 2025
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)
Contributor
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Mar 4, 2025
# 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":"90178898+juliaElastic@users.noreply.github.com"},"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 <90178898+juliaElastic@users.noreply.github.com>
CAWilson94
pushed a commit
to CAWilson94/kibana
that referenced
this pull request
Mar 22, 2025
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"
/>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix schema validation error when
latest_executed_state: {}.The logic sets an empty object here:
kibana/x-pack/platform/plugins/shared/fleet/server/services/epm/packages/install_state_machine/steps/update_latest_executed_state.ts
Line 63 in 63394e6
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_stateto{}, now the/epm/packagesAPI works as expected.