-
Notifications
You must be signed in to change notification settings - Fork 85
Add nox -s dev -- workers-all
and rename worker-other
#6445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This PR improves the local development workflow by adding a new workers-all
option to the Nox development session and renaming the generic worker
service to worker-other
for better clarity. The changes address a usability issue where the original worker
service was misleading because it excluded primary queues for DSR (Data Subject Request) and privacy preferences processing.
The implementation adds a workers-all
posarg to nox -s dev
that launches all three worker types simultaneously: worker-dsr
, worker-privacy-preferences
, and worker-other
. This eliminates the need for developers to manually specify each worker type when they want full worker functionality during local development. The renaming from worker
to worker-other
makes it explicit that this worker handles queues other than the dedicated DSR and privacy preference queues.
These changes integrate well with the existing Fides architecture, which uses Celery workers for background task processing. The Nox session pattern follows the established convention in the codebase for managing development services through Docker Compose.
Important Files Changed
Click to expand
Filename | Score | Overview |
---|---|---|
noxfiles/dev_nox.py | 4/5 | Adds workers-all functionality and updates documentation to reflect the worker to worker-other rename |
docker-compose.yml | 1/5 | Renames worker service to worker-other but breaks the flower service dependency |
Confidence score: 1/5
- This PR contains a breaking change that will prevent the flower monitoring service from starting
- Score lowered due to a critical dependency reference that wasn't updated when renaming the worker service
- Pay close attention to docker-compose.yml - the flower service still references the old
worker
service name
2 files reviewed, no comments
@greptileai take a second look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at this PR more carefully, I can see the changes are well-structured and accomplish the stated goals. Let me provide a more detailed review:
Positive Changes
-
Better naming convention: The rename from
worker
toworker-other
is much clearer - it explicitly indicates this worker excludes the main DSR/preferences queues, avoiding the "footgun" mentioned in the description. -
Convenient
workers-all
option: This is a nice DX improvement for local development - developers can easily spin up all workers with one command. -
Clean implementation: The logic for determining which workers to start is well-implemented using list comprehension and conditional checks.
Minor Observations
-
Docker Compose dependency cleanup: I notice the
flower
service no longer depends onworker
(nowworker-other
) in the docker-compose.yml. This makes sense since the nox script now handles the dependency logic more intelligently. -
Documentation: The help text in the nox function is comprehensive and clearly explains all the options.
-
Backwards compatibility: The change maintains all existing functionality while adding the new features.
Questions for consideration
-
Default behavior: Currently, if no worker arguments are provided, no workers start. Is this the intended behavior, or should there be a sensible default (like starting
worker-other
)? -
Error messaging: The flower error message could be more specific about which worker options are available.
Overall, this is a solid improvement to the developer experience. The changes are minimal, focused, and well-implemented. The renaming clarifies the purpose of each worker type, and the workers-all
option will definitely save time during local development.
worker-other
nox -s dev -- workers-all
and rename worker-other
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6445 +/- ##
==========================================
- Coverage 87.39% 87.38% -0.01%
==========================================
Files 457 457
Lines 29280 29280
Branches 3245 3245
==========================================
- Hits 25588 25587 -1
Misses 2983 2983
- Partials 709 710 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! tested manually and it worked
fides
|
Project |
fides
|
Branch Review |
main
|
Run status |
|
Run duration | 00m 56s |
Commit |
|
Committer | Neville Samuell |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
0
|
|
0
|
|
0
|
|
5
|
View all changes introduced in this branch ↗︎ |
Description Of Changes
This is a minor change to
nox -s dev
to add a new-- workers-all
posarg to launch all the worker types locally.This also does a slight rename from
nox -s dev -- worker
-->nox -s dev -- worker-other
, since that vanillaworker
service actually excludes the primary queues for DSR/preferences, which is a footgun for local dev.Code Changes
dev_nox.py
anddocker-compose.yml
Steps to Confirm
nox -s dev -- workers-all
,nox -s dev -- worker-dsr
, and others to ensure it works as expectedPre-Merge Checklist
CHANGELOG.md
updatedmain
downgrade()
migration is correct and works