Release 0.78.3 - #3881
Closed
odlbot wants to merge 5 commits into
Closed
Release 0.78.3#3881odlbot wants to merge 5 commits into
odlbot wants to merge 5 commits into
Conversation
* Update dependency youtube-transcript-api to >=1.2.4,<1.3 * Migrate to youtube-transcript-api instance API v1.2.0 removed the static list_transcripts/get_transcript methods that were deprecated in v1.0.0; the instance method list() is the replacement. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018S52vCvVmYyY7Q3ji519Nn --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tobias Macey <tmacey@mit.edu> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* hedge requests * tests * switch default hedging delay to 0 * change default delay * change default delay * Isolate and bound hedged embedding request capacity Address review feedback that abandoned losing requests could occupy the shared pool and make later primary requests queue behind them. - split the primary and speculative requests into separate thread pools - bound each pool with a semaphore so submissions are rejected rather than queued: a full primary pool runs the request inline, a full hedge pool skips the backups - give every hedged provider call an explicit timeout so losers release their worker - cover pool saturation, inline fallback, and concurrent saturation in tests Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix ssl_cert_reqs * Address PR feedback on embedding request hedging - fail loudly with RuntimeError instead of returning None when every hedged request is abandoned - drop the duplicated hedge_count/hedge_delay defaults, embed_query always passes them explicitly - log when backups are fired and whether the primary or a backup won, so the hedge delay can be tuned from prod - cover EMBEDDING_HEDGE_COUNT=1 (short circuits to unhedged) and =3 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
page-components/TiptapEditor embeds both VideoResourcePlayer and PodcastEmbedPlayer, but both lived in app-pages, which the import/no-restricted-paths zone in frontends/.eslintrc.js forbids page-components from importing. eslint-plugin-import 2.29 missed it; 2.31 (in #3851) reports all four. Moving only the two player entry points would have relocated the violation rather than fixed it, since each pulls in siblings, so each cluster moved with the modules it needs: page-components/VideoPlayer/ VideoResourcePlayer, VideoJsPlayer, YouTubeIframePlayer, videoSources page-components/PodcastEmbedPlayer/ PodcastEmbedPlayer, useAudioPlayer, usePlaybackRecovery, AudioPlayer.styled Only what the players need moved. The old shared.styled.ts keeps its seven page-chrome exports and gives up NoVideoMessage and ScreenReaderOnly; PodcastPlayer stays on the podcast page and now imports the hooks from page-components, which is an allowed direction. getEpisodeAudioUrl went to common/podcasts.ts instead of either player folder: the listing page and the embed player both need it, and common/ is already where this kind of pure helper lives. helpers.ts re-exports it so its existing importers and tests are untouched. Claude-Session: https://claude.ai/code/session_01FyJ72HRTyQf6jVYmw3GZSt Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
OpenAPI ChangesNo changes detected Unexpected changes? Ensure your branch is up-to-date with |
Comment on lines
336
to
342
|
|
||
| """ | ||
| try: | ||
| transcript_list = YouTubeTranscriptApi.list_transcripts( | ||
| video_resource.readable_id | ||
| ) | ||
| transcript_list = YouTubeTranscriptApi().list(video_resource.readable_id) | ||
| transcript = transcript_list.find_manually_created_transcript(["en"]) | ||
| if not transcript: | ||
| transcript = transcript_list.find_generated_transcript(["en"]) |
There was a problem hiding this comment.
Bug: The fallback logic to fetch auto-generated YouTube captions is unreachable because an exception is caught prematurely, preventing the fallback from running.
Severity: HIGH
Suggested Fix
Restructure the exception handling. Use a nested try...except NoTranscriptFound block around the call to find_manually_created_transcript. In the except block, call find_generated_transcript. This ensures that if a manual transcript is not found, the code correctly falls back to searching for a generated one instead of exiting the function.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: learning_resources/etl/youtube.py#L336-L342
Potential issue: In the `get_captions_for_video` function, the code incorrectly assumes
that `find_manually_created_transcript()` will return `None` if no transcript is found.
Instead, the `youtube-transcript-api` library raises a `NoTranscriptFound` exception.
This exception is caught by an outer `except` block, causing the function to exit
prematurely and return `None`. Consequently, the fallback logic to search for an
auto-generated transcript using `find_generated_transcript()` is never executed. This
results in a data loss issue where available auto-generated captions are silently
ignored for videos that do not have manually created ones.
Did we get this right? 👍 / 👎 to inform future reviews.
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.
Tobias Macey
Shankar Ambady
renovate[bot]