Add enterprise license check to inference action for semantic text fields#122293
Merged
dan-rubinstein merged 8 commits intoelastic:mainfrom Feb 20, 2025
Merged
Conversation
Collaborator
|
Hi @dan-rubinstein, I've created a changelog YAML for you. |
Collaborator
|
Pinging @elastic/ml-core (Team:ML) |
jimczi
reviewed
Feb 12, 2025
Contributor
jimczi
left a comment
There was a problem hiding this comment.
Thanks for tackling this @dan-rubinstein . Can we add a rest test that checks that we fail the bulk request entirely if the license is not compliant?
...ain/java/org/elasticsearch/xpack/inference/action/filter/ShardBulkInferenceActionFilter.java
Outdated
Show resolved
Hide resolved
Mikep86
reviewed
Feb 13, 2025
...ain/java/org/elasticsearch/xpack/inference/action/filter/ShardBulkInferenceActionFilter.java
Show resolved
Hide resolved
...lasticsearch/xpack/inference/action/filter/ShardBulkInferenceActionFilterBasicLicenseIT.java
Outdated
Show resolved
Hide resolved
...lasticsearch/xpack/inference/action/filter/ShardBulkInferenceActionFilterBasicLicenseIT.java
Show resolved
Hide resolved
...lasticsearch/xpack/inference/action/filter/ShardBulkInferenceActionFilterBasicLicenseIT.java
Outdated
Show resolved
Hide resolved
...lasticsearch/xpack/inference/action/filter/ShardBulkInferenceActionFilterBasicLicenseIT.java
Outdated
Show resolved
Hide resolved
...lasticsearch/xpack/inference/action/filter/ShardBulkInferenceActionFilterBasicLicenseIT.java
Show resolved
Hide resolved
...ava/org/elasticsearch/xpack/inference/action/filter/ShardBulkInferenceActionFilterTests.java
Show resolved
Hide resolved
...ava/org/elasticsearch/xpack/inference/action/filter/ShardBulkInferenceActionFilterTests.java
Outdated
Show resolved
Hide resolved
Mikep86
reviewed
Feb 13, 2025
...ain/java/org/elasticsearch/xpack/inference/action/filter/ShardBulkInferenceActionFilter.java
Show resolved
Hide resolved
...lasticsearch/xpack/inference/action/filter/ShardBulkInferenceActionFilterBasicLicenseIT.java
Outdated
Show resolved
Hide resolved
…ionFilterBasicLicenseIT
Contributor
|
@elasticmachine merge upstream |
Mikep86
approved these changes
Feb 19, 2025
Contributor
Mikep86
left a comment
There was a problem hiding this comment.
LGTM, thanks for the iterations and sorry for the delay in the follow-up review!
prwhelan
approved these changes
Feb 20, 2025
| assertThat(failure.getCause(), instanceOf(ElasticsearchSecurityException.class)); | ||
| assertThat( | ||
| failure.getMessage(), | ||
| containsString(org.elasticsearch.core.Strings.format("current license is non-compliant for [%s]", XPackField.INFERENCE)) |
Member
There was a problem hiding this comment.
Weird, why didn't IntelliJ want to use the already-imported org.elasticsearch.common.Strings?
Member
Author
|
@elasticmachine merge upstream |
dan-rubinstein
added a commit
to dan-rubinstein/elasticsearch
that referenced
this pull request
Feb 20, 2025
…elds (elastic#122293) * Add enterprise license check to inference action for semantic text fields * Update docs/changelog/122293.yaml * Set license to trial in ShardBulkInferenceActionFilterIT * Move license check to only block semantic_text fields that require inference call * Cleaning up tests * Add parameterization on useLegacyFormat back in ShardBulkInferenceActionFilterBasicLicenseIT --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
dan-rubinstein
added a commit
to dan-rubinstein/elasticsearch
that referenced
this pull request
Feb 20, 2025
…elds (elastic#122293) * Add enterprise license check to inference action for semantic text fields * Update docs/changelog/122293.yaml * Set license to trial in ShardBulkInferenceActionFilterIT * Move license check to only block semantic_text fields that require inference call * Cleaning up tests * Add parameterization on useLegacyFormat back in ShardBulkInferenceActionFilterBasicLicenseIT --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Collaborator
dan-rubinstein
added a commit
to dan-rubinstein/elasticsearch
that referenced
this pull request
Feb 20, 2025
…elds (elastic#122293) * Add enterprise license check to inference action for semantic text fields * Update docs/changelog/122293.yaml * Set license to trial in ShardBulkInferenceActionFilterIT * Move license check to only block semantic_text fields that require inference call * Cleaning up tests * Add parameterization on useLegacyFormat back in ShardBulkInferenceActionFilterBasicLicenseIT --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
elasticsearchmachine
pushed a commit
that referenced
this pull request
Feb 20, 2025
…elds (#122293) (#123065) * Add enterprise license check to inference action for semantic text fields * Update docs/changelog/122293.yaml * Set license to trial in ShardBulkInferenceActionFilterIT * Move license check to only block semantic_text fields that require inference call * Cleaning up tests * Add parameterization on useLegacyFormat back in ShardBulkInferenceActionFilterBasicLicenseIT --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
elasticsearchmachine
pushed a commit
that referenced
this pull request
Feb 20, 2025
…elds (#122293) (#123066) * Add enterprise license check to inference action for semantic text fields * Update docs/changelog/122293.yaml * Set license to trial in ShardBulkInferenceActionFilterIT * Move license check to only block semantic_text fields that require inference call * Cleaning up tests * Add parameterization on useLegacyFormat back in ShardBulkInferenceActionFilterBasicLicenseIT --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
afoucret
pushed a commit
to afoucret/elasticsearch
that referenced
this pull request
Feb 21, 2025
…elds (elastic#122293) * Add enterprise license check to inference action for semantic text fields * Update docs/changelog/122293.yaml * Set license to trial in ShardBulkInferenceActionFilterIT * Move license check to only block semantic_text fields that require inference call * Cleaning up tests * Add parameterization on useLegacyFormat back in ShardBulkInferenceActionFilterBasicLicenseIT --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
elasticsearchmachine
pushed a commit
that referenced
this pull request
Feb 21, 2025
…elds (#122293) (#123064) * Add enterprise license check to inference action for semantic text fields * Update docs/changelog/122293.yaml * Set license to trial in ShardBulkInferenceActionFilterIT * Move license check to only block semantic_text fields that require inference call * Cleaning up tests * Add parameterization on useLegacyFormat back in ShardBulkInferenceActionFilterBasicLicenseIT --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The inference API feature is only available to those with at least an enterprise level license. As of 8.18/9.0 we are enforcing this license requirement on all direct interactions with the inference API but we did not add a block for semantic text related inference usage. This change adds a block to the semantic text field inference action so that users are unable to ingest documents into a semantic text field if they do not have the correct license. The cases that we need to block against are:
Testing