Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Contributor
Greptile SummaryThis PR resolves a critical performance regression in the Key improvements:
Additional fixes:
The implementation is clean, well-tested with comprehensive coverage for edge cases, and the PR description provides excellent metrics and evidence from production diagnostics. Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 410c9b5 |
galvana
approved these changes
Feb 27, 2026
galvana
added a commit
that referenced
this pull request
Feb 28, 2026
Co-authored-by: Nate Smith <nate@ethyca.com> Co-authored-by: Adrian Galvan <adrian@ethyca.com>
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.
Description Of Changes
Fixes a severe performance regression in the
GET /api/v1/connectionendpoint caused by exponential Redis round-trips during secret masking serialization.Root Cause
When serializing connection configs with secrets, the
mask_sensitive_valuesPydantic validator callsget_connection_type_secret_schema()for each item. This function previously calledget_connection_types()— which rebuilds the entire SaaS connector registry (95 types) viaget_saas_connection_types()— just to validate the connection type exists, before returning the schema.Each of the 95 SaaS types triggers
ConnectorRegistry.get_connector_template(), which invokes a RedisGETvia the@redis_version_cacheddecorator. With 50 connection configs per page, this produced:50 items × 95 SaaS types × ~2ms/Redis call = ~9,500ms per request
Evidence (from plus-rc diagnostic logging in #7514)
schema_lookup, masking itself: 0.0ms)get_connection_types=~190ms →get_saas_connection_typesbuild_map=~188ms for 95 typesFix
Short-circuit
get_connection_type_secret_schema()to avoid callingget_connection_types()entirely:secrets_schemasdict directly — instant O(1) lookup, zero Redis callsConnectorRegistry.get_connector_template()for just the specific type — 1 Redis call instead of 95NoSuchConnectionTypeSecretSchemaErrorExpected Improvement
Pre-Merge Checklist
CHANGELOG.mdupdated