{{ message }}
fix(chromium): fix 3 P0 bugs and 2 P1 issues in chromium loader + cleanups#1088
Open
ghshhf wants to merge 4 commits into
Open
fix(chromium): fix 3 P0 bugs and 2 P1 issues in chromium loader + cleanups#1088ghshhf wants to merge 4 commits into
ghshhf wants to merge 4 commits into
Conversation
- P0-1: Fix timeout=0 guard short-circuit (if timeout is not None) - P0-2: Guard finally: await browser.close() against None - P0-3: Guard finally: driver.quit() against unbound variable - P1-2: Fix _get_scraping_fn() for selenium backend dispatch - P1-4: Remove redundant kwargs.get() for direct params
…erMultiConcatGraph
Member
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.

Summary
This PR fixes 3 critical (P0) bugs and 2 high-priority (P1) issues in the chromium loader.
P0 Bugs Fixed
P0-1:
timeout=0guard short-circuit causes 6h CI hangFile:
chromium.py:130Root cause:
if timeout and timeout <= 0- When timeout=0,0 and ...short-circuits to falsy, so the ValueError is never raised. Execution falls through to real network calls, causing the test suite to hang until the 6h CI kill limit.Fix: Changed to
if timeout is not None and timeout <= 0.P0-2:
finally: await browser.close()may raise UnboundLocalErrorFile:
chromium.py:188Root cause: If browser is None (invalid browser_name) or never assigned (async_playwright fails), the finally block crashes.
Fix: Added
if browser is not Noneguard.P0-3:
finally: driver.quit()may reference unbound variableFile:
chromium.py:101Root cause: If driver initialization fails,
driveris never assigned.Fix: Added scope check before
driver.quit().Additional Fixes
_get_scraping_fn()that properly routes toascrape_undetected_chromedriverscraperaphai->scrapegraphaiin pyproject.toml