Repository navigation
[ML] Transforms: Fixes missing number of transform nodes and error reporting in stats bar. - #93956
Conversation
|
Pinging @elastic/ml-ui (:ml) |
afharo
left a comment
There was a problem hiding this comment.
Unblocking Core's CODEOWNERS review
| }); | ||
|
|
||
| let count = 0; | ||
| if (typeof body.nodes === 'object') { |
There was a problem hiding this comment.
Ah yes, I copied that over from older ML code. Updated in bc3e236.
|
Update in bc3e236:
|
| isPopulatedObject(node) && | ||
| {}.hasOwnProperty.call(node, 'attributes') && | ||
| isPopulatedObject(node.attributes) && | ||
| {}.hasOwnProperty.call(node.attributes, 'transform.node') |
There was a problem hiding this comment.
i think this check is too strict, transform.node may be missing entirely from one of the nodes, in which case the whole check will fail and count will be returned as 0
There was a problem hiding this comment.
Good catch and thinking about multiple nodes! I fixed the type guard and added a unit test in cf49a77.
|
@elasticmachine merge upstream |
peteharverson
left a comment
There was a problem hiding this comment.
Tested latest edits and LGTM
|
@elasticmachine merge upstream |
|
The tests caught something I missed: The code was based on the legacy format to identify transform nodes via |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @walterra |
…porting in stats bar. (elastic#93956) - Adds a Kibana API endpoint transforms/_nodes - Adds number of nodes to the stats bar in the transforms list. - Shows a callout when no transform nodes are available. - Disable all actions except delete when no transform nodes are available. - Disables the create button when no transform nodes are available.
…porting in stats bar. (#93956) (#94677) - Adds a Kibana API endpoint transforms/_nodes - Adds number of nodes to the stats bar in the transforms list. - Shows a callout when no transform nodes are available. - Disable all actions except delete when no transform nodes are available. - Disables the create button when no transform nodes are available.
…porting in stats bar. (elastic#93956) - Adds a Kibana API endpoint transforms/_nodes - Adds number of nodes to the stats bar in the transforms list. - Shows a callout when no transform nodes are available. - Disable all actions except delete when no transform nodes are available. - Disables the create button when no transform nodes are available. # Conflicts: # x-pack/plugins/transform/common/api_schemas/type_guards.ts
…rror reporting in stats bar. (#93956) (#95754) - Adds a Kibana API endpoint transforms/_nodes - Adds number of nodes to the stats bar in the transforms list. - Shows a callout when no transform nodes are available. - Disable all actions except delete when no transform nodes are available. - Disables the create button when no transform nodes are available.
…porting in stats bar. (elastic#93956) - Adds a Kibana API endpoint transforms/_nodes - Adds number of nodes to the stats bar in the transforms list. - Shows a callout when no transform nodes are available. - Disable all actions except delete when no transform nodes are available. - Disables the create button when no transform nodes are available.
Summary
Fixes #92227
transforms/_nodesTo test this, add the following to
elasticsearch.ymlof your single node cluster (that's the default node roles taken from here and the transform role commented out):Checklist
For maintainers