Repository navigation
Conversation
gerrod3
force-pushed
the
fix-pull-through-digest-failure
branch
from
October 16, 2026 17:05
abb6c7a to
654ee33
Compare
…alidation On a first-time pull-through the ContentArtifact is unsaved, so saving the RemoteArtifact's failed_at violated the foreign key and raised an IntegrityError. That skipped closing the connection and the intended "failed checksum validation" error, letting clients receive the unvalidated body as a clean 200. Only record failed_at when the ContentArtifact exists. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gerrod3
force-pushed
the
fix-pull-through-digest-failure
branch
from
October 16, 2026 17:18
654ee33 to
cd76e46
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
On a first-time pull-through download,
_match_and_streambuilds theContentArtifactandRemoteArtifactunsaved. If the download then fails digest validation,_stream_remote_artifacttries to savefailed_aton the RA, which violates thecore_remoteartifactforeign key to the never-saved CA.Effects before this change:
IntegrityErrorinstead of the intended "failed checksum validation" error.close_tcp_connectionis skipped, so the client gets a clean200 OKwith the full unvalidated body (checked with curl, exit 0).Now
failed_atis only recorded when the RA's ContentArtifact already exists. The connection is always closed and theRuntimeErroralways raised, so the client sees a broken transfer (curl: (18) transfer closed with outstanding read data remaining).This does not add a failure cooldown for first-time pull-through; that is left for a follow-up.
Tests: two unit tests in
pulpcore/tests/unit/content/test_handler.py. The new-ContentArtifact test fails without the fix with the FKIntegrityError. A functional test isn't possible since pull-through RAs carry no digests and pulp_file doesn't implement pull-through.📜 Checklist
🤖 Generated with Claude Code