Revert "Retry embeddings tasks on Qdrant gRPC DEADLINE_EXCEEDED (#3520)"#3522
Closed
mbertrand wants to merge 1 commit into
Closed
Revert "Retry embeddings tasks on Qdrant gRPC DEADLINE_EXCEEDED (#3520)"#3522mbertrand wants to merge 1 commit into
mbertrand wants to merge 1 commit into
Conversation
This reverts commit e7e2016.
OpenAPI ChangesNo changes detected Unexpected changes? Ensure your branch is up-to-date with |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reverts prior changes that retried Qdrant gRPC DEADLINE_EXCEEDED errors in the vector-search embedding/removal Celery tasks, to avoid halting long Celery chains (notably those created by embed_run_content_files) when a single task fails.
Changes:
- Remove gRPC-specific retry/raise behavior from
generate_embeddings/remove_embeddingsand revert to “swallow and log” error handling. - Drop the gRPC/RetryError-focused unit tests that enforced the prior retry/raise behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| vector_search/tasks.py | Reverts task-level exception handling from gRPC-aware retry/raise back to a catch-all “log and return” approach. |
| vector_search/tasks_test.py | Removes tests that asserted gRPC deadline behavior and related imports/helpers. |
Comments suppressed due to low confidence (1)
vector_search/tasks_test.py:37
- With the gRPC-specific tests removed, there’s no longer any coverage for the current behavior that
generate_embeddings/remove_embeddingsswallow unexpected exceptions and return an error string. Adding a small regression test for the swallow-and-log behavior would help ensure future changes don’t reintroduce chain-halting failures unintentionally.
from vector_search.tasks import (
embed_learning_resources_by_id,
embed_new_content_files,
embed_new_learning_resources,
embed_run_content_files,
embeddings_healthcheck,
remove_run_content_files,
remove_unpublished_run_content_files,
start_embed_resources,
)
Comment on lines
+122
to
+125
| except: # noqa: E722 | ||
| error = "generate_embeddings threw an error" | ||
| log.exception(error) | ||
| return error |
Comment on lines
+151
to
+154
| except: # noqa: E722 | ||
| error = "generate_embeddings threw an error" | ||
| log.exception(error) | ||
| return error |
shanbady
approved these changes
Jun 25, 2026
shanbady
left a comment
Contributor
There was a problem hiding this comment.
just a revert. approved
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.
This reverts a previous commit that rertried grpc errors and raise after final retry. Reverting because the
embed_run_content_filestask creates a chain ofgenerate_embeddingstasks and if one fails, the entire rest of the chain is halted. Will figure out an alternative approach later.What are the relevant tickets?
Related to https://github.com/mitodl/hq/issues/11987
Description (What does it do?)
Just reverts the commit
How can this be tested?
Tests should pass