Skip to content

feat(scheduler): ship default boost_collector_schedule.yaml and guard non-empty Beat#222

Merged
wpak-ai merged 2 commits into
cppalliance:developfrom
snowfox1003:feat/celery-beat-default-schedule-yaml
May 19, 2026
Merged

feat(scheduler): ship default boost_collector_schedule.yaml and guard non-empty Beat#222
wpak-ai merged 2 commits into
cppalliance:developfrom
snowfox1003:feat/celery-beat-default-schedule-yaml

Conversation

@snowfox1003
Copy link
Copy Markdown
Collaborator

@snowfox1003 snowfox1003 commented May 19, 2026

Summary

  • Add committed config/boost_collector_schedule.yaml so fresh clones load a non-empty Celery Beat schedule (no silent {} from a missing file).
  • Stop gitignoring that path; update deploy and collector docs so onboarding no longer copies a local-only schedule.
  • Add a regression test that the committed YAML parses, every enabled task maps to a real Django management command, and get_beat_schedule() is non-empty.
  • Extend CI compose smoke and make health to assert len(settings.CELERY_BEAT_SCHEDULE) > 0.

Test plan

  • python -m pytest boost_collector_runner/tests/test_schedule_config.py -q
  • python manage.py shell -c "from django.conf import settings; assert len(settings.CELERY_BEAT_SCHEDULE) > 0"
  • (optional) make health with stack up after migrate

Closes #209

Summary by CodeRabbit

  • New Features

    • Added a committed, pre-configured collector schedule (GitHub, Slack, mailing list) with daily/monthly/on-release entries.
  • Tests

    • Added an integration test to ensure the committed schedule loads and yields a non-empty beat schedule.
  • Chores

    • CI and local health checks now verify the Celery Beat schedule is present.
  • Documentation

    • Updated deployment and collector-adding docs to reflect the committed schedule and workflow.

Review Change Stack

@snowfox1003 snowfox1003 self-assigned this May 19, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 52b9c8ac-b287-42f5-9a28-9ed6349cc672

📥 Commits

Reviewing files that changed from the base of the PR and between 7bf1b7e and 6857067.

📒 Files selected for processing (7)
  • .github/workflows/actions.yml
  • .gitignore
  • Makefile
  • boost_collector_runner/tests/test_schedule_config.py
  • config/boost_collector_schedule.yaml
  • docs/Deployment.md
  • docs/How_to_add_a_collector.md
💤 Files with no reviewable changes (1)
  • .gitignore

📝 Walkthrough

Walkthrough

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

Changes

Celery Beat Schedule Configuration

Layer / File(s) Summary
Schedule Configuration and Integration Test
config/boost_collector_schedule.yaml, boost_collector_runner/tests/test_schedule_config.py
Introduces config/boost_collector_schedule.yaml with grouped schedules and default times. Adds imports and a new @pytest.mark.django_db test that loads the committed YAML, verifies enabled task commands are registered via get_commands(), and asserts get_beat_schedule() is non-empty.
Repository Configuration Update
.gitignore
Removes config/boost_collector_schedule.yaml from ignores and adds a # temp files section ignoring temp/ and nul.
CI and Local Health Check Verification
.github/workflows/actions.yml, Makefile
Adds a compose-smoke workflow step and a make health check that run a Django shell inside the web container to compute and print len(settings.CELERY_BEAT_SCHEDULE) and fail if empty. Updates help output to mention Celery Beat schedule verification.
Deployment and Integration Documentation
docs/Deployment.md, docs/How_to_add_a_collector.md
Updates deployment instructions to adjust the schedule via PR instead of copying an example; clarifies that config/boost_collector_schedule.yaml is committed and .env.example documents required env vars.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • wpak-ai
  • jonathanMLDev

Poem

🐇 A YAML now lives where commits roam,
No more empty schedules left all alone.
Tests peek inside, CI gives a glance,
Beat ticks steady — collectors dance.
Hop, run, and log — the rabbit says: advance!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately and concisely summarizes the main objective: shipping a default schedule YAML file and adding guardrails to ensure a non-empty Beat schedule.
Linked Issues check ✅ Passed All acceptance criteria from issue #209 are met: committed schedule YAML file is present, non-empty schedule is verified via tests and CI, documentation is updated, and Celery Beat guards ensure schedule completeness.
Out of Scope Changes check ✅ Passed All changes are directly aligned with the linked issue #209 objectives: schedule YAML, guards, tests, documentation updates, and CI verification are all in scope.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7bf1b7e and f4751b6.

📒 Files selected for processing (7)
  • .github/workflows/actions.yml
  • .gitignore
  • Makefile
  • boost_collector_runner/tests/test_schedule_config.py
  • config/boost_collector_schedule.yaml
  • docs/Deployment.md
  • docs/How_to_add_a_collector.md
💤 Files with no reviewable changes (1)
  • .gitignore

Comment thread Makefile Outdated
@snowfox1003
Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

✅ Actions performed

Full review triggered.

@snowfox1003 snowfox1003 requested a review from jonathanMLDev May 19, 2026 18:01
@jonathanMLDev jonathanMLDev requested a review from wpak-ai May 19, 2026 19:13
@wpak-ai wpak-ai merged commit b27d9da into cppalliance:develop May 19, 2026
5 checks passed
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.

Ship YAML Schedule File in Repo

3 participants