Skip to content

Update migrations 39-45 to perform the manifest data migration for new fields [2.26]#2385

Draft
gerrod3 wants to merge 1 commit into
pulp:2.26from
gerrod3:handle-data-migrate
Draft

Update migrations 39-45 to perform the manifest data migration for new fields [2.26]#2385
gerrod3 wants to merge 1 commit into
pulp:2.26from
gerrod3:handle-data-migrate

Conversation

@gerrod3
Copy link
Copy Markdown
Contributor

@gerrod3 gerrod3 commented Jun 4, 2026

Still need to test, but after each migration that adds a new manifest field (after the last 2.19 migration of 0038), run a data migration to populate the field that container-handle-image-data would handle.

0039 - Adds data; populates data, annotations and labels (the last two were added in 0038, but not filled in)
0042 - Adds type; populates type, is_bootable and is_flatpak (the last two were also added in 0038)
0043 - Adds os, architecture, compressed_image_size; removed the handle-image-data warning
0045 - Fixes compress_image_size; populates os, architecture, compressed_image_size; doesn't make sense to populate image_size till we fix the field in this migration

I can also change this to do the entire migration in the last migration 0045, so that we aren't doing multiple passes over the Manifest table. I don't delete the backing artifacts of the manifests, so this should be pretty safe. I added a check to see if the backing artifact is there and skip over manifests that didn't get data migrated in later migrations. There is still the possibility that it could fail if the config_blob artifact disappears, maybe I should also add safe guards around that, but not sure how common that is (there are no safeguards in our main model code that I copied over from...)

📜 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

@gerrod3 gerrod3 force-pushed the handle-data-migrate branch from d07b95e to 16f5855 Compare June 4, 2026 17:00
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.

1 participant