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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/olm/operator/registry/index_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

}
c.HasFBCLabel = isFBCImage

Expand Down
Loading