feat(indexing): convert connector to async streaming with SDK v1.0.0b1#480
Merged
steve-calvert-glean merged 5 commits intomainfrom Apr 22, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
rwjblue-glean
approved these changes
Apr 15, 2026
- Migrate from BaseConnectorDataClient to AsyncBaseStreamingDataClient - Replace sync requests with aiohttp for async HTTP fetching - Replace sync_playwright with async_playwright for JS-rendered pages - Use asyncio.as_completed() instead of gather() to yield results immediately - Process info pages inline during classification, not as separate phase - Rename connector to DeveloperDocsConnector for consistency This dramatically improves time-to-first-result from 30-60s to 200-500ms by streaming results as they complete instead of waiting for all tasks. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use isolated browser contexts instead of shared pages to prevent IPC channel contention between concurrent Playwright operations - Reduce concurrency from 5 to 3 pages for better stability - Collect all results before yielding to avoid generator interruptions mid-browser-operation causing pipe breakage - Add robust cleanup with try/except around page and context close to prevent cascading failures This fixes the "Error: write EPIPE" crashes when scraping API reference pages with concurrent Playwright page operations. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Renamed: - AsyncBaseStreamingDataClient → BaseAsyncStreamingDataClient - AsyncBaseStreamingDatasourceConnector → BaseAsyncStreamingDatasourceConnector Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Pin to glean-indexing-sdk>=1.0.0b1 (from local editable path) - Remove [studio] extra (no longer exists in v1.0.0b1) - Remove studio dev dependencies (sse-starlette, starlette, uvicorn) - Remove [tool.uv.sources] local path override - Regenerate uv.lock with stable transitive deps Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0b66895 to
d84089a
Compare
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
BaseAsyncStreamingDatasourceConnectorandBaseAsyncStreamingDataClientrequests+concurrent.futureswithaiohttp+asynciofor info page fetchingsync_playwrightwithasync_playwright, using a shared browser with isolated contexts and semaphore-based concurrency (3 concurrent pages) for API reference scrapingglean-indexing-sdktov1.0.0b1, removes deprecated[studio]extra and local path sourceVerification
infoPageandapiReferencedocument pipelines produce correctDocumentDefinitionobjects with proper custom propertiesTest plan
mise run indexing:dry-runcompletes with 221/221 documents, 0 failuresBaseAsyncStreamingDataClient,BaseAsyncStreamingDatasourceConnectorGLEAN_INDEXING_API_TOKEN)🤖 Generated with Claude Code