ENG-3000: stop using deprecated /system/{key}/connection endpoints, surface DSR controls#8121
Draft
ENG-3000: stop using deprecated /system/{key}/connection endpoints, surface DSR controls#8121
Conversation
… new Integrations form
ConfigureIntegrationForm relied on two deprecated, system-scoped endpoints
that conflate connection lifecycle with system linking:
* PATCH /system/{fides_key}/connection
* POST /(plus/)system/{fides_key}/connection/instantiate/{type}
Both bake a single system into the connection-create/update call. That
implicitly assumes one-integration-per-system semantics and produces
inconsistent behavior now that a system can have multiple linked
integrations — for example, creating a SaaS integration with a system
selected would error out (the patch path only routes to template
instantiation when secrets is truthy, so SaaS connectors without required
secrets fell through to the standard path and never got a saas_config or
dataset). The deprecation notes on both endpoints already point at the
right replacement: do connection work via the top-level /connection
endpoints, then manage the link via PUT /connection/{key}/system-links.
Refactor handleSubmit to that two-step flow:
1. Create / update the connection without any system context. New SaaS
connections go through POST /connection/instantiate/{type}; everything
else (non-SaaS create, all edits) goes through PATCH /connection.
2. Reconcile the system link via PUT /connection/{key}/system-links —
only when the desired state differs from initialSystemFidesKey, so
common edits (e.g. updating only secrets) skip a redundant idempotent
call. Passing links: [] correctly unlinks, fixing the secondary bug
where clearing the System field on edit silently left the prior link
in place.
Drops the form's dependency on usePatchSystemConnectionConfigsMutation,
useCreatePlusSaasConnectionConfigMutation, and
useCreateSassConnectionConfigMutation.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
The System -> Integrations form has long had an "Enable integration" switch
backed by ConnectionConfig.disabled. The new top-level Integrations form was
missing this control, so once a SaaS integration was created its DSR-usage
state could only be changed by going back through the System page.
Add an "Enable integration" Switch to ConfigureIntegrationForm:
* Always visible (create + edit), defaults to enabled.
* Saved alongside name / description / secrets via the standard Save
button — not a separate immediate-save toggle. Tooltip clarifies the
DSR-only scope.
Add backend comments documenting that ConnectionConfig.disabled is a
privacy-request (DSR) execution gate, not a global pause: it does not
exclude the connection from discovery monitors or connection tests.
Comments only — no behavior change on the backend.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Rename the form label to "Enable for privacy requests" so the DSR scope is visible at a glance without relying on the tooltip. Tooltip is now a plain restatement: "When enabled, this integration is used during privacy request execution." Update the changelog fragment to match the new label. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirror the dataset picker that the System -> Integrations tab already
exposes for database integrations. Renders only on edit (the
PUT /connection/{key}/datasetconfig endpoint requires an existing
connection) and only for SystemType.DATABASE — DataHub keeps its own,
BigQuery-filtered picker untouched.
Field is named "Privacy request datasets" (with a matching tooltip) so
the DSR scoping is visible in the form itself, not just the tooltip.
Backed by the existing useDatasetConfigField hook
(dropdownOptions = currently linked + unlinked available datasets,
rendered with the shared DatasetSelectOption component) and the same
patchConnectionDatasetConfig call already used for DataHub.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop the longer 'discover and act on relevant data' phrasing in favour of the more direct 'for privacy request fulfillment.' Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8121 +/- ##
==========================================
+ Coverage 85.19% 85.23% +0.04%
==========================================
Files 638 638
Lines 42008 42011 +3
Branches 4937 4937
==========================================
+ Hits 35788 35808 +20
+ Misses 5111 5096 -15
+ Partials 1109 1107 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
12 tasks
The 'add a new integration associated with a system' test was waiting on
PATCH /api/v1/system/{key}/connection — the deprecated, system-scoped
endpoint this PR routes off of. With the form now creating the connection
via PATCH /connection and reconciling the link via
PUT /connection/{key}/system-links, the test waits on those two requests
instead.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.
Ticket ENG-3000
Description Of Changes
Four related changes to
ConfigureIntegrationForm(the new top-level Integrations page):1. Stop using deprecated
/system/{key}/connectionendpoints. The form was wired to two system-scoped, deprecated endpoints that conflate connection lifecycle with system linking:PATCH /system/{fides_key}/connectionPOST /(plus/)system/{fides_key}/connection/instantiate/{type}Both bake a single system into the connection-create/update call. That implicitly assumes one-integration-per-system semantics, and now that the linking refactor (#7432) supports multiple integrations per system, the system-scoped endpoints don't compose cleanly. The most visible symptom is the bug reported in ENG-3000: creating a SaaS integration with a system selected on the new Integrations page errors out / produces an incomplete connection. The patch path was made SaaS-aware in #7978, but it routes to template instantiation only when both
connection_type == 'saas'ANDsecretsis truthy (connection_service.py:476), so a SaaS connector with no required secrets falls through to the standard path and never builds asaas_configor dataset.The deprecation notes on both system-scoped endpoints already point at the right replacement: do connection work via the top-level
/connectionendpoints, then manage links viaPUT /connection/{key}/system-links.handleSubmitis refactored to that two-step flow:POST /connection/instantiate/{type}(createUnlinkedSassConnectionConfig); everything else (non-SaaS create, all edits) goes throughPATCH /connection(patchDatastoreConnection).PUT /connection/{key}/system-links— but only when the desired state differs frominitialSystemFidesKey, so common edits (e.g. updating only secrets) skip a redundant idempotent call. Passinglinks: []correctly unlinks, fixing the secondary bug where clearing the System field on edit silently left the prior link in place.The form no longer references
usePatchSystemConnectionConfigsMutation,useCreatePlusSaasConnectionConfigMutation, oruseCreateSassConnectionConfigMutation.2. Add an "Enable for privacy requests" toggle. The System → Integrations form already exposes the equivalent control via
ConnectorParametersForm, backed byConnectionConfig.disabled. The new top-level Integrations form was missing it, so once an integration was created its DSR-usage state could only be flipped by going back through the System page. Added aSwitchtoConfigureIntegrationForm(always visible, defaults to enabled, saved with the rest of the form on Save). Label and tooltip make the privacy-request scope visible in the form itself.3. Add a "Privacy request datasets" picker. Mirrors the dataset picker in System → Integrations: edit-only, gated to
SystemType.DATABASEintegrations, backed by the existinguseDatasetConfigFieldhook and the samePUT /connection/{key}/datasetconfigendpoint. DataHub keeps its own BigQuery-filtered picker untouched.4. Document
ConnectionConfig.disabledas a DSR-scoped flag. It excludes the connection from privacy request execution only — discovery monitors, connection tests, and other non-DSR consumers all have their own enable/disable controls. Added comments to the model column and the two related Pydantic schemas. No behaviour change.Code Changes
clients/admin-ui/src/features/integrations/add-integration/ConfigureIntegrationForm.tsx:systemPatchIsLoading.createUnlinkedSassConnectionConfig, everything else →patchDatastoreConnection.reconcileSystemLink()helper that fires only whenvalues.system_fides_key !== initialSystemFidesKey, sends[]to unlink, and consolidates the two priorsetSystemLinksinvocations.enabledform field (Switch) backed by!ConnectionConfig.disabled; defaulttruefor new integrations, mirror existing connection state on edit; route the value into the patch payload asdisabled: !values.enabled.Form.ItemforSystemType.DATABASEintegrations on edit, usinguseDatasetConfigField'sdropdownOptionsand the sharedDatasetSelectOptionrenderer; extend thepatchConnectionDatasetConfigcalls inhandleSubmitto fire for both DataHub and DATABASE-type edits.src/fides/api/models/connectionconfig.py: comment on thedisabledcolumn documenting that it gates DSR execution only.src/fides/api/schemas/connection_configuration/connection_config.py: matching comments onCreateConnectionConfiguration.disabledandConnectionConfigurationResponse.disabled.Steps to Confirm
In the new top-level Integrations management UI (
/integrations):DatasetConfigexists. Network tab:POST /api/v1/connection/instantiate/{type}thenPUT /api/v1/connection/{key}/system-links. No call to/system/{key}/connection.setSystemLinksis not called (no-op skip).GET /api/v1/connection/{key}/system-linksreturns[]).PATCH /connectionfollowed bysetSystemLinks. Connection works and is linked.saas_configand dataset are created.disabled: trueon the connection.connection.disabled(verify viaGET /api/v1/connection/{key}). Confirm a privacy request that would have hit this connection now skips it (e.g.graph_task.skip_if_disabledraisesCollectionDisabled).DatasetConfigset.Pre-Merge Checklist
CHANGELOG.mdupdated🤖 Generated with Claude Code