GeezerVison is showing github.com — Keep the upload filename when the storage backend renames the file by LilDojd · Pull Request #1459 · pulp/pulp_python
Conversation
LilDojd
commented
Nov 10, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
The Google Cloud Storage backend sets the name of the saved file object to its storage path. The upload serializer read file.name after it saved the artifact, so the upload task got the storage path instead of the package filename. The task then failed to find a known extension, and the upload was lost. The serializer now reads the filename before it saves the artifact.
Assisted By: Claude Code (claude-opus-5-5)
📜 Checklist
- Commits are cleanly separated with meaningful messages (simple features and bug fixes should be squashed to one commit)
- A changelog entry or entries has been added for any significant changes
- Follows the Pulp policy on AI Usage
- (For new features) - User documentation and test coverage has been added
See: Pull Request Walkthrough
Summary by CodeRabbit
- Bug Fixes
- Fixed uploads to the PyPI endpoint failing when artifacts are stored in Google Cloud Storage. Upload validation now uses the original filename even if storage renames the file.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The Google Cloud Storage backend sets the name of the saved file object to its
storage path. The upload serializer read file.name after it saved the
artifact, so the upload task got the storage path instead of the package
filename. The task then failed to find a known extension, and the upload was
lost. The serializer now reads the filename before it saves the artifact.
Assisted By: Claude Code (claude-opus-5-5)
coderabbitai
Bot
commented
Nov 10, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
The upload serializer captures the uploaded filename before storage processing. It uses that filename for validation, provenance verification, duplicate-artifact logging, and the returned content tuple. A unit test covers storage renaming the uploaded file.
Changes: PyPI upload filename
| Layer / File(s) |
Summary |
Capture and use the uploaded filename pulp_python/app/pypi/serializers.py, pulp_python/tests/unit/test_upload_serializer.py, CHANGES/+gcs-upload-filename.bugfix |
The serializer uses the captured filename throughout validation and upload handling. The test verifies this behavior when storage renames the uploaded file. The changelog records the Google Cloud Storage upload fix. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related PRs
- pulp/pulp_python#1327: Adds attestation verification during package upload; this change ensures verification receives the uploaded filename after storage renames the file.
- pulp/pulp_python#1430: Adds CI validation for changelog snippet names and suffixes; this change adds a snippet that follows that naming contract.
Suggested labels: no-issue
Suggested reviewers: gerrod3
Merge Risk: Minimal · up to 09637
-
The upload filename appears to be preserved when storage renames the file. No issue requiring a fix before merge is established.
Pre-merge checks: 5
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title clearly describes the main change: preserving the uploaded filename when storage renames the file. |
| Docstring Coverage |
 |
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
| Description check |
 |
The description explains the Google Cloud Storage filename issue and the serializer fix. It includes the required checklist, confirms that a changelog entry was added, and the pull request changes inc… |
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)
Full details: Description check
-
Explanation
The description explains the Google Cloud Storage filename issue and the serializer fix. It includes the required checklist, confirms that a changelog entry was added, and the pull request changes include a regression test.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Share
-
Recent review info
-
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
ed7432b1-9cf7-42fb-b009-6499202ec502
Commits
-
Reviewing files that changed from the base of the PR and between 6e6e0d9 and 09637bd.
Files selected for processing: 3
-
CHANGES/+gcs-upload-filename.bugfix
pulp_python/app/pypi/serializers.py
pulp_python/tests/unit/test_upload_serializer.py
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This branch has not been deployed
No deployments
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.