-
Couldn't load subscription status.
- Fork 6.6k
chore(deps): update dependency redis to v7 #13617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
chore(deps): update dependency redis to v7 #13617
Conversation
Summary of ChangesHello @renovate-bot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on a routine dependency update, upgrading the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates the redis dependency from version 6.0.0 to 7.0.0. This is a major version update. While reviewing the impact of this change, I found a critical issue regarding Python version compatibility for the GKE deployment. The new redis version requires Python 3.8+, but the Dockerfile for GKE is configured to use Python 3.4. This will cause the container build to fail. Additionally, the code in both sample applications uses the deprecated redis.StrictRedis class, which should be updated to redis.Redis. I've added specific comments on the requirements.txt files with more details.
| Flask==3.0.3 | ||
| gunicorn==23.0.0 | ||
| redis==6.0.0 | ||
| redis==7.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This update to redis==7.0.0 has a critical side-effect and also highlights a needed code modernization.
1. Python Version Incompatibility (Critical):
redis-py>=6.0.0 requires Python 3.8+. The Dockerfile at memorystore/redis/gke_deployment/Dockerfile is configured to use Python 3.4. This will cause the Docker build to fail when installing dependencies. The Dockerfile needs to be updated to use a more recent Python version (3.8 or higher).
2. Deprecated StrictRedis class (Medium):
memorystore/redis/main.py uses the deprecated redis.StrictRedis class. This should be updated to redis.Redis.
In memorystore/redis/main.py (line 24):
- redis_client = redis.StrictRedis(host=redis_host, port=redis_port)
+ redis_client = redis.Redis(host=redis_host, port=redis_port)| @@ -1,2 +1,2 @@ | |||
| functions-framework==3.9.2 | |||
| redis==6.0.0 | |||
| redis==7.0.0 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this update is fine for the Cloud Function environment, it's a good opportunity to address the use of a deprecated class. The redis.StrictRedis class used in functions/memorystore/redis/main.py is deprecated and should be replaced with redis.Redis to align with the library's current API and avoid future breakages.
This change should be applied in functions/memorystore/redis/main.py and its corresponding test file:
In functions/memorystore/redis/main.py (line 24):
- redis_client = redis.StrictRedis(host=redis_host, port=redis_port)
+ redis_client = redis.Redis(host=redis_host, port=redis_port)In functions/memorystore/redis/main_test.py (line 27):
- @unittest.mock.patch("redis.StrictRedis")
+ @unittest.mock.patch("redis.Redis")
This PR contains the following updates:
==6.0.0->==7.0.0Release Notes
redis/redis-py (redis)
v7.0.0: 7.0.0Compare Source
Changes
One of the main features introduced in this release is a new type of client
MultiDBClient. The purpose of this client is a communication with multiple databases that are eventually consistent (Active-Active setup) and handling failures by failover across databases.More information could be found in docs.
🚀 New Features
🧪 Experimental Features
🔥 Breaking changes
🐛 Bug Fixes
🧰 Maintenance
We'd like to thank all the contributors who worked on this release!
@scovetta @mengxunQAQ @abrookins @VincentHokie @sobolevn @hunterhogan @luka-mikec @andy-stark-redis @elena-kolevska @kiryazovi-redis @petyaslavova
v6.4.0: 6.4.0Compare Source
Changes
🚀 New Features
🧰 Maintenance
We'd like to thank all the contributors who worked on this release!
@htemelski-redis @elena-kolevska @petyaslavova @vladvildanov
v6.3.0: 6.3.0Compare Source
Changes
🚀 New Features
🐛 Bug Fixes
🧰 Maintenance
We'd like to thank all the contributors who worked on this release!
@robertosantamaria-scopely @mahigupta @alisaifee @tzongw @earonesty @IlianIliev @ofekshenawa @andy-stark-redis @AmirHossein81Gholami @mharding-hpe @git-hulk @ngabhanenetskope @terencehonles @ManelCoutinhoSensei @petyaslavova @vladvildanov
v6.2.0: 6.2.0Compare Source
Changes
🚀 New Features
dynamic_startup_nodesparameter to async RedisCluster (#3646)hiredis-pyparser (#3648)RedisClusterclient (#3649)🐛 Bug Fixes
check_hostnamewhen instantiatingRedisSSLContext(#3655)__del__call (#3654)🧰 Maintenance
search_json_examples.ipynb: Fix the old importindexDefinition->index_definition(#3652)Python 3.8support as it has reached end of life (#3657)We'd like to thank all the contributors who worked on this release!
@JCornat @ShubhamKaudewar @uglide @petyaslavova @vladvildanov
v6.1.1Compare Source
Changes
🐛 Bug Fixes
check_hostnamewhen instantiatingRedisSSLContext(#3655)__del__call (#3654)We'd like to thank all the contributors who worked on this release!
@vladvildanov @petyaslavova
v6.1.0: 6.1.0Compare Source
Changes
🚀 New Features
RedisClusterclient (#3611)Retryand backoff classes (#3628)🐛 Bug Fixes
ssl_check_hostnamenot set to connections. For SSL verification withssl_cert_reqs="none", check_hostname is set toFalse(#3637)Important: The default value for the
check_hostnamefield ofRedisSSLContexthas been changed as part of this PR - this is a breaking change and should not be introduced in minor versions - unfortunately, it is part of the current release.The breaking change is reverted in the next release to fix the behavior --> 6.2.0
Retryand backoff classes (#3628) - fixes integration with Django RQAttributeErroronClusterPipeline(#3634)🧰 Maintenance
REDIS_MAJOR_VERSIONcorrectly in run-tests (#3642)hiredis-py-integration.yaml(#3641)RedisModuleCommandsclass (#3632)Noneargs or return types to be annotated withOptional- includes commands incore.pyand json commands (#3610)🙏 Special Thanks
A big thank you to our collaborators at Scopely for their valuable contributions to this release! Your support and improvements help move the project forward — we appreciate it!
Contributors
We'd like to thank all the contributors who worked on this release!
@robertosantamaria-scopely @sentrivana @terencehonles @kesha1225 @aberres @uglide @omerfeyzioglu @petyaslavova @vladvildanov @andy-stark-redis
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Never, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.