Skip to content

pkg/manifests: fix dropped walk errors#495

Open
alrs wants to merge 1 commit into
operator-framework:masterfrom
alrs:manifest-walk-errs
Open

pkg/manifests: fix dropped walk errors#495
alrs wants to merge 1 commit into
operator-framework:masterfrom
alrs:manifest-walk-errs

Conversation

@alrs
Copy link
Copy Markdown

@alrs alrs commented May 29, 2026

A filepath.Walk() function takes an error as one of its arguments. Usually the first thing to do in a Walk() is to check if the err provided is not nil and should be returned. This fixes three places in pkg/manifests where a WalkFunc() was not handling the err.

Tests continue to pass.

Signed-off-by: Lars Lehtonen <lars.lehtonen@gmail.com>
Copilot AI review requested due to automatic review settings May 29, 2026 21:41
@openshift-ci openshift-ci Bot requested review from fgiudici and oceanc80 May 29, 2026 21:41
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 29, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign grokspawn for approval. For more information see the Code Review Process.

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

Details 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

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds early error handling at the start of filepath.WalkFunc implementations to propagate errors received from the walker before attempting further processing.

Changes:

  • Return early when the incoming err parameter is non-nil in LoadPackagesWalkFunc and LoadBundleWalkFunc in packagemanifestloader.go.
  • Apply the same early-return guard in bundleLoader.LoadBundleWalkFunc.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/manifests/packagemanifestloader.go Propagates walker errors early in both walk functions before file inspection.
pkg/manifests/bundleloader.go Propagates walker errors early in the bundle loader's walk function.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants