Skip to content
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

0.12 Rebase Validation and Label Sync #1056

Merged
merged 4 commits into from
Apr 14, 2023

Conversation

jabrown85
Copy link
Contributor

@jabrown85 jabrown85 self-assigned this Mar 30, 2023
@jabrown85 jabrown85 requested a review from a team as a code owner March 30, 2023 16:34
@jabrown85 jabrown85 changed the title Jab/rebase 0.12 validation 0.12 Rebase Validation and Label Sync Mar 30, 2023
rebaser.go Outdated Show resolved Hide resolved
rebaser.go Outdated Show resolved Hide resolved
rebaser.go Outdated
return errors.Wrap(err, "get new base image os")
}
if appOS != newBaseOS {
return fmt.Errorf("incompatible os: '%s' is not compatible with '%s'", newBaseOS, appOS)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit here, and i think also applicable a few other places (even arch) we're doing an equality check but the word we're using is "compatible" -- so i could be an ubuntu-based distro that promises 100% compatibility, but if i list my os as "mint" or whatever then the string won't equal ubuntu ... and it's a nit b/c I'm not arguing we should be maintaining a detailed compatiblity table in the code, but I do think we should change the language to is not equal to so that it's more obvious to anyone confronting this error message that we're just doing the simplest thing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated error message in f4092ea

@natalieparellano natalieparellano added this to the lifecycle 0.17.0 milestone Apr 5, 2023
For 0.12 and beyond, rebase is now validating the OS, Arch, Variant and io.buildpack labels specific to OS. This can be skipped with the --force flag.

Signed-off-by: Jesse Brown <jabrown85@gmail.com>
For platforms running 0.12 and beyond, copy the io.buildpacks.base.* labels to the new image on rebase.

Signed-off-by: Jesse Brown <jabrown85@gmail.com>
Signed-off-by: Jesse Brown <jabrown85@gmail.com>
If the target image was built prior to 0.12, do not run the additional validation. This is because the validation is not backwards compatible with older images. Older images may not have the required fields and we don't want to force platforms to use the `--force` flag.

Signed-off-by: Jesse Brown <jabrown85@gmail.com>
@natalieparellano natalieparellano merged commit 627deb6 into main Apr 14, 2023
7 checks passed
@natalieparellano natalieparellano deleted the jab/rebase-0.12-validation branch April 14, 2023 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC #0096] Rebaser should validate target data and update labels
3 participants