-
Notifications
You must be signed in to change notification settings - Fork 80
[PULP-946] Implement PEP 658 #1031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
848fa89 to
31cd665
Compare
5e4f2cb to
69e1326
Compare
gerrod3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking pretty good.
pulp_python/app/migrations/0019_create_missing_metadata_artifacts.py
Outdated
Show resolved
Hide resolved
pulp_python/app/migrations/0019_create_missing_metadata_artifacts.py
Outdated
Show resolved
Hide resolved
pulp_python/app/migrations/0019_create_missing_metadata_artifacts.py
Outdated
Show resolved
Hide resolved
14bc63c to
0d693f8
Compare
9950bbf to
ad11073
Compare
gerrod3
left a comment
There was a problem hiding this 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.
pulp_python/app/migrations/0019_create_missing_metadata_artifacts.py
Outdated
Show resolved
Hide resolved
pulp_python/app/migrations/0019_create_missing_metadata_artifacts.py
Outdated
Show resolved
Hide resolved
pulp_python/app/migrations/0019_create_missing_metadata_artifacts.py
Outdated
Show resolved
Hide resolved
| 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 |
There was a problem hiding this comment.
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?)
closes #1047