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

Accept an arbitrary path to /migrations in config #612

Closed
PSalant726 opened this issue Jun 8, 2022 · 4 comments
Closed

Accept an arbitrary path to /migrations in config #612

PSalant726 opened this issue Jun 8, 2022 · 4 comments
Assignees
Labels
bug Something isn't working dev experience Enhancements to the overall DX

Comments

@PSalant726
Copy link
Contributor

Bug Description

PyPI installs the fidesops /migrations directory outside of the 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.

Steps to Reproduce

  1. pip install fidesops
  2. docker run -it --rm fidesops_fidesops bash
  3. Inside the container, observe:
    $ tree -L 2 /usr/local/lib/python3.9/site-packages/
    site-packages/
    ├─ fidesops/
    │  ├─ __init__.py
    │  ├─ ...
    ├─ migrations/
    │  ├─ versions/
    │  ├─ __init__.py
    │  ├─ ...
    ├─ ...
    

Expected behavior

Fidesops may accept an arbitrary file path to the /migrations directory via ENV variable configuration.

Additional context

This is required for fidesops-plus to start successfully.

@PSalant726 PSalant726 added bug Something isn't working dev experience Enhancements to the overall DX labels Jun 8, 2022
@PSalant726 PSalant726 self-assigned this Jun 8, 2022
@PSalant726 PSalant726 changed the title Accept an arbitrary path to /migrations in config files Accept an arbitrary path to /migrations in config Jun 8, 2022
@PSalant726
Copy link
Contributor Author

Thinking more about the changes on #613, it might be better to simply move the /migrations directory inside of /fidesops instead. Thoughts @seanpreston @sanders41 ?

@sanders41
Copy link
Contributor

I haven't seen migrations inside the package directory before, but this is a unique case. I think the idea of putting it in /fidesops makes sense here. pip install fidesops resulting in migrations being installed as it's own module in the virtual environment makes it unclear why the module is there, or where to find it when wanting to use it.

@PSalant726
Copy link
Contributor Author

@sanders41

I haven't seen migrations inside the package directory before

It turns out that it's done this way in fidesctl. That's where I got the idea.

pip install fidesops resulting in migrations being installed as it's own module in the virtual environment makes it unclear why the module is there, or where to find it when wanting to use it.

I completely agree. Closing this issue and #613 in favor of #615.

@PSalant726 PSalant726 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working dev experience Enhancements to the overall DX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@PSalant726 @sanders41 and others