ci: add release package sanity check#1186
Conversation
✅ Deploy Preview for poetic-froyo-8baba7 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughAdds a CI job Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/integration-tests.yml:
- Around line 18-22: The workflow uses deprecated action pins; replace uses:
actions/checkout@v2 and uses: actions/setup-python@v2 with their current major
versions (e.g., actions/checkout@v4 and actions/setup-python@v4 or the latest
stable major) throughout the file, including the main job and the test job, so
that the checkout and Python setup steps (actions/checkout and
actions/setup-python) reference supported releases; ensure the with:
python-version value remains '3.10.x' and run the workflow to verify
compatibility.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 44aa9245-53dc-4f75-8934-eb356d770883
📒 Files selected for processing (2)
.github/workflows/integration-tests.ymltools/check_release_package.py
There was a problem hiding this comment.
♻️ Duplicate comments (1)
.github/workflows/integration-tests.yml (1)
20-20:⚠️ Potential issue | 🟠 MajorBump
actions/setup-pythonto a currently supported major.Line 20 and Line 57 pin
actions/setup-python@v4; actionlint flags this as too old for current runners. Please upgrade both usages consistently.🔧 Proposed fix
- uses: actions/setup-python@v4 + uses: actions/setup-python@v5 ... - uses: actions/setup-python@v4 + uses: actions/setup-python@v5According to official GitHub documentation/Marketplace, what is the currently supported major version for actions/setup-python, and is v4 deprecated or unsupported on GitHub-hosted runners?Also applies to: 57-57
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/integration-tests.yml at line 20, Replace both occurrences of "uses: actions/setup-python@v4" with the currently supported major release (e.g., update to actions/setup-python@v5) so both usages at lines referencing "uses: actions/setup-python@v4" are consistent; ensure you update both locations (the two "uses: actions/setup-python@v4" entries) in the workflow and run the workflow linter to verify the new major is accepted by GitHub-hosted runners.
🧹 Nitpick comments (1)
tools/check_release_package.py (1)
90-97: Use the wheel argument to verify artifact identity, not just existence.Line 90 currently checks only that the file exists. The script can still validate a different installed
qdrant-clientthan the provided wheel if install steps drift. Consider asserting installed distribution version/name matches the wheel argument before running checks.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tools/check_release_package.py` around lines 90 - 97, The script currently only tests that the provided wheel_path exists (wheel_path) but does not verify the installed package identity; before calling remove_repo_from_sys_path(), check_runtime_dependencies(), and import_non_test_modules() add logic to parse the wheel filename (wheel_path.name) to extract expected package name and version and then use importlib.metadata (e.g., importlib.metadata.distribution or metadata.version) to get the installed distribution name/version for the package (e.g., "qdrant-client") and assert that the installed name/version matches the expected values from the wheel; if they differ, raise SystemExit with a clear error so the script fails fast when the wrong artifact is installed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.github/workflows/integration-tests.yml:
- Line 20: Replace both occurrences of "uses: actions/setup-python@v4" with the
currently supported major release (e.g., update to actions/setup-python@v5) so
both usages at lines referencing "uses: actions/setup-python@v4" are consistent;
ensure you update both locations (the two "uses: actions/setup-python@v4"
entries) in the workflow and run the workflow linter to verify the new major is
accepted by GitHub-hosted runners.
---
Nitpick comments:
In `@tools/check_release_package.py`:
- Around line 90-97: The script currently only tests that the provided
wheel_path exists (wheel_path) but does not verify the installed package
identity; before calling remove_repo_from_sys_path(),
check_runtime_dependencies(), and import_non_test_modules() add logic to parse
the wheel filename (wheel_path.name) to extract expected package name and
version and then use importlib.metadata (e.g., importlib.metadata.distribution
or metadata.version) to get the installed distribution name/version for the
package (e.g., "qdrant-client") and assert that the installed name/version
matches the expected values from the wheel; if they differ, raise SystemExit
with a clear error so the script fails fast when the wrong artifact is
installed.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b96ac797-8df3-47cb-8b77-4e73fe023337
📒 Files selected for processing (2)
.github/workflows/integration-tests.ymltools/check_release_package.py
Adds a release package sanity check to CI for built distributions.
This new job:
poetry buildpytestis not included as a runtime dependencyqdrant_clientmodules to catch packaging/runtime import issuesThe smoke check removes repository paths from
sys.pathbefore importing so it validates the installed wheel rather than the local source tree.Closes #958