-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Add enterprise license check to inference action for semantic text fields #122293
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
Add enterprise license check to inference action for semantic text fields #122293
Conversation
Hi @dan-rubinstein, I've created a changelog YAML for you. |
Pinging @elastic/ml-core (Team:ML) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
...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
...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
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the iterations and sorry for the delay in the follow-up review!
assertThat(failure.getCause(), instanceOf(ElasticsearchSecurityException.class)); | ||
assertThat( | ||
failure.getMessage(), | ||
containsString(org.elasticsearch.core.Strings.format("current license is non-compliant for [%s]", XPackField.INFERENCE)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird, why didn't IntelliJ want to use the already-imported org.elasticsearch.common.Strings
?
@elasticmachine merge upstream |
…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 <[email protected]>
…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 <[email protected]>
…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 <[email protected]>
…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 <[email protected]>
…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 <[email protected]>
…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 <[email protected]>
…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 <[email protected]>
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