Repository navigation
fix(background_tasks): warn about the legacy broker variables only for Redis URLs - #901
Merged
Merged
Conversation
…r Redis URLs (#868) SM_REDIS_URL seeds both the broker and the result backend with one URL, so it can replace SM_BG_TASKS_BROKER_URL / SM_BG_TASKS_RESULT_BACKEND only when they hold a Redis URL. In-process (memory:// + cache+memory://), AMQP, SQS and rpc:// values are only expressible through those variables and no longer warn. Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
SM_REDIS_URL is also read through redis-py from_url (rate limiter, leases, invalidation transport), which rejects Celery's redis+socket and sentinel schemes, so only redis/rediss values are told to move to it. Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Deploying simple-module-python with
|
| Latest commit: |
d1dffcf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c820da07.simple-module-python.pages.dev |
| Branch Preview URL: | https://fix-issue-868-legacy-redis-w.simple-module-python.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #868
Summary
warn_on_legacy_redis_varsnow warns aboutSM_BG_TASKS_BROKER_URL/SM_BG_TASKS_RESULT_BACKENDonly when the value is aredis://orrediss://URL. Those are the only valuesSM_REDIS_URLcan carry: besides Celery's broker and result backend, it feeds redis-py'sfrom_urlin the rate limiter, leases and the invalidation transport, which rejects Celery'ssentinel://andredis+socket://.memory://+cache+memory://, needed because the localhost broker is refused) no longer logs two deprecation warnings it can't act on. The same goes for AMQP, SQS andrpc://. The check is per variable: a Redis broker beside anrpc://backend still warns about the broker.settings.pydocstring now say the per-field variables are deprecated only for a Redis URL. Docs:docs/reference/env-vars.mdanddocs/framework/invalidation.md. CHANGELOG Fixed entry added.Verification
--skip-browser): settings and logging only.make lint✓,make test-js✓ (900 tests).make test-pygave 8243 passed and 2 failed:httpx.ReadTimeoutintests/integration/test_invalidation_cross_process.pyunder full-suite load.origin/mainfails the same 2 tests the same way locally (8236 passed, 2 failed). The file passes on its own.Test plan
uv run pytest modules/background_tasks/tests/core/settings/test_background_tasks_redis_url.pyhttps://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4