Skip to content

[Inference API] Handle empty date strings when parsing endpoint metadata#143584

Merged
dimitris-athanasiou merged 2 commits intoelastic:mainfrom
dimitris-athanasiou:handle-empty-date-strings-parsing-endpoint-metadata
Mar 4, 2026
Merged

[Inference API] Handle empty date strings when parsing endpoint metadata#143584
dimitris-athanasiou merged 2 commits intoelastic:mainfrom
dimitris-athanasiou:handle-empty-date-strings-parsing-endpoint-metadata

Conversation

@dimitris-athanasiou
Copy link
Copy Markdown
Contributor

This adds handling of blank date strings when parsing endpoint metadata heuristics by treating it as null.

This could not occur in practice as EIS won't be serving empty strings. However, there are tests that pass in an empty string (e.g. callers of createAuthorizedEndpoint in ElasticInferenceServiceAuthorizationResponseEntityTests may lead to this case).

Rather than change the tests, it makes more sense to make date parsing more robust.

…ata heuristics

This adds handling of blank date strings when parsing endpoint metadata heuristics
by treating it as `null`.

This could not occur in practice as EIS won't be serving empty strings. However, there
are tests that pass in an empty string (e.g. callers of `createAuthorizedEndpoint` in
`ElasticInferenceServiceAuthorizationResponseEntityTests` may lead to this case).

Rather than change the tests, it makes more sense to make date parsing more robust.
@dimitris-athanasiou dimitris-athanasiou added >test Issues or PRs that are addressing/adding tests :SearchOrg/Inference Label for the Search Inference team v9.4.0 labels Mar 4, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/search-inference-team (Team:Search - Inference)

Copy link
Copy Markdown
Contributor

@jonathan-buttner jonathan-buttner left a comment

Choose a reason for hiding this comment

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

You might need to update the tests that exist to skip the preconfigured endpoints when the date string is "" because they might start failing now.

@dimitris-athanasiou dimitris-athanasiou merged commit cd8155b into elastic:main Mar 4, 2026
36 checks passed
@dimitris-athanasiou dimitris-athanasiou deleted the handle-empty-date-strings-parsing-endpoint-metadata branch March 4, 2026 16:48
burqen pushed a commit to burqen/elasticsearch that referenced this pull request Mar 5, 2026
…ata (elastic#143584)

This adds handling of blank date strings when parsing endpoint metadata heuristics
by treating it as `null`.

This could not occur in practice as EIS won't be serving empty strings. However, there
are tests that pass in an empty string (e.g. callers of `createAuthorizedEndpoint` in
`ElasticInferenceServiceAuthorizationResponseEntityTests` may lead to this case).

Rather than change the tests, it makes more sense to make date parsing more robust.
jfreden pushed a commit to jfreden/elasticsearch that referenced this pull request Mar 5, 2026
…ata (elastic#143584)

This adds handling of blank date strings when parsing endpoint metadata heuristics
by treating it as `null`.

This could not occur in practice as EIS won't be serving empty strings. However, there
are tests that pass in an empty string (e.g. callers of `createAuthorizedEndpoint` in
`ElasticInferenceServiceAuthorizationResponseEntityTests` may lead to this case).

Rather than change the tests, it makes more sense to make date parsing more robust.
spinscale pushed a commit to spinscale/elasticsearch that referenced this pull request Mar 6, 2026
…ata (elastic#143584)

This adds handling of blank date strings when parsing endpoint metadata heuristics
by treating it as `null`.

This could not occur in practice as EIS won't be serving empty strings. However, there
are tests that pass in an empty string (e.g. callers of `createAuthorizedEndpoint` in
`ElasticInferenceServiceAuthorizationResponseEntityTests` may lead to this case).

Rather than change the tests, it makes more sense to make date parsing more robust.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:SearchOrg/Inference Label for the Search Inference team Team:Search - Inference >test Issues or PRs that are addressing/adding tests v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants