Skip to content

Fix provenance sync for Pulp User publishers#1273

Merged
gerrod3 merged 2 commits into
pulp:mainfrom
gerrod3:fix/pulp-attestation-sync
Jul 14, 2026
Merged

Fix provenance sync for Pulp User publishers#1273
gerrod3 merged 2 commits into
pulp:mainfrom
gerrod3:fix/pulp-attestation-sync

Conversation

@gerrod3

@gerrod3 gerrod3 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Import Provenance from pulp_python.app.provenance in the sync task instead of pypi_attestations, so sync accepts attestations with Pulp User publishers created during upload
  • Add a functional test that uploads attestations to one repository and syncs provenance from that distribution into another

Test plan

  • Added test_sync_pulp_created_provenance functional test
  • oci-env test functional -p python pulp_python/tests/functional/api/test_attestations.py::test_sync_pulp_created_provenance -v

Assisted-by: Cursor

Made with Cursor

provenance=True,
includes=[f"twine=={twine_package.version}"],
)
dest_repo = python_repo_with_sync(remote=remote)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gerrod3 would it be better to test syncing from a different domain? my concern is that the Provenance content unit is just reused so validation doesn't happen in the test

Sync was validating provenance with pypi_attestations.Provenance, which
rejects Pulp User publishers created during upload. Use the extended model
from pulp_python.app.provenance instead.

Add a cross-domain functional test that uploads attestations in one domain
and syncs provenance into a repository in another.

Assisted-by: Cursor
Co-authored-by: Cursor <cursoragent@cursor.com>
@gerrod3 gerrod3 force-pushed the fix/pulp-attestation-sync branch from 1ddc48d to bab78b7 Compare July 14, 2026 18:36
@github-actions github-actions Bot removed multi-commit Add to bypass single commit lint check no-changelog labels Jul 14, 2026
domain_factory already skips when domains are disabled.

Assisted-by: Cursor
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added multi-commit Add to bypass single commit lint check no-changelog labels Jul 14, 2026
@gerrod3 gerrod3 merged commit 4acf777 into pulp:main Jul 14, 2026
25 of 27 checks passed
@patchback

patchback Bot commented Jul 14, 2026

Copy link
Copy Markdown

Backport to 3.27: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.27/4acf7775bac47df59cf0a64e64912e5799e2c7a0/pr-1273

Backported as #1274

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback

patchback Bot commented Jul 14, 2026

Copy link
Copy Markdown

Backport to 3.31: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.31/4acf7775bac47df59cf0a64e64912e5799e2c7a0/pr-1273

Backported as #1275

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@gerrod3 gerrod3 deleted the fix/pulp-attestation-sync branch July 14, 2026 19:56
gerrod3 added a commit that referenced this pull request Jul 15, 2026
* Fix provenance sync to use Pulp's extended Provenance model

Sync was validating provenance with pypi_attestations.Provenance, which
rejects Pulp User publishers created during upload. Use the extended model
from pulp_python.app.provenance instead.

(cherry picked from commit 4acf777)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants