Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Add ConnectionConfig Search [#609] #641

Merged
merged 6 commits into from
Jun 14, 2022

Conversation

pattisdr
Copy link
Contributor

@pattisdr pattisdr commented Jun 13, 2022

❗ Contains schema migration; verify downrev before merging

Purpose

Allow searching name, key, and description ConnectionConfig fields. We didn't have the description field, so adding this here.

Changes

  • Adds field ConnectionConfig.description
  • Allow ConnectionConfig.description to be updated via PATCH /connectionconfig
  • Add searching of ConnectionConfigs with a search query param: GET /connectionconfig/?search=postgres

Checklist

  • Update CHANGELOG.md file
    • Merge in main so the most recent CHANGELOG.md file is being appended to
    • Add description within the Unreleased section in an appropriate category. Add a new category from the list at the top of the file if the needed one isn't already there.
    • Add a link to this PR at the end of the description with the PR number as the text. example: #1
  • Applicable documentation updated (guides, quickstart, postman collections, tutorial, fidesdemo, database diagram.
  • If docs updated (select one):
    • documentation complete, or draft/outline provided (tag docs-team to complete/review on this branch)
    • documentation issue created (tag docs-team to complete issue separately)
  • Good unit test/integration test coverage
  • This PR contains a DB migration. If checked, the reviewer should confirm with the author that the down_revision correctly references the previous migration before merging
  • The Run Unsafe PR Checks label has been applied, and checks have passed, if this PR touches any external services

Ticket

Fixes #609

…cription fields.

- Add field ConnectionConfig.description
- Allow ConnectionConfig.description to be updated via PATCH /connectionconfig
@pattisdr pattisdr marked this pull request as ready for review June 13, 2022 18:56
@pattisdr
Copy link
Contributor Author

@ethyca/docs-authors small change to guides regarding how to search ConnectionConfigs

Copy link
Contributor

@conceptualshark conceptualshark left a comment

Choose a reason for hiding this comment

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

👍 Docs-approved!


resp = api_client.get(url + "?search=postgres", headers=auth_header)
assert resp.status_code == 200
assert len(resp.json()["items"]) == 2
Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be good to assert there's some consistent ordering to this result

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will do-

@pattisdr
Copy link
Contributor Author

Getting this updated now and adjusting migration downrev ^

Conflicts:
CHANGELOG.md
docs/fidesops/docs/guides/database_connectors.md
src/fidesops/schemas/connection_configuration/connection_config.py
tests/api/v1/endpoints/test_connection_config_endpoints.py
tests/api/v1/endpoints/test_policy_webhook_endpoints.py
tests/fixtures/postgres_fixtures.py
@pattisdr pattisdr added the run unsafe ci checks Triggers running of unsafe CI checks label Jun 14, 2022
@pattisdr
Copy link
Contributor Author

pattisdr commented Jun 14, 2022

updated; hubspot test failure unrelated ^

@TheAndrewJackson TheAndrewJackson merged commit 243050d into main Jun 14, 2022
@TheAndrewJackson TheAndrewJackson deleted the fidesops_609_datastore_search branch June 14, 2022 18:59
sanders41 pushed a commit that referenced this pull request Sep 22, 2022
* Add search on connectionconfig field that examines name, key, and description fields.

- Add field ConnectionConfig.description
- Allow ConnectionConfig.description to be updated via PATCH /connectionconfig

* Add search to the guides and update changelog.

* New description key returned in response.

* Bump downrev.

* Add ordering assertion to test.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
run unsafe ci checks Triggers running of unsafe CI checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Datastore Management] Add search to datastore retrieval endpoint
4 participants