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

Allows worker to start successfully in both dev and dev_with_worker #1250

Merged
merged 3 commits into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ The types of changes are:

* Fix issue with fideslog event loop errors [#1174](https://github.com/ethyca/fidesops/pull/1174)
* Allow passwords to be sent either base64 encode or as plaintext. [#1236](https://github.com/ethyca/fidesops/pull/1236)
* Allow worker to start up successfully for dev and dev_with_worker nox commands [#1250](https://github.com/ethyca/fidesops/pull/1250)

## [1.7.2](https://github.com/ethyca/fidesops/compare/1.7.1...1.7.2)

Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ services:
- FIDESOPS__LOG_PII=${FIDESOPS__LOG_PII}
- FIDESOPS__HOT_RELOAD=${FIDESOPS__HOT_RELOAD}
- FIDESOPS__ROOT_USER__ANALYTICS_ID=${FIDESOPS__ROOT_USER__ANALYTICS_ID}
- FIDESOPS__EXECUTION__WORKER_ENABLED=True

db:
image: postgres:12
Expand Down
4 changes: 2 additions & 2 deletions noxfiles/dev_nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ def dev(session: nox.Session) -> None:

@nox.session()
def dev_with_worker(session: nox.Session) -> None:
"""Spin up the entire application and open a development shell."""
"""Spin up the entire application with the celery worker in a separate container."""
build(session, "dev")
session.notify("teardown")
session.run("docker-compose", "up", "worker", "--wait", external=True)
session.run("docker-compose", "up", "--detach", "worker", external=True)
Copy link
Contributor Author

@eastandwestwind eastandwestwind Sep 2, 2022

Choose a reason for hiding this comment

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

using the "--wait" flag properly: session.run("docker-compose", "up", "--wait", "worker", external=True) resulted in fidesops container never starting. This is because the wait flag will block until the current container exits (https://docs.docker.com/engine/reference/commandline/wait/). Celery container should not exit.

session.run(
"docker-compose",
"run",
Expand Down