Skip to content

Fix #2392: EmbeddingProvider and RerankingProvider decideRetry() buggy#2393

Merged
tatu-at-datastax merged 8 commits intomainfrom
tatu/2392-fix-provider-decide-retry
Feb 13, 2026
Merged

Fix #2392: EmbeddingProvider and RerankingProvider decideRetry() buggy#2393
tatu-at-datastax merged 8 commits intomainfrom
tatu/2392-fix-provider-decide-retry

Conversation

@tatu-at-datastax
Copy link
Contributor

What this PR does:

Fixes logic for determining retries to actually retry timeouts

Which issue(s) this PR fixes:
Fixes #2392

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

@tatu-at-datastax tatu-at-datastax self-assigned this Feb 13, 2026
@tatu-at-datastax tatu-at-datastax requested a review from a team as a code owner February 13, 2026 01:24
@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

📈 Unit Test Coverage Delta vs Main Branch

Metric Value
Main Branch 50.26%
This PR 50.29%
Delta 🟢 +0.03%
✅ Coverage improved!

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

Unit Test Coverage Report

Overall Project 50.29% -0.02% 🍏
Files changed 56.6%

File Coverage
EmbeddingProvider.java 73.58% 🍏
ProviderBase.java 54.09% 🍏
RerankingProvider.java 53.87% -3.99%
VertexAIEmbeddingProvider.java 16.58% -3.63%

// Get the whole response body
JsonNode rootNode = jakartaResponse.readEntity(JsonNode.class);
return rootNode.toString();
return jakartaResponse.readEntity(String.class);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Avoid parsing JSON, then re-generating

&& se.code.equals(RerankingProviderException.Code.RERANKING_PROVIDER_TIMEOUT.name()));

boolean retry =
throwable instanceof RerankingProviderException rpe
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: remove getCause() as exception should not be cause but mapper exception itself.

}

@Override
protected boolean decideRetry(Throwable throwable) {
Copy link
Contributor Author

@tatu-at-datastax tatu-at-datastax Feb 13, 2026

Choose a reason for hiding this comment

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

Override was missing, so no retry would occur for EMBEDDING_PROVIDER_TIMEOUT.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

📈 Integration Test Coverage Delta vs Main Branch (dse69-it)

Metric Value
Main Branch 70.71%
This PR 70.74%
Delta 🟢 +0.03%
✅ Coverage improved!

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

Integration Test Coverage Report (dse69-it)

Overall Project 70.74% -0.03% 🍏
Files changed 49.06%

File Coverage
ProviderBase.java 48.8% 🍏
EmbeddingProvider.java 43.87% -0.94% 🍏
RerankingProvider.java 0% -3.99%
VertexAIEmbeddingProvider.java 0% -3.63%

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

📈 Integration Test Coverage Delta vs Main Branch (hcd-it)

Metric Value
Main Branch 72.47%
This PR 72.49%
Delta 🟢 +0.02%
✅ Coverage improved!

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

Integration Test Coverage Report (hcd-it)

Overall Project 72.49% -0.03% 🍏
Files changed 49.06%

File Coverage
ProviderBase.java 48.8% 🍏
EmbeddingProvider.java 43.87% -0.94% 🍏
RerankingProvider.java 7.73% -3.99%
VertexAIEmbeddingProvider.java 0% -3.63%

Copy link
Contributor

@Hazel-Datastax Hazel-Datastax left a comment

Choose a reason for hiding this comment

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

LGTM

@tatu-at-datastax tatu-at-datastax merged commit 43eabdf into main Feb 13, 2026
3 checks passed
@tatu-at-datastax tatu-at-datastax deleted the tatu/2392-fix-provider-decide-retry branch February 13, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EmbeddingProvider.decideRetry() and RerankingProvider.decideRetry() fail to retry actual timeouts

2 participants