Allowed Domains Part 2 secrets validation#7423
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Contributor
Greptile SummaryThis PR implements domain validation for SaaS connector endpoint parameters and refactors connector param metadata storage from Pydantic V2's fragile Key changes:
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: c1c3ce1 |
…x to match at least 1 character
galvana
approved these changes
Feb 27, 2026
Contributor
Author
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.
Ticket ENG-2569
Description Of Changes
Second of a 4-part series. This PR validates endpoint values against
allowed_valuesat the time connection secrets are set, and fixes a pre-existing Pydantic V2 issue withget_connector_param.The old
get_connector_paramusedPrivateAttr+__private_attributes__to store connector param metadata on dynamically created models. This was brittle in Pydantic V2 — the code had multiple defensive guards and a TODO acknowledging the fragility. This PR replaces that approach by storing metadata injson_schema_extraon each field (the same mechanism already used forsensitive), making it accessible via the stablecls.model_fieldsAPI.Code Changes
_connector_paramsPrivateAttr with per-fieldjson_schema_extracontainingsensitive,options,multiselect,param_type, andallowed_valuesinconnection_secrets_saas.pySaaSSchema.get_connector_paramto read fromcls.model_fields[name].json_schema_extrarequired_components_suppliedthat checks values againstallowed_valueswhenparam_type == "endpoint"and secrets are settest_connection_template_endpoints.pyhubspot schema test to include the newjson_schema_extrakeys in the expected responseSteps to Confirm
allowed_valuessucceedsallowed_valuesraises a validation errordisable_domain_validationis true orallowed_valuesisNonetest_value_not_in_options)Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works