feat(scheduler): ship default boost_collector_schedule.yaml and guard non-empty Beat#222
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR commits a production Celery Beat schedule YAML, removes it from .gitignore, adds a test to validate the committed schedule and referenced management commands, adds CI and local health checks to verify the schedule loads, and updates deployment/contributor docs. ChangesCelery Beat Schedule Configuration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Makefile`:
- Line 101: Replace the Python in-shell assertion used in the Makefile CI health
check (the command invoking python manage.py shell that reads
settings.CELERY_BEAT_SCHEDULE) with explicit exit logic that uses sys.exit()
when the schedule length is zero so the check cannot be bypassed by optimized
Python; locate the shell invocation string (the target using COMPOSE and APP
invoking "from django.conf import settings; n =
len(settings.CELERY_BEAT_SCHEDULE); assert n > 0, 'CELERY_BEAT_SCHEDULE is
empty'; print(...)" ) and change it to import sys and call sys.exit(1) with a
clear message if n == 0, and make the identical replacement in the equivalent CI
workflow command that performs the same check.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: efe9dccb-97cc-46e5-9a93-61586834077b
📒 Files selected for processing (7)
.github/workflows/actions.yml.gitignoreMakefileboost_collector_runner/tests/test_schedule_config.pyconfig/boost_collector_schedule.yamldocs/Deployment.mddocs/How_to_add_a_collector.md
💤 Files with no reviewable changes (1)
- .gitignore
… to handle empty schedules gracefully
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
Summary
config/boost_collector_schedule.yamlso fresh clones load a non-empty Celery Beat schedule (no silent{}from a missing file).get_beat_schedule()is non-empty.make healthto assertlen(settings.CELERY_BEAT_SCHEDULE) > 0.Test plan
python -m pytest boost_collector_runner/tests/test_schedule_config.py -qpython manage.py shell -c "from django.conf import settings; assert len(settings.CELERY_BEAT_SCHEDULE) > 0"make healthwith stack up aftermigrateCloses #209
Summary by CodeRabbit
New Features
Tests
Chores
Documentation