Repository navigation
build: update requirements for java-api-stubs - #109
Conversation
Reviewer's GuideConfigurationRaise the allowed java-api-stubs minimum and enable hash generation for the compiled requirements.
Lock files and vendored codeRefresh the generated requirements lock entries with hashes for the resolved packages.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="stubs/requirements.txt" line_range="4-5" />
<code_context>
# uv pip compile --config-file=uv.toml pyproject.toml
-java-api-stubs==17.26.6
+java-api-stubs==17.26.6 \
+ --hash=sha256:dfd7accfd13b3abaa3457c35af234abc425bc82f2824b755df36b6fad86cb9d4 \
+ --hash=sha256:e1fc2028aaadd4862e796f5c963de27e09a4462e0ed69f78f8ebe8164b4626b6
# via ignition-api-stubs (pyproject.toml)
-types-enum34==1.1.8
</code_context>
<issue_to_address>
**Stub type-check environment cannot install dependencies**
When the stubs typecheck tox environment installs its dependencies, `pip` enables hash-checking mode for the requirements file and rejects the unhashed Git-based `mypy` dependency installed in the same dependency set, so the environment cannot be created.
Install the Git-based `mypy` dependency separately from the hashed requirements, or otherwise ensure every dependency in that pip invocation is hash-pinned.
</issue_to_address>
### Comment 2
<location path="stubs/requirements.txt" line_range="3" />
<code_context>
# This file was autogenerated by uv via the following command:
# uv pip compile --config-file=uv.toml pyproject.toml
-java-api-stubs==17.26.6
+java-api-stubs==17.26.6 \
+ --hash=sha256:dfd7accfd13b3abaa3457c35af234abc425bc82f2824b755df36b6fad86cb9d4 \
+ --hash=sha256:e1fc2028aaadd4862e796f5c963de27e09a4462e0ed69f78f8ebe8164b4626b6
</code_context>
<issue_to_address>
**Dependency hashes are not enforced**
When an artifact for a pinned dependency is replaced or corrupted, pip installs this file through `stubs/tox.ini` without `--require-hashes`, so it ignores the emitted hashes and accepts a substituted artifact for the pinned version; the intended integrity check is absent.
Use an installation path that enforces these hashes, accounting for the unhashed VCS dependency in the same tox environment.
</issue_to_address>Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: stubs/requirements.txt:5, stubs/requirements.txt:3
| --hash=sha256:dfd7accfd13b3abaa3457c35af234abc425bc82f2824b755df36b6fad86cb9d4 \ | ||
| --hash=sha256:e1fc2028aaadd4862e796f5c963de27e09a4462e0ed69f78f8ebe8164b4626b6 |
There was a problem hiding this comment.
🔴 Critical · Stub type-check environment cannot install dependencies
When the stubs typecheck tox environment installs its dependencies, pip enables hash-checking mode for the requirements file and rejects the unhashed Git-based mypy dependency installed in the same dependency set, so the environment cannot be created.
Install the Git-based mypy dependency separately from the hashed requirements, or otherwise ensure every dependency in that pip invocation is hash-pinned.
Prompt for AI agents
In `stubs/requirements.txt` at lines 4-5:
**Stub type-check environment cannot install dependencies**
When the stubs typecheck tox environment installs its dependencies, `pip` enables hash-checking mode for the requirements file and rejects the unhashed Git-based `mypy` dependency installed in the same dependency set, so the environment cannot be created.
Install the Git-based `mypy` dependency separately from the hashed requirements, or otherwise ensure every dependency in that pip invocation is hash-pinned.| # This file was autogenerated by uv via the following command: | ||
| # uv pip compile --config-file=uv.toml pyproject.toml | ||
| java-api-stubs==17.26.6 | ||
| java-api-stubs==17.26.6 \ |
There was a problem hiding this comment.
🟡 Medium · Dependency hashes are not enforced
When an artifact for a pinned dependency is replaced or corrupted, pip installs this file through stubs/tox.ini without --require-hashes, so it ignores the emitted hashes and accepts a substituted artifact for the pinned version; the intended integrity check is absent.
Use an installation path that enforces these hashes, accounting for the unhashed VCS dependency in the same tox environment.
Prompt for AI agents
In `stubs/requirements.txt` at line 3:
**Dependency hashes are not enforced**
When an artifact for a pinned dependency is replaced or corrupted, pip installs this file through `stubs/tox.ini` without `--require-hashes`, so it ignores the emitted hashes and accepts a substituted artifact for the pinned version; the intended integrity check is absent.
Use an installation path that enforces these hashes, accounting for the unhashed VCS dependency in the same tox environment.
Summary by Sourcery
Update the stub package dependency constraints and lock generated requirements with integrity hashes.
Enhancements:
Build: