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

scrub database dump: implement Heroku client and postgres client (2/3) #224

Open
wants to merge 2 commits into
base: ow/scrub-script
Choose a base branch
from

Conversation

odo-sfct
Copy link
Collaborator

@odo-sfct odo-sfct commented Jun 9, 2024

Part 1 | Part 2 | Part 3

  • Builds a Heroku client for a python script to call heroku cli with subprocess.
    Opted for writing in python over a shell script for error handling and integration with Django's base commands which can take care of connecting to the ORM + maintainability of python over shell scripts.

The heroku client can in the future be expanded to use the API or other CLI tools for other downstream scripts.

  • Builds a Postgres client mainly for scrubbing using the psql.
    Implementation creates a temporary database so that the process is "transactional" in nature. There won't be partial state, or PII getting into the target device unless the full process is successful.

It was much easier to leverage Djangos ORM and faker library if built in python over a shell script.

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.

1 participant