ENG-564: Refactor SaaS dataset validation layering#7850
Draft
galvana wants to merge 2 commits intoENG-564-saas-dataset-backend-validationfrom
Draft
ENG-564: Refactor SaaS dataset validation layering#7850galvana wants to merge 2 commits intoENG-564-saas-dataset-backend-validationfrom
galvana wants to merge 2 commits intoENG-564-saas-dataset-backend-validationfrom
Conversation
Move protected-fields business logic from route to DatasetConfigService and make validation utility functions public for direct testability. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## ENG-564-saas-dataset-backend-validation #7850 +/- ##
===========================================================================
- Coverage 85.00% 85.00% -0.01%
===========================================================================
Files 622 622
Lines 40643 40645 +2
Branches 4748 4748
===========================================================================
Hits 34549 34549
- Misses 5024 5025 +1
- Partials 1070 1071 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Linker44
approved these changes
Apr 7, 2026
Linker44
reviewed
Apr 7, 2026
| @@ -0,0 +1,4 @@ | |||
| type: Developer Experience | |||
Contributor
There was a problem hiding this comment.
lets remove the changelog entry
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-564
Description Of Changes
Refactors the SaaS dataset backend validation feature (from the parent branch) to address two code review findings:
Route → Service layering: The
get_dataset_protected_fieldsendpoint contained inline DB queries and business logic. This is now delegated to a newDatasetConfigService.get_protected_fields()method, consistent with how other endpoints in the file work.Public utility API: The six
_-prefixed helper functions insaas.py(_validate_saas_dataset,_restore_immutable_fields,_restore_protected_structure,_resolve_field_path,_find_field_by_name,_restore_nested_field) are now public. This makes the test imports legitimate rather than reaching into private internals.Code Changes
dataset_config_endpoints.pyintoDatasetConfigService.get_protected_fields()SaaSConfig,ProtectedCollectionField,get_saas_config_referenced_field_paths,MUTABLE_DATASET_FIELDS)_prefix from 6 functions insaas.pyand updated all internal call sitesSteps to Confirm
get_dataset_protected_fieldsendpoint returns the same response as before (immutable fields + protected collection fields for SaaS connections, empty lists for non-SaaS)nox -s "pytest(ops-unit)" -- tests/ops/service/dataset/test_saas_validation_step.py_-prefixed function namesPre-Merge Checklist
CHANGELOG.mdupdated