Skip to content

[PR #7346/862e1c22 backport][3.85] Skip re-upload of unchanged metadata artifacts on creating a publication#7459

Merged
gerrod3 merged 1 commit into3.85from
patchback/backports/3.85/862e1c2209d7a5efb30d3d585b362c4ef5e5b3cc/pr-7346
Mar 12, 2026
Merged

[PR #7346/862e1c22 backport][3.85] Skip re-upload of unchanged metadata artifacts on creating a publication#7459
gerrod3 merged 1 commit into3.85from
patchback/backports/3.85/862e1c2209d7a5efb30d3d585b362c4ef5e5b3cc/pr-7346

Conversation

@patchback
Copy link

@patchback patchback bot commented Mar 12, 2026

This is a backport of PR #7346 as merged into main (862e1c2).

PublishedMetadata.create_from_file() unconditionally saved artifacts to storage on every publish. When a publication was created for an already-published repository version, this overwrote identical metadata blobs with new timestamps, causing problems with CDN caching layers that use last-modified times.

Applied the same deduplication pattern used for content artifact uploads: look up the artifact by checksum first, verify the file exists in storage, and skip the write if it does.

closes #7344

📜 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

PublishedMetadata.create_from_file() unconditionally saved artifacts to storage
on every publish. When a publication was created for an already-published
repository version, this overwrote identical metadata blobs with new timestamps,
causing problems with CDN caching layers that use last-modified times.

Applied the same deduplication pattern used for content artifact uploads: look up
the artifact by checksum first, verify the file exists in storage, and skip the
write if it does.

Assisted-by: GitHub Copilot
closes #7344

(cherry picked from commit 862e1c2)
@gerrod3 gerrod3 enabled auto-merge (rebase) March 12, 2026 15:43
@gerrod3 gerrod3 merged commit 199fc0a into 3.85 Mar 12, 2026
13 checks passed
@gerrod3 gerrod3 deleted the patchback/backports/3.85/862e1c2209d7a5efb30d3d585b362c4ef5e5b3cc/pr-7346 branch March 12, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants