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

Fix error message being lost when upgrading #6815

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sebsoto
Copy link
Contributor

@sebsoto sebsoto commented Aug 15, 2024

Description of the change:
Fixes an issue where an error message was being discarded. Occurs when upgrading a bundle.

Motivation for the change:

Checklist

If the pull request includes user-facing changes, extra documentation is required:

Fixes an issue where an error message was being discarded. Occurs when
upgrading a bundle.

Signed-off-by: Sebastian Soto <[email protected]>
Copy link

@saifshaikh48 saifshaikh48 left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

openshift-ci bot commented Aug 15, 2024

@saifshaikh48: changing LGTM is restricted to collaborators

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@@ -451,7 +451,7 @@ func (c IndexImageCatalogCreator) UpdateCatalog(ctx context.Context, cs *v1alpha
// check if index image adopts File-Based Catalog or SQLite index image format
isFBCImage, err := fbcutil.IsFBC(ctx, c.IndexImage)
if err != nil {
return fmt.Errorf("error in upgrading the bundle %q that was installed traditionally", c.BundleImage)
return fmt.Errorf("unable to determine if index image adopts File-Based Catalog or SQLite format: %v", err)
Copy link

@saifshaikh48 saifshaikh48 Aug 15, 2024

Choose a reason for hiding this comment

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

consider including the index image in the error message.

e.g.
fmt.Errorf("unable to determine if index image %q adopts File-Based Catalog or SQLite format: %v", c.IndexImage, err)

Choose a reason for hiding this comment

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

if so, also update here

// check if index image adopts File-Based Catalog or SQLite index image format
isFBCImage, err := fbcutil.IsFBC(ctx, c.IndexImage)
if err != nil {
return fmt.Errorf("unable to determine if index image adopts File-Based Catalog or SQLite format: %v", err)
}

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.

3 participants