Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support connectors in datamap api #2249

Merged
merged 26 commits into from
Jan 20, 2023

Conversation

TheAndrewJackson
Copy link
Contributor

@TheAndrewJackson TheAndrewJackson commented Jan 16, 2023

Closes https://github.com/ethyca/fidesplus/issues/498

Code Changes

  • Add ctl_systems foreign key to the connnectionconfig table
  • Added new connection patch route that is identical other than requiring a system fides key in order to call it. It links the connections to that system
  • Added new connection get route that returns all of the connections related to a particular system
  • Updated the base get_connections route to have a filter for connections not linked with a system

Steps to Confirm

New routes

  • Start server with nox -s dev
  • Create a system through postman, pgadmin, etc
  • Call the new patch route and create new connections linked with that system
  • Call the new get route and check that it return all of the connections linked with that system

Updated route

  • Start server with nox -s dev
  • Create some connections with the original connections patch route
  • Call the base get_connections route with orphaned_from_system=true as the query param and make sure it returns all of the connections without linked systems.

Pre-Merge Checklist

Description Of Changes

These changes are for future UI updates that will have connectors integrate with the datamap UI. This PR will also support future changes to system and connector creation. Eventually the UI will enforce that all new connections are linked to a system upon creation. The new patch route will enforce that from the backend.

The new orphaned_from_system query param is to give us a way to help users migrate their orphaned connections and link them with systems.

@TheAndrewJackson TheAndrewJackson marked this pull request as ready for review January 17, 2023 19:31
@TheAndrewJackson TheAndrewJackson requested a review from a team January 17, 2023 19:31
@pattisdr pattisdr self-requested a review January 18, 2023 16:56
Copy link
Contributor

@pattisdr pattisdr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay reviewing this @TheAndrewJackson I kept getting sidetracked on other things. Good set of changes here to link connectors to systems in a non-aggressive way. Requested changes should be quick to address.

Also thanks for your github comments on various code lines. I always appreciate it when devs take time to annotate their code to help reviewers.

CHANGELOG.md Outdated Show resolved Hide resolved
src/fides/api/ctl/routes/system.py Show resolved Hide resolved
src/fides/api/ctl/routes/system.py Show resolved Hide resolved
src/fides/api/ctl/routes/system.py Outdated Show resolved Hide resolved
src/fides/api/ctl/routes/system.py Show resolved Hide resolved
src/fides/api/ctl/routes/system.py Show resolved Hide resolved
src/fides/api/ops/api/v1/endpoints/connection_endpoints.py Outdated Show resolved Hide resolved
tests/ops/api/v1/endpoints/test_system.py Show resolved Hide resolved
While doing this commit I found some issues with the previous patching commit. Fixing them required making a new connections util module to avoid circular dependencies
@TheAndrewJackson
Copy link
Contributor Author

@pattisdr Thanks for the awesome review! All of your feedback should be implemented now. I'm not sure why so many of the CI jobs are failing. It looks like none of the tests are actually running. I'll look into it

@TheAndrewJackson
Copy link
Contributor Author

@pattisdr Everything is fixed now 👍 Now the only issue is the code climate stuff I mentioned

@pattisdr
Copy link
Contributor

thanks @TheAndrewJackson will take a look

Copy link
Contributor

@pattisdr pattisdr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work @TheAndrewJackson thanks for those refactors. just some housekeeping with the changelog and it's good to go

@TheAndrewJackson TheAndrewJackson merged commit 234fbdd into main Jan 20, 2023
@TheAndrewJackson TheAndrewJackson deleted the ajackson_498_connectors_in_datamap_api branch January 20, 2023 21:34
@pattisdr pattisdr mentioned this pull request Jan 20, 2023
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants