Fix SaaS connections missing dataset when created with system#7978
Fix SaaS connections missing dataset when created with system#7978
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
When creating a SaaS connection through the integrations page with a system selected, the request goes through _create_saas_connection_from_template which was missing the upsert_dataset_config_from_template call. This meant the connection had no dataset and was invisible to DSR execution. Three fixes: - Backend: add upsert_dataset_config_from_template and duplicate key guard to _create_saas_connection_from_template (matching instantiate_connection) - Frontend: send connection_type "saas" + saas_connector_type instead of the vendor name as connection_type for SaaS connectors with a system - Backend: guard against None CtlDataset in delete_connection_config to handle orphaned connections created before this fix
df623bd to
ba55708
Compare
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (30.00%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #7978 +/- ##
==========================================
- Coverage 84.94% 84.93% -0.01%
==========================================
Files 630 630
Lines 41086 41095 +9
Branches 4769 4771 +2
==========================================
+ Hits 34901 34906 +5
- Misses 5102 5106 +4
Partials 1083 1083 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Vagoasdf
left a comment
There was a problem hiding this comment.
Everything looking well and working well
- Use `raise ... from e` to chain the original exception when SaaS dataset upsert fails, preserving the root cause in tracebacks. - Log a warning when no CtlDataset is found during SaaS connection deletion, making orphaned state visible instead of silently skipped.
Ticket ENG-3525
Summary
_create_saas_connection_from_templatewas missing theupsert_dataset_config_from_templatecall, so SaaS connections created through thePATCH /system/{key}/integrations/connectionendpoint had noDatasetConfigand were invisible to DSR execution. Added the dataset creation and a duplicate key guard (matchinginstantiate_connection).ConfigureIntegrationFormwas sending the vendor name (e.g."stripe") asconnection_typeinstead of"saas"+saas_connector_type, causing a 422 validation error when creating SaaS integrations with a system selected.delete_connection_configcrashed withAttributeError: 'NoneType' object has no attribute 'delete'when deleting orphaned SaaS connections that had noCtlDataset. Added aNoneguard.Test plan
DatasetConfigis created