refactor: FastAPI -> Django migration #41

Merged
mcataford merged 11 commits from feat/django-migration into main 2023-11-27 02:34:10 +00:00
mcataford commented 2023-11-17 06:13:53 +00:00 (Migrated from github.com)

Description

This changeset migrates the backend from FastAPI to Django. The main rationale behind it is about framework stability and ecosystem - Django is closer to "the devil you know" and has a bigger contributor base at the moment, making it more likely to weather the storm.

The need for async support is what had initially motivated the choice to play with FastAPI, but Django's async support seems decent enough to enable what needs enablin'.

Being early on in the project, it's a now-or-never scenario.

Approach

Django is first introduced as a parallel path under backend/rotini_django and has its own variant of the tooling (see Taskfile.backend.yml). Then the APIs are moved over to the Django app until it's at parity. Then rotini_django -> rotini.

# Description This changeset migrates the backend from FastAPI to Django. The main rationale behind it is about framework stability and ecosystem - Django is closer to "the devil you know" and has a bigger contributor base at the moment, making it more likely to weather the storm. The need for async support is what had initially motivated the choice to play with FastAPI, but Django's async support seems decent enough to enable what needs enablin'. Being early on in the project, it's a now-or-never scenario. # Approach Django is first introduced as a parallel path under `backend/rotini_django` and has its own variant of the tooling (see `Taskfile.backend.yml`). Then the APIs are moved over to the Django app until it's at parity. Then `rotini_django -> rotini`.
gitguardian[bot] commented 2023-11-17 06:13:56 +00:00 (Migrated from github.com)

⚠️ GitGuardian has uncovered 3 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id Secret Commit Filename
8785839 Django Secret Key 205f661cd0 backend/rotini_django/base/settings.py View secret
8785839 Django Secret Key c7e49abff1 backend/rotini_django/base/settings.py View secret
8785839 Django Secret Key 2db0d9ec62 backend/rotini/base/settings.py View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

#### ⚠️ GitGuardian has uncovered 3 secrets following the scan of your pull request. Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components. <details> <summary>🔎 Detected hardcoded secrets in your pull request</summary> <br> | GitGuardian id | Secret | Commit | Filename | | | -------------- | ------------------------- | ---------------- | --------------- | -------------------- | | [8785839](https://dashboard.gitguardian.com/incidents/8785839?occurrence=119618999) | Django Secret Key | 205f661cd0cff66ef06e01015acfc7b78e6c3629 | backend/rotini_django/base/settings.py | [View secret](https://github.com/mcataford/rotini/commit/205f661cd0cff66ef06e01015acfc7b78e6c3629#diff-4578ca4c0a8f6f5a102290b4c1310398a9683dbfcc8c8923d3a2afb25bf53b18R23) | | [8785839](https://dashboard.gitguardian.com/incidents/8785839?occurrence=119734475) | Django Secret Key | c7e49abff1f3a9c0b056b8b1ae8f87065c5f8495 | backend/rotini_django/base/settings.py | [View secret](https://github.com/mcataford/rotini/commit/c7e49abff1f3a9c0b056b8b1ae8f87065c5f8495#diff-4578ca4c0a8f6f5a102290b4c1310398a9683dbfcc8c8923d3a2afb25bf53b18L23) | | [8785839](https://dashboard.gitguardian.com/incidents/8785839?occurrence=120143933) | Django Secret Key | 2db0d9ec62d1ce69c71b50995309badbd803eb67 | backend/rotini/base/settings.py | [View secret](https://github.com/mcataford/rotini/commit/2db0d9ec62d1ce69c71b50995309badbd803eb67#diff-b44f02bd5e3d58d66312bd7588c4ce8564e6819c52c0e518eebdda136626cc14L14) | </details> <details> <summary>🛠 Guidelines to remediate hardcoded secrets</summary> <br> 1. Understand the implications of revoking this secret by investigating where it is used in your code. 2. Replace and store your secrets safely. [Learn here](https://blog.gitguardian.com/secrets-api-management?utm_source=product&amp;utm_medium=GitHub_checks&amp;utm_campaign=check_run_comment) the best practices. 3. Revoke and [rotate these secrets](https://docs.gitguardian.com/secrets-detection/detectors/specifics/secret_key_in_django_config#revoke-the-secret?utm_source=product&amp;utm_medium=GitHub_checks&amp;utm_campaign=check_run_comment). 4. If possible, [rewrite git history](https://blog.gitguardian.com/rewriting-git-history-cheatsheet?utm_source=product&amp;utm_medium=GitHub_checks&amp;utm_campaign=check_run_comment). Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data. To avoid such incidents in the future consider - following these [best practices](https://blog.gitguardian.com/secrets-api-management/?utm_source=product&amp;utm_medium=GitHub_checks&amp;utm_campaign=check_run_comment) for managing and storing secrets including API keys and other credentials - install [secret detection on pre-commit](https://docs.gitguardian.com/ggshield-docs/integrations/git-hooks/pre-commit?utm_source=product&amp;utm_medium=GitHub_checks&amp;utm_campaign=check_run_comment) to catch secret before it leaves your machine and ease remediation. </details> --- <sup>🦉 [GitGuardian](https://dashboard.gitguardian.com/auth/login/?utm_medium=checkruns&amp;utm_source=github&amp;utm_campaign=cr1) detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.<br/><br/>Our GitHub checks need improvements? [Share your feedbacks](https://050127dayho.typeform.com/to/KmeAPTMk)!</sup>
mcataford commented 2023-11-27 01:44:43 +00:00 (Migrated from github.com)

Note: placeholder secrets previously included were rotated.

Note: placeholder secrets previously included were rotated.
This repo is archived. You cannot comment on pull requests.
No description provided.