-
Notifications
You must be signed in to change notification settings - Fork 33
Dependabot: urllib3 and boto3 updates #212
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: master
Are you sure you want to change the base?
Conversation
Related to [tesk-core](elixir-cloud-aai/tesk-core#55)
Reviewer's GuideUpdates container images to Alpine 3.19, modernizes Python/pip installation in Dockerfiles, relaxes and makes conditional the urllib3 and boto3 version constraints to support newer versions and multiple Python runtimes, pins moto<5 for tests, and adjusts S3-related environment variables to be compatible with newer AWS SDK checksum behavior. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey - I've found 1 issue, and left some high level feedback:
- Using
--break-system-packagesin the Dockerfiles may be unnecessary (since these are isolated container images) and could mask packaging issues; consider dropping it unless there is a specific constraint that requires overriding the system Python packages. - The new
urllib3/boto3environment markers leave Python versions<3.8without an explicit constraint and treat3.8specially; it may be worth aligning these markers with the actual set of supported Python versions (e.g., viapython_requires) so dependency resolution is predictable across all intended runtimes.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Using `--break-system-packages` in the Dockerfiles may be unnecessary (since these are isolated container images) and could mask packaging issues; consider dropping it unless there is a specific constraint that requires overriding the system Python packages.
- The new `urllib3`/`boto3` environment markers leave Python versions `<3.8` without an explicit constraint and treat `3.8` specially; it may be worth aligning these markers with the actual set of supported Python versions (e.g., via `python_requires`) so dependency resolution is predictable across all intended runtimes.
## Individual Comments
### Comment 1
<location> `source/tesk-core/setup.py:18-20` </location>
<code_context>
+ 'urllib3>=2.0,<3.0 ; python_version >= "3.10"',
+
+ # boto3 constraint
+ 'boto3<=1.28 ; python_version == "3.8"',
+ 'boto3>=1.28 ; python_version >= "3.9"',
]
TEST_DEPS = [ 'pytest',
</code_context>
<issue_to_address>
**suggestion (bug_risk):** The asymmetric boto3 bounds may allow future breaking changes on Python ≥3.9 without any upper limit.
For 3.8, boto3 is capped at 1.28, but for ≥3.9 it’s unbounded on the upper side, so a future boto3 major release with breaking changes would still satisfy this spec. If 1.28 is a known compatibility ceiling, consider adding a similar upper bound for ≥3.9 (e.g. `<2.0` or `<1.29`), or clarify why only 3.8 is constrained while newer Python versions are not.
```suggestion
# boto3 constraint
'boto3<=1.28 ; python_version == "3.8"',
'boto3>=1.28,<2.0 ; python_version >= "3.9"',
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| # boto3 constraint | ||
| 'boto3<=1.28 ; python_version == "3.8"', | ||
| 'boto3>=1.28 ; python_version >= "3.9"', |
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.
suggestion (bug_risk): The asymmetric boto3 bounds may allow future breaking changes on Python ≥3.9 without any upper limit.
For 3.8, boto3 is capped at 1.28, but for ≥3.9 it’s unbounded on the upper side, so a future boto3 major release with breaking changes would still satisfy this spec. If 1.28 is a known compatibility ceiling, consider adding a similar upper bound for ≥3.9 (e.g. <2.0 or <1.29), or clarify why only 3.8 is constrained while newer Python versions are not.
| # boto3 constraint | |
| 'boto3<=1.28 ; python_version == "3.8"', | |
| 'boto3>=1.28 ; python_version >= "3.9"', | |
| # boto3 constraint | |
| 'boto3<=1.28 ; python_version == "3.8"', | |
| 'boto3>=1.28,<2.0 ; python_version >= "3.9"', |
Related to tesk-core this and this
Summary by Sourcery
Update container images and Python dependencies for tesk-core to support newer urllib3 and boto3 versions and align with newer Python/Alpine environments.
Enhancements:
Tests: