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

Seed image format version OCI image label #188

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

omertuc
Copy link
Collaborator

@omertuc omertuc commented Dec 19, 2023

IBU reconciler now has a checkSeedImageCompatibility method that
checks if the seed image is compatible with the current version of the
lifecycle-agent. It does so by inspecting the OCI image's labels and
checking if the specified format version equals the hard-coded one that
this version of the lifecycle agent expects. That format version is set
by the imager during the image build process, and is only manually
bumped by developers when the image format changes in a way that is
incompatible with previous versions of the lifecycle-agent.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 19, 2023
Copy link
Contributor

openshift-ci bot commented Dec 19, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link
Collaborator

@donpenney donpenney left a comment

Choose a reason for hiding this comment

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

This looks like a great first step for a compatibility check, something we can build upon as we figure out what we'll need. And addresses a need we've seen multiple times.

controllers/prep_handlers.go Show resolved Hide resolved
controllers/prep_handlers.go Show resolved Hide resolved
internal/common/consts.go Outdated Show resolved Hide resolved
@omertuc omertuc force-pushed the seedformat branch 2 times, most recently from de72c02 to 81b46a2 Compare December 19, 2023 13:21
@omertuc omertuc marked this pull request as ready for review January 2, 2024 16:27
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 2, 2024
// the imager during the image build process, and is only manually bumped by
// developers when the image format changes in a way that is incompatible with
// previous versions of the lifecycle-agent.
func (r *ImageBasedUpgradeReconciler) checkSeedImageCompatibility(ctx context.Context, pullSecretFilename string, seedImageRef string) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Linter is failing:

Suggested change
func (r *ImageBasedUpgradeReconciler) checkSeedImageCompatibility(ctx context.Context, pullSecretFilename string, seedImageRef string) error {
//
//nolint:unparam
func (r *ImageBasedUpgradeReconciler) checkSeedImageCompatibility(ctx context.Context, pullSecretFilename, seedImageRef string) error {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Created #200

internal/common/consts.go Outdated Show resolved Hide resolved
@donpenney
Copy link
Collaborator

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 2, 2024
@omertuc
Copy link
Collaborator Author

omertuc commented Jan 2, 2024

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 2, 2024
@omertuc omertuc force-pushed the seedformat branch 2 times, most recently from 7feb363 to e9defd5 Compare January 2, 2024 19:03
@donpenney
Copy link
Collaborator

/hold until testing is complete

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 2, 2024
IBU reconciler now has a `checkSeedImageCompatibility` method that
checks if the seed image is compatible with the current version of the
lifecycle-agent. It does so by inspecting the OCI image's labels and
checking if the specified format version equals the hard-coded one that
this version of the lifecycle agent expects. That format version is set
by the imager during the image build process, and is only manually
bumped by developers when the image format changes in a way that is
incompatible with previous versions of the lifecycle-agent.
@omertuc
Copy link
Collaborator Author

omertuc commented Jan 3, 2024

Tested

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 3, 2024
@donpenney
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 3, 2024
@browsell
Copy link
Collaborator

browsell commented Jan 3, 2024

/approve

Copy link
Contributor

openshift-ci bot commented Jan 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: browsell

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 3, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit fda9620 into openshift-kni:main Jan 3, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants