Pass bulkPartialUpdate errors to taskStore.errors#198606
Pass bulkPartialUpdate errors to taskStore.errors#198606ersin-erdal merged 6 commits intoelastic:mainfrom
Conversation
# Conflicts: # x-pack/plugins/task_manager/server/lib/create_managed_configuration.ts
pmuellr
left a comment
There was a problem hiding this comment.
LGTM, besides the comment I made about the optional message parameter
| type, | ||
| }: { | ||
| statusCode: number; | ||
| message?: string; |
There was a problem hiding this comment.
I don't think this should be optioonal. No idea what Error() does :-)
I think the potential undefined comes from the task_store usage, accessing item.update.error.reason, which is optional. Let's use a message like bulk update failed with unknown reason
|
Pinging @elastic/response-ops (Team:ResponseOps) |
pmuellr
left a comment
There was a problem hiding this comment.
LGTM, left a nit comment ...
| } | ||
|
|
||
| export function getBulkUpdateStatusCode(error: Error | BulkUpdateError): number | undefined { | ||
| if (Boolean(error && error instanceof BulkUpdateError)) { |
There was a problem hiding this comment.
nit: I think this has the same result, with no cast :-)
if (!(error instanceof BulkUpdateError)) return;
return error.statusCode;
💚 Build Succeeded
Metrics [docs]
History
|
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11709378310 |
Resolves: elastic#198428 (cherry picked from commit 9f4d88e)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…99205) # Backport This will backport the following commits from `main` to `8.x`: - [Pass bulkPartialUpdate errors to taskStore.errors (#198606)](#198606) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ersin Erdal","email":"92688503+ersin-erdal@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-11-06T18:09:00Z","message":"Pass bulkPartialUpdate errors to taskStore.errors (#198606)\n\nResolves: #198428","sha":"9f4d88e4b5e491e53aa4cc0b2f6394f5a26e8d9c","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","backport:prev-minor"],"title":"Pass bulkPartialUpdate errors to taskStore.errors","number":198606,"url":"https://github.com/elastic/kibana/pull/198606","mergeCommit":{"message":"Pass bulkPartialUpdate errors to taskStore.errors (#198606)\n\nResolves: #198428","sha":"9f4d88e4b5e491e53aa4cc0b2f6394f5a26e8d9c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198606","number":198606,"mergeCommit":{"message":"Pass bulkPartialUpdate errors to taskStore.errors (#198606)\n\nResolves: #198428","sha":"9f4d88e4b5e491e53aa4cc0b2f6394f5a26e8d9c"}}]}] BACKPORT--> Co-authored-by: Ersin Erdal <92688503+ersin-erdal@users.noreply.github.com>
Resolves: #198428