Skip to content

[ML] Modernize ML node detection #79623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 21, 2021

Conversation

droberts195
Copy link
Contributor

Where possible we should now detect ML nodes by looking
for the ML node role rather than an attribute.

Sadly this is not possible in the YAML tests, as the
syntax doesn't support asserting that a list contains
a particular item without asserting on the entire list
contents. So in the YAML case we need to look for the
ml.machine_memory node attribute, as this is reliably
set on ML nodes but not other types of nodes.

After #79622 is merged this closes #79518

Where possible we should now detect ML nodes by looking
for the ML node role rather than an attribute.

Sadly this is not possible in the YAML tests, as the
syntax doesn't support asserting that a list contains
a particular item without asserting on the entire list
contents. So in the YAML case we need to look for the
ml.machine_memory node attribute, as this is reliably
set on ML nodes but not other types of nodes.

After elastic#79622 is merged this closes elastic#79518
@droberts195 droberts195 added >test Issues or PRs that are addressing/adding tests :ml Machine learning v8.0.0 labels Oct 21, 2021
@droberts195 droberts195 requested a review from benwtrent October 21, 2021 12:57
@elasticmachine elasticmachine added the Team:ML Meta label for the ML team label Oct 21, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

} catch (NumberFormatException e) {
return false;
}
return node.getRoles().contains(DiscoveryNodeRole.ML_ROLE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

much better :D

@droberts195 droberts195 merged commit 9b92926 into elastic:master Oct 21, 2021
@droberts195 droberts195 deleted the improve_ml_node_detection branch October 21, 2021 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml Machine learning Team:ML Meta label for the ML team >test Issues or PRs that are addressing/adding tests v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] XPackRestIT test {p0=ml/jobs_get_stats/Test get job stats after uploading data prompting the creation of some stats} failing
4 participants