Skip to content

Conversation

@Leo6Leo
Copy link
Contributor

@Leo6Leo Leo6Leo commented Nov 19, 2025

Description

The log in the console backend will print out this error:

failed to get new config for olm client

@coderabbitai
Copy link

coderabbitai bot commented Nov 19, 2025

Walkthrough

Modified the checkPackageManifestHandler function in pkg/olm/handler.go to pass the incoming HTTP request to getClientWithScheme instead of passing nil. The change affects how the client is constructed with scheme and context information. Error handling remains unchanged.

Changes

Cohort / File(s) Summary
Client Construction Update
pkg/olm/handler.go
Modified checkPackageManifestHandler to pass the incoming HTTP request (r) to getClientWithScheme instead of nil, altering the client construction context.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify that passing the HTTP request context to getClientWithScheme produces the expected behavior (scheme resolution and request-scoped context handling)
  • Confirm that the HTTP request (r) is available and properly initialized at this call site
  • Assess whether this change impacts request lifecycle, context propagation, or authentication/authorization flows
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 5bde0aa and b8e9d2e.

📒 Files selected for processing (1)
  • pkg/olm/handler.go (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • pkg/olm/handler.go
🔇 Additional comments (1)
pkg/olm/handler.go (1)

112-117: Client initialization now matches other handlers and should prevent nil-request panics

Passing r into o.getClientWithScheme here aligns this handler with operandsListHandler and avoids the previous risk of panics or misconfigured clients when a nil request was passed. The change is minimal, localized, and should be safe while addressing the reported issue.

Please verify in your cluster that navigating to the dashboard no longer triggers the panic and that permission checks for this call behave as expected with the request-scoped client.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot requested review from TheRealJon and jhadvig November 19, 2025 19:58
@openshift-ci openshift-ci bot added the component/backend Related to backend label Nov 19, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 19, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found 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
Copy link
Contributor

openshift-ci bot commented Nov 19, 2025

@Leo6Leo: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-console b8e9d2e link true /test e2e-gcp-console

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@Leo6Leo Leo6Leo changed the title OCPBUGS-65804Fix: Update client initialization in checkPackageManifestHandler OCPBUGS-65804 - Update client initialization in checkPackageManifestHandler Nov 20, 2025
@Leo6Leo Leo6Leo changed the title OCPBUGS-65804 - Update client initialization in checkPackageManifestHandler OCPBUGS-65804: Update client initialization in checkPackageManifestHandler Nov 20, 2025
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Nov 20, 2025
@openshift-ci-robot
Copy link
Contributor

@Leo6Leo: This pull request references Jira Issue OCPBUGS-65804, which is invalid:

  • expected the bug to target the "4.21.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Description

The log in the console backend will print out this error when visiting the dashboard from the console frontend.

goroutine 199 [running]:
net/http.(*conn).serve.func1()
  /opt/homebrew/Cellar/go/1.24.4/libexec/src/net/http/server.go:1947 +0xb0
panic({0x1059c4c80?, 0x107a56360?})    

That is referenced here as well: #15711 (comment)

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 openshift-eng/jira-lifecycle-plugin repository.

@Leo6Leo
Copy link
Contributor Author

Leo6Leo commented Nov 20, 2025

/jira refresh

Review
/assign @TheRealJon @krishagarwal278

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Nov 20, 2025
@openshift-ci-robot
Copy link
Contributor

@Leo6Leo: This pull request references Jira Issue OCPBUGS-65804, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

In response to this:

/jira refresh

Review
/assign @TheRealJon @krishagarwal278

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Nov 20, 2025
@openshift-ci openshift-ci bot requested a review from yapei November 20, 2025 22:42
@openshift-ci-robot
Copy link
Contributor

@Leo6Leo: This pull request references Jira Issue OCPBUGS-65804, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

In response to this:

Description

The log in the console backend will print out this error:

failed to get new config for olm client

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 openshift-eng/jira-lifecycle-plugin repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/backend Related to backend jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants