Make LongBridge heartbeat scheduler-aware#146
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c09861d5f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| minute_values = _cron_field_values(minute, minimum=0, maximum=59) | ||
| hour_values = _cron_field_values(hour, minimum=0, maximum=23) | ||
| dom_values = _cron_field_values(day_of_month, minimum=1, maximum=31) | ||
| month_values = _cron_field_values(month, minimum=1, maximum=12) |
There was a problem hiding this comment.
Handle Cloud Scheduler month names
Cloud Scheduler accepts month names (JAN through DEC) in the month field per the Google Cloud cron-format docs, but this parser only supplies a names table for day-of-week. When a valid scheduler job for one of these services uses a schedule such as 45 15 * JAN *, _cron_token_value() tries int('jan'), raising ValueError; that exception is not caught by _resolve_required_services, so the heartbeat workflow exits instead of checking or safely skipping the service.
Useful? React with 👍 / 👎.
Summary
Tests
PYTHONPATH=. python -m pytest -q tests/test_execution_report_heartbeat.pybash tests/test_sync_cloud_run_env_workflow.shpython -m ruff check scripts/execution_report_heartbeat.py tests/test_execution_report_heartbeat.pypython -m py_compile scripts/execution_report_heartbeat.py tests/test_execution_report_heartbeat.py