fix(manager): RedisStorage expects a client instance, not a URL string - #81
Merged
Merged
Conversation
penguin-limiter's RedisStorage.__init__(self, client, key_prefix=...) takes an already-constructed redis-py client (it calls client.register_script(...) internally) — not a connection URL. Manager called RedisStorage(url=_storage_url), which crashed create_app() with TypeError: RedisStorage.__init__() got an unexpected keyword argument 'url', discovered now that penguin-limiter is actually published and this code path runs for the first time end-to-end. Verified: built the real Dockerfile, ran the container against a live Valkey instance via gunicorn (not just an import check) — all 4 workers boot, /health returns 200, container stays up.
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.
Summary
Verifying manager's Dockerfile end-to-end now that
penguin-limiteris published on PyPI (was previously missing entirely, blocking any build). The image now builds cleanly, butcreate_app()crashed at boot:penguin_limiter.storage.redis_store.RedisStorage.__init__(self, client, key_prefix=...)takes an already-constructed redis-py client (it callsclient.register_script(...)internally) — not a connection URL string. Manager calledRedisStorage(url=_storage_url). This is the first time this code path has ever actually run, since the package didn't exist until this week.Fix
Construct the redis-py client first, pass that:
Verification
manager/backend/Dockerfileend-to-end (no stripped dependencies)penguin-limiterresolves and installs from PyPIcurl /healthreturns{"status":"healthy"}with HTTP 200; container stays upTest plan
docker buildsucceeds/healthreturns 200