Skip to content

Conversation

@prwhelan
Copy link
Member

When Dataframes are disabled, do not try to call the Action and instead assume there are no trained models associated with a dataframe job. This avoids a transport exception for the disabled action.


This only affects serverless, so we do not need to backport this to previous versions.

When Dataframes are disabled, do not try to call the Action and instead
assume there are no trained models associated with a dataframe job. This
avoids a transport exception for the disabled action.
@prwhelan prwhelan added >bug :ml Machine learning Team:ML Meta label for the ML team v9.3.0 labels Oct 27, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @prwhelan, I've created a changelog YAML for you.

@elasticsearchmachine elasticsearchmachine added the serverless-linked Added by automation, don't add manually label Oct 27, 2025
@prwhelan prwhelan marked this pull request as ready for review October 27, 2025 21:45
@elasticsearchmachine
Copy link
Collaborator

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

}

public void testBuildTableAccumulatedStats() {
var action = new RestCatTrainedModelsAction(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be possible to add a unit test for the case where areDataFrameAnalyticsEnabled is false and we don't expect to see the dataframe information in the table?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, but the existing functionality isn't tested so adding the tests for both true/false would take a few weeks of calendar time, which I assume is okay since this bug had been open for months. Alternatively, the linked integration test covers the false case whereas the existing integration tests cover the true case.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you not just basically copy this test case where areDataFrameAnalyticsEnabled is true, switch it to false, then assert that we see __none__ as the data_frame.id value?

Copy link
Member Author

Choose a reason for hiding this comment

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

That boolean is used within getDerivedData which is called before the method that this code tests, which is buildTable. The test only calls buildTable, so we'd only be verifying that an absent list sets __none__ which is a test we should have but isn't really relevant to this change (happy to add it, though)

Copy link
Contributor

Choose a reason for hiding this comment

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

Aah, I see, thanks for clarifying. Yeah, no need to add that test in this PR, since it's basically unrelated.

@prwhelan
Copy link
Member Author

@elasticmachine update branch please

@elasticmachine
Copy link
Collaborator

There are no new commits on the base branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :ml Machine learning serverless-linked Added by automation, don't add manually Team:ML Meta label for the ML team v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants