Speed up cached devcontainer responses#2
Open
thecooltimv-bit wants to merge 1 commit into
Open
Conversation
Author
|
The targeted regression tests pass locally: py -m pytest tests/test_cached_database_short_circuit.py tests/test_check_url_exists_query.py -q Result: 2 passed, 1 warning. The failing checks appear to be Continuous AI agent errors rather than test failures from this patch. Happy to adjust if there is a specific maintainer-requested change. |
1 similar comment
Author
|
The targeted regression tests pass locally: py -m pytest tests/test_cached_database_short_circuit.py tests/test_check_url_exists_query.py -q Result: 2 passed, 1 warning. The failing checks appear to be Continuous AI agent errors rather than test failures from this patch. Happy to adjust if there is a specific maintainer-requested change. |
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.
/claim #24
Summary
This PR speeds up repeated
/generaterequests for repositories that already have a stored devcontainer result in the database.Previously, the route checked whether the URL existed in the database, but still fetched repository context before returning the cached result. That meant cached database hits still paid the cost of unnecessary repository-context work.
This change adds an early cached-response fast path before fetching repo context when:
regenerateis not requestedIt also narrows the Supabase select in
check_url_exists()to only the fields needed for the cached response.Changes
fetch_repo_context()Tests
Ran:
Result: