Skip to content

🪲 BUG-#250: Fix _crontab_to_aws to convert */N to 0/N for EventBridge - #251

Merged
FernandoCelmer merged 3 commits into
developfrom
feature/250
Apr 11, 2026
Merged

FernandoCelmer merged 3 commits into
developfrom
feature/250

Conversation

@FernandoCelmer

Copy link
Copy Markdown
Member

Summary

  • Add _fix_step() helper to convert */N to 0/N in all cron fields
  • Apply to _crontab_to_aws in dotflow/cloud/aws/schedule.py
  • Apply same fix to template/hooks/post_gen_project.py
  • Update and add tests for step value conversion

Problem

AWS EventBridge does not support */N syntax in cron expressions. It requires start/step format (e.g. 0/5). The previous _crontab_to_aws passed */N through unchanged, generating invalid schedules that fail at deploy time.

Examples

Input (crontab) Before (invalid) After (valid)
*/5 * * * * cron(*/5 * * * ? *) cron(0/5 * * * ? *)
0 */6 * * * cron(0 */6 * * ? *) cron(0 0/6 * * ? *)
30 2 * * * cron(30 2 * * ? *) cron(30 2 * * ? *) (unchanged)

Test plan

  • test_crontab_every_5_minutes — */5 → 0/5
  • test_crontab_step_in_hours — */6 in hours → 0/6
  • test_crontab_no_step_unchanged — fields without */ are not modified
  • All 13 schedule tests pass

Closes #250

@FernandoCelmer
FernandoCelmer merged commit 2bbb420 into develop Apr 11, 2026
10 checks passed
@FernandoCelmer
FernandoCelmer deleted the feature/250 branch April 11, 2026 21:49
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.

1 participant