[Inference API] Put back legacy EIS URL setting#121207
Merged
demjened merged 6 commits intoelastic:mainfrom Jan 29, 2025
Merged
[Inference API] Put back legacy EIS URL setting#121207demjened merged 6 commits intoelastic:mainfrom
demjened merged 6 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/search-inference-team (Team:Search - Inference) |
Collaborator
|
Hi @demjened, I've created a changelog YAML for you. |
Collaborator
|
Pinging @elastic/search-eng (Team:SearchOrg) |
…:demjened/elasticsearch into demjened/put-back-legacy-eis-url-setting
maxjakob
approved these changes
Jan 29, 2025
maxjakob
reviewed
Jan 29, 2025
|
|
||
| public String getElasticInferenceServiceUrl() { | ||
| return elasticInferenceServiceUrl; | ||
| return Strings.isEmpty(elasticInferenceServiceUrl) ? eisGatewayUrl : elasticInferenceServiceUrl; |
Contributor
There was a problem hiding this comment.
Post-approval thought: can elasticInferenceServiceUrl be null and what does Strings.isEmpty return in this case?
Contributor
Author
There was a problem hiding this comment.
Per Javadocs (it's wrongly referenced as StringUtils there):
* StringUtils.isEmpty(null) = true
* StringUtils.isEmpty("") = true
* StringUtils.isEmpty(" ") = false
* StringUtils.isEmpty("Hello") = false
Contributor
Author
There was a problem hiding this comment.
Also if a Setting is initialized like EIS_GATEWAY_URL = Setting.simpleString(...) (which is what we do here), the default value will be "".
timgrein
approved these changes
Jan 29, 2025
demjened
added a commit
to demjened/elasticsearch
that referenced
this pull request
Jan 29, 2025
* Put back legacy EIS URL setting * Update docs/changelog/121207.yaml * Fallback logic to legacy URL * Add unit tests
Collaborator
💚 Backport successful
|
elasticsearchmachine
pushed a commit
that referenced
this pull request
Jan 29, 2025
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.
Fix after #120842. Putting back obsolete setting while Cloud is still setting it.