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

Fix Hot Reloading#59

Merged
eastandwestwind merged 2 commits into
mainfrom
more-hot-reload
Nov 11, 2021
Merged

Fix Hot Reloading#59
eastandwestwind merged 2 commits into
mainfrom
more-hot-reload

Conversation

@pattisdr
Copy link
Copy Markdown
Contributor

@pattisdr pattisdr commented Nov 10, 2021

Purpose

Fix hot reloading again, while making sure the solution doesn't cause importlib.metadata.PackageNotFoundError: fidesops. A fix to one can break the other and vice versa.

While we improved hot reloading recently, #18, a separate fix to build the python package for fidesops on a fresh install #48 broke hot reloading again (it looks like watchgod is working, but it's deceptive, the actual file changes aren't reloaded).

Changes

  • Whitelist the .egg-info directory to keep the copy of fidesops on the host machine from overriding it, so when we do make server we can find the fidesops package.
  • Revert Dockerfile to make the WORKDIR be '/fidesops` before building the python package for fidesops, which we seem to need for reloading.

To test

  • On a completely fresh install run make server and make sure 1) fidesops gets installed properly and 2) hit an API endpoint, make a change to that endpoint and hit the endpoint again and make sure the actual file changes were reloaded and are reflected in the response

Notes

These resources were super useful:

Ticket

[unticketed]

…t machine from overriding it, so when we do "make server" we can find the fidesops package.
@pattisdr pattisdr changed the title Fix Hot Reloading Again Fix Hot Reloading Nov 11, 2021
Copy link
Copy Markdown
Contributor

@eastandwestwind eastandwestwind left a comment

Choose a reason for hiding this comment

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

Confirmed this worked for me! Nice work @pattisdr

@eastandwestwind eastandwestwind merged commit a7d2333 into main Nov 11, 2021
@eastandwestwind eastandwestwind deleted the more-hot-reload branch November 11, 2021 19:10
sanders41 pushed a commit that referenced this pull request Sep 22, 2022
* Whitelist .egg-info directory to keep the copy of fidesops on the host machine from overriding it, so when we do "make server" we can find the fidesops package.

* Remove redundant setting of WORKDIR.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants