Update migrations 39-45 to perform the manifest data migration for new fields [2.26]#2385
Draft
gerrod3 wants to merge 1 commit into
Draft
Update migrations 39-45 to perform the manifest data migration for new fields [2.26]#2385gerrod3 wants to merge 1 commit into
gerrod3 wants to merge 1 commit into
Conversation
d07b95e to
16f5855
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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; populatesdata,annotationsandlabels(the last two were added in 0038, but not filled in)0042 - Adds
type; populatestype,is_bootableandis_flatpak(the last two were also added in 0038)0043 - Adds
os,architecture,compressed_image_size; removed the handle-image-data warning0045 - Fixes
compress_image_size; populatesos,architecture,compressed_image_size; doesn't make sense to populate image_size till we fix the field in this migrationI 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
datamigrated 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
See: Pull Request Walkthrough