Skip to content

Conversation

NevilleS
Copy link
Contributor

@NevilleS NevilleS commented Aug 11, 2025

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 vanilla worker service actually excludes the primary queues for DSR/preferences, which is a footgun for local dev.

Code Changes

  • Update dev_nox.py and docker-compose.yml

Steps to Confirm

  1. Run nox -s dev -- workers-all, nox -s dev -- worker-dsr, and others to ensure it works as expected

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change (i.e. potential for performance impact or unexpected regression) that should be flagged
    • Updates unreleased work already in Changelog, no new entry necessary
  • Followup issues:
    • Followup issues created
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

Copy link

vercel bot commented Aug 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored Preview Aug 12, 2025 3:55pm
fides-privacy-center ⬜️ Ignored Aug 12, 2025 3:55pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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

Edit Code Review Bot Settings | Greptile

@NevilleS NevilleS requested a review from erosselli August 11, 2025 21:09
@NevilleS
Copy link
Contributor Author

@greptileai take a second look

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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

  1. Better naming convention: The rename from worker to worker-other is much clearer - it explicitly indicates this worker excludes the main DSR/preferences queues, avoiding the "footgun" mentioned in the description.

  2. Convenient workers-all option: This is a nice DX improvement for local development - developers can easily spin up all workers with one command.

  3. Clean implementation: The logic for determining which workers to start is well-implemented using list comprehension and conditional checks.

Minor Observations

  1. Docker Compose dependency cleanup: I notice the flower service no longer depends on worker (now worker-other) in the docker-compose.yml. This makes sense since the nox script now handles the dependency logic more intelligently.

  2. Documentation: The help text in the nox function is comprehensive and clearly explains all the options.

  3. Backwards compatibility: The change maintains all existing functionality while adding the new features.

Questions for consideration

  1. 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)?

  2. 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.

@galvana galvana changed the title Add 'nox -s dev -- workers-all' and rename worker-other Add nox -s dev -- workers-all and rename worker-other Aug 11, 2025
Copy link

codecov bot commented Aug 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.38%. Comparing base (f2fdadb) to head (9631b07).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@erosselli erosselli left a 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

@NevilleS NevilleS merged commit 4ebd4dd into main Aug 12, 2025
43 checks passed
@NevilleS NevilleS deleted the ns-fides-hot-reload-all branch August 12, 2025 16:17
Copy link

cypress bot commented Aug 12, 2025

fides    Run #13228

Run Properties:  status check passed Passed #13228  •  git commit 4ebd4ddfcf: Add `nox -s dev -- workers-all` and rename `worker-other` (#6445)
Project fides
Branch Review main
Run status status check passed Passed #13228
Run duration 00m 56s
Commit git commit 4ebd4ddfcf: Add `nox -s dev -- workers-all` and rename `worker-other` (#6445)
Committer Neville Samuell
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 5
View all changes introduced in this branch ↗︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants