DataTalksClub / DataTalksClub/course-management-platform

Deadline-reminder schedule now provisioned in infra-terraform (prod) — recap

Open
#193 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement infra
Dominant language
Python
Stars
85
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Context

The recurring deadline-reminder schedule is now provisioned entirely in infra-as-code (DataTalksClub/infra-terraform), tracked in infra-terraform#1. The old CMP shell script + manual GitHub Actions workflow have already been removed from this repo — there is nothing for CMP to provision at runtime. This issue is just a recap so the CMP side knows what to keep working.

What was provisioned in Terraform

A new file cmp_deadline_reminder.tf adds:

  • An EventBridge rule running daily at 09:00 UTC (cron(0 9 * * ? *)).
  • An ECS target that launches the prod task as a one-off Fargate task, overriding the container command to:
    python manage.py send_deadline_reminders
    
  • An invocation role EventBridge assumes (ecs:RunTask on course-management-prod:* + iam:PassRole on the execution role).

Details:

  • Account 387546586013, region eu-west-1
  • Cluster: course-management-cluster
  • Task family: course-management-prod (the schedule references the family, so it always runs the latest active revision that CI/CD deploys — no pinning to a stale revision)
  • Container name in override: course-management-prod

What CMP needs to keep working

  • The management command python manage.py send_deadline_reminders must continue to exist and run to completion as a one-off task (it reconciles Datamailer recipient lists, triggers sends, and exits).
  • It runs against prod env/secrets, using the shared Datamailer instance (DATAMAILER_URL = https://datamailer.dtcdev.click, same host for dev and prod).
  • If the container name in the prod task definition ever changes from course-management-prod, the EventBridge containerOverrides[].name in cmp_deadline_reminder.tf must be updated to match — otherwise the override is silently ignored.

What does NOT need changing

  • No GitHub Actions / CI involvement. The CI deploy user (course-management-ci-cd-deploy-user) needs no scheduling permissions — no scheduler:*, iam:CreateRole, or iam:PassRole. terraform apply creates everything.

Notes

  • Schedule runs once per day at 09:00 UTC. To change the cadence or time, it's a one-line edit in cmp_deadline_reminder.tf (schedule_expression).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

This issue is a recap; the scheduling work is tracked in infra-terraform#1 and the old CMP provisioning files were removed. Read cmp_deadline_reminder.tf and verify that python manage.py send_deadline_reminders remains available, completes as a one-off task, and matches the documented prod container name.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, terraform
Domain
devops, infrastructure
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.