Skip to content

refactor: pass the Learn Fastly service ID at the call sites - #3804

Open
ChristopherChudzicki wants to merge 1 commit into
fix/fastly-learn-service-id-env-varfrom
fix/fastly-pass-learn-service-id-explicitly
Open

refactor: pass the Learn Fastly service ID at the call sites#3804
ChristopherChudzicki wants to merge 1 commit into
fix/fastly-learn-service-id-env-varfrom
fix/fastly-pass-learn-service-id-explicitly

Conversation

@ChristopherChudzicki

Copy link
Copy Markdown
Contributor

What are the relevant tickets?

Refs https://github.com/mitodl/hq/issues/12381

Description (What does it do?)

Naming clarity only: passes settings.MIT_LEARN_FASTLY_SERVICE_ID explicitly at the three call sites, so it's visible at the point of enqueue that an MITxOnline signal purges MIT Learn's Fastly service and not our own.

Originally part of #3794, split out because a two-argument Celery message raises TypeError on a worker still running the one-argument task. #3794 keeps the message single-argument and falls back to the setting, which is safe in both rolling-deploy directions; this PR adds the argument back once every worker accepts it.

Warning

Do not merge until #3794 is fully released — web and celery.

@github-actions

Copy link
Copy Markdown

OpenAPI Changes

Show/hide changes
## Changes for v0.yaml:
No changes detected

## Changes for v1.yaml:
No changes detected

## Changes for v2.yaml:
No changes detected

Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

ChristopherChudzicki added a commit that referenced this pull request Jul 30, 2026
Keeps the enqueued Celery message a single positional argument so a
rolling deploy is safe in both directions: an old webapp's one-arg
message runs on a new worker and still purges via the fallback, and a
new webapp's one-arg message runs on an old worker unchanged. Passing
service_id explicitly from the call sites is #3804, once every worker
accepts the argument.

Also drives cms/signals_test.py through Wagtail's real publish rather
than calling the receiver directly, so the page_published.connect()
wiring is covered.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Now that every worker accepts service_id, pass it explicitly so a purge's
target is visible where it is enqueued -- an MITxOnline signal purging
MIT Learn's Fastly service is surprising enough to name at the call site.

Requires the parent PR to be fully deployed first: a two-argument message
raises TypeError on a worker whose task still takes one argument.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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