Skip to content

Conversation

@jobselko
Copy link
Contributor

@jobselko jobselko commented Nov 21, 2025

closes #1047

@jobselko jobselko self-assigned this Nov 21, 2025
@github-actions github-actions bot added multi-commit Add to bypass single commit lint check no-changelog no-issue labels Nov 21, 2025
@jobselko jobselko marked this pull request as draft November 21, 2025 22:11
@jobselko jobselko changed the title Implement PEP 658 [PULP-946] Implement PEP 658 Nov 21, 2025
@jobselko jobselko force-pushed the pep_658 branch 2 times, most recently from 848fa89 to 31cd665 Compare December 4, 2025 17:24
@jobselko jobselko force-pushed the pep_658 branch 6 times, most recently from 5e4f2cb to 69e1326 Compare December 16, 2025 15:44
Copy link
Contributor

@gerrod3 gerrod3 left a comment

Choose a reason for hiding this comment

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

Looking pretty good.

@jobselko jobselko marked this pull request as ready for review December 16, 2025 22:08
@jobselko jobselko force-pushed the pep_658 branch 6 times, most recently from 14bc63c to 0d693f8 Compare December 18, 2025 13:43
@jobselko jobselko force-pushed the pep_658 branch 3 times, most recently from 9950bbf to ad11073 Compare December 18, 2025 19:54
Copy link
Contributor

@gerrod3 gerrod3 left a comment

Choose a reason for hiding this comment

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

The migration logic looks correct to me, just wondering what error messaging we should be doing.

Comment on lines +153 to +162
if result == "extraction_failed":
# Unset metadata_sha256 when metadata extraction fails
package.metadata_sha256 = None
packages_batch.append(package)
skipped_pkgs += 1
continue
if result is None:
# Failed to build metadata artifact (init_and_validate failed)
skipped_pkgs += 1
continue
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we also set package.metadata_sha256 = None if init_and_validate fails, all skipped packages will have the field nullified (None). Then the migration fixed everything because all PPC instances with the metadata_sha256 field set would have the artifact. (And we can maybe drop skipped_pkgs variable?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multi-commit Add to bypass single commit lint check no-changelog no-issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement PEP 658 – Serve Distribution Metadata in the Simple Repository API

2 participants