Skip to content

Conversation

@prwhelan
Copy link
Member

Cross-Project Search and Cross-Cluster Search is indefinitely disabled for Dataframe Analytics. The error message will now display if the syntax would have otherwise resolved to the respective feature.

Cross-Project Search and Cross-Cluster Search is indefinitely disabled
for Dataframe Analytics. The error message will now display if the
syntax would have otherwise resolved to the respective feature.
@prwhelan prwhelan added >non-issue :ml Machine learning Team:ML Meta label for the ML team v9.3.0 labels Oct 16, 2025
@prwhelan prwhelan marked this pull request as ready for review October 16, 2025 20:25
@elasticsearchmachine
Copy link
Collaborator

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

Comment on lines 571 to 573
context.addValidationError(
context.crossProjectEnabled() ? CROSS_PROJECT_INDICES_NOT_SUPPORTED : REMOTE_SOURCE_INDICES_NOT_SUPPORTED
);
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the main bit of changed logic - if we're in an environment that supports cross-project, then we are also in an environment that does not support cross-cluster, so we display the appropriate error message

Copy link
Member

Choose a reason for hiding this comment

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

@prwhelan do we really need to have two separate validation failures? Why not just one that says "remote source and cross-project indices are not supported". Seems like an unnecessary complication.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm fine with that, though this code will come back for the transform check

Copy link
Member

Choose a reason for hiding this comment

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

@prwhelan right, transforms only support remote indices, not cps. I think thats fine.

transportService.getRemoteClusterService(),
null,
null,
new CrossProjectModeDecider(clusterService.getSettings()).crossProjectEnabled(),
Copy link
Member Author

Choose a reason for hiding this comment

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

I initially tried injecting either the CrossProjectModeDecider and just a boolean, but the powers that be don't like it when both Transform and MachineLearning declare the same objects as a component, and I couldn't figure out a way around that, so we're just parsing the boolean here and sending it down for now. We just need the boolean anyway, and it is a static setting so it won't change unless the cluster reboots anyway.

@prwhelan
Copy link
Member Author

@benwtrent what's your take on this failing REST test? i changed the file, but it looks like it's checking out 8.19 and running that test - should i be using a NodeFeature to verify that the cluster is at the current version, else return the old exception message?

@benwtrent
Copy link
Member

@prwhelan exact error messages aren't really part of our API contracts. We should really only be asserting on if its a bad_request inside the yaml test.

I would suggest skipping the compat test that is failing. We should adjust the assertions in 8.19 in a separate PR.

Look for an example on how to do this skipping in gradle files like:

tasks.named("yamlRestCompatTestTransform").configure({ task ->

@prwhelan prwhelan merged commit 169e48f into elastic:main Oct 29, 2025
34 checks passed
shmuelhanoch pushed a commit to shmuelhanoch/elasticsearch that referenced this pull request Oct 29, 2025
Cross-Project Search and Cross-Cluster Search is indefinitely disabled
for Dataframe Analytics. The error message will now display if the
syntax would have otherwise resolved to the respective feature.
chrisparrinello pushed a commit to chrisparrinello/elasticsearch that referenced this pull request Nov 3, 2025
Cross-Project Search and Cross-Cluster Search is indefinitely disabled
for Dataframe Analytics. The error message will now display if the
syntax would have otherwise resolved to the respective feature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:ml Machine learning >non-issue Team:ML Meta label for the ML team v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants