Improve Celery worker visibility and configuration#7533
Merged
Conversation
added 2 commits
February 28, 2026 20:42
- Include run_privacy_request in worker stats kwargs allowlist so keyword_args are visible for privacy request tasks - Set worker_prefetch_multiplier to 1 so workers only fetch one task at a time, preventing task loss on worker crash - Add env_file to worker-other service in docker-compose so worker containers inherit .env overrides (e.g. FIDES__CELERY__TASK_ALWAYS_EAGER) Made-with: Cursor
Made-with: Cursor
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Contributor
Greptile SummaryThree focused improvements to Celery worker observability and reliability:
All changes are minimal, focused, and improve operational visibility during DSR execution. Confidence Score: 5/5
Important Files Changed
Last reviewed commit: ea1954d |
Linker44
approved these changes
Mar 1, 2026
galvana
added a commit
that referenced
this pull request
Mar 1, 2026
Co-authored-by: Adrian Galvan <galvana@uci.edu>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description Of Changes
Three small Celery worker improvements for better observability and reliability during DSR execution:
run_privacy_requestwas excluded from the kwargs allowlist in the/worker-statsendpoint, so itskeyword_argsalways showed asnull. Added it to the allowlist alongside the existing node tasks.worker_prefetch_multiplierto1so each worker only fetches one task at a time. This prevents task loss if a worker crashes (prefetched-but-unacked tasks would otherwise be lost with the defaultacks_late=Falsesetting).docker-compose.ymlwere not loading.env, so environment overrides likeFIDES__CELERY__TASK_ALWAYS_EAGER=falsewere not being applied to workers. Addedenv_file: - .envtoworker-other(inherited byworker-dsrandworker-privacy-preferences).Code Changes
src/fides/api/schemas/worker.py— Addedrun_privacy_requestto the kwargs allowlist inTaskDetails.from_celery_tasksrc/fides/api/tasks/__init__.py— Addedworker_prefetch_multiplier: 1to celery configdocker-compose.yml— Addedenv_file: - .envtoworker-otherserviceSteps to Confirm
nox -s "dev(slim)" -- workers-all)FIDES__CELERY__TASK_ALWAYS_EAGER=falsein.envGET /api/v1/worker-statskeyword_argsis populated forrun_privacy_requesttasksrun_access_node, etc.) appear as separate active/reserved tasks on the DSR workerPre-Merge Checklist
CHANGELOG.mdupdatedMade with Cursor