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

Conversation

@PSalant726
Copy link
Contributor

@PSalant726 PSalant726 commented Jun 9, 2022

Purpose

When installing fidesops via PyPI, the migrations package is installed outside of the fidesops package source tree, in a sibling directory of /fidesops. Currently there is no way to specify a path to DB migrations that exists outside of the /fidesops package source tree.

The fidesops-plus repository requires access to the database migrations in order to start the API server.

Changes

  • Move the migrations package into the core fidesops package
  • Update all references to the /migrations directory
  • Remove the now unused PackageSettings class

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 #615

@PSalant726 PSalant726 added enhancement New feature or request dev experience Enhancements to the overall DX high-risk This issue suggests changes that have a high-probability of breaking existing code run unsafe ci checks Triggers running of unsafe CI checks labels Jun 9, 2022
@PSalant726 PSalant726 requested a review from sanders41 June 9, 2022 00:26
@PSalant726 PSalant726 self-assigned this Jun 9, 2022
Copy link
Contributor

@sanders41 sanders41 left a comment

Choose a reason for hiding this comment

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

Before merging this we will need to figure out the best way to handle open PRs that contain migrations. I know at least @pattisdr has a PR with a migration.

I guess a rebase and moving the migration file would work?

@pattisdr
Copy link
Contributor

pattisdr commented Jun 9, 2022

thanks for the heads-up on migrations Paul, since #591 was just merged, that's one migration that will need to be moved before this work is merged

@PSalant726
Copy link
Contributor Author

I guess a rebase and moving the migration file would work?

@sanders41 Yea exactly. In the past we've unfortunately just had to ask anyone with open PRs to rebase once a PR like this one is merged.

@pattisdr I've merged in main and handled the new migration from #591. Thanks for the heads up!

@PSalant726 PSalant726 requested a review from sanders41 June 9, 2022 16:01
@sanders41
Copy link
Contributor

@PSalant726 All looks, but there is a merge conflict with CONTRIBUTING.md now.

@PSalant726 PSalant726 changed the base branch from main to deploy-v1.5.3 June 9, 2022 16:58
@PSalant726 PSalant726 force-pushed the move-migrations-into-fidesops branch from ec357fb to ca95dc1 Compare June 9, 2022 17:03
@PSalant726 PSalant726 force-pushed the move-migrations-into-fidesops branch from ca95dc1 to dee651b Compare June 9, 2022 17:05
@PSalant726 PSalant726 merged commit fc04d8b into deploy-v1.5.3 Jun 9, 2022
@PSalant726 PSalant726 deleted the move-migrations-into-fidesops branch June 9, 2022 17:23
PSalant726 added a commit that referenced this pull request Jun 10, 2022
* Move the `migrations` package into the `fidesops` package (#620)

* Move `/migrations` into core fidesops package

Also moves the `alembic.ini` file.

* Update references to the `/migrations` dir

* Remove unused `PackageSettings`

* Update `CHANGELOG.md`

* Correct the path to `alembic.ini`

* Correctly resolve config paths

* Update `CHANGELOG.md` for patch release 1.5.3 (#623)

* move migration

Co-authored-by: Phil Salant <PSalant726@users.noreply.github.com>
sanders41 pushed a commit that referenced this pull request Sep 22, 2022
* Move the `migrations` package into the `fidesops` package (#620)

* Move `/migrations` into core fidesops package

Also moves the `alembic.ini` file.

* Update references to the `/migrations` dir

* Remove unused `PackageSettings`

* Update `CHANGELOG.md`

* Correct the path to `alembic.ini`

* Correctly resolve config paths

* Update `CHANGELOG.md` for patch release 1.5.3 (#623)

* move migration

Co-authored-by: Phil Salant <PSalant726@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dev experience Enhancements to the overall DX enhancement New feature or request high-risk This issue suggests changes that have a high-probability of breaking existing code run unsafe ci checks Triggers running of unsafe CI checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move the migrations package into the fidesops package

4 participants