Skip to content

OCPBUGS-81630: Fix unnecessary error on Node Terminal tab#16263

Open
stefanonardo wants to merge 1 commit intoopenshift:mainfrom
stefanonardo:OCPBUGS-81630
Open

OCPBUGS-81630: Fix unnecessary error on Node Terminal tab#16263
stefanonardo wants to merge 1 commit intoopenshift:mainfrom
stefanonardo:OCPBUGS-81630

Conversation

@stefanonardo
Copy link
Copy Markdown
Contributor

@stefanonardo stefanonardo commented Apr 7, 2026

Summary

  • Fix premature "Debug pod not found or was deleted." error when visiting Compute > Nodes > Terminal tab
  • The error flashed briefly because useK8sWatchResource(null) returns loaded=true before pod creation completes
  • Show a loading spinner while the debug pod is still being created, matching the pattern used in debug-terminal.tsx

Test plan

  • Navigate to Compute > Nodes > pick a node > Terminal tab
  • Confirm no flash of "Debug pod not found or was deleted." error
  • Confirm loading spinner shows until the debug pod is Running, then terminal opens
  • Confirm errors still display properly if pod creation fails (e.g., permissions issue)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved node terminal initialization to properly display a loading state while the debug pod is being set up, preventing incomplete content from rendering prematurely.

@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 Apr 7, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@stefanonardo: This pull request references Jira Issue OCPBUGS-81630, which is invalid:

  • expected the bug to target the "4.22.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.

Details

In response to this:

Summary

  • Fix premature "Debug pod not found or was deleted." error when visiting Compute > Nodes > Terminal tab
  • The error flashed briefly because useK8sWatchResource(null) returns loaded=true before pod creation completes
  • Show a loading spinner while the debug pod is still being created, matching the pattern used in debug-terminal.tsx

Test plan

  • Navigate to Compute > Nodes > pick a node > Terminal tab
  • Confirm no flash of "Debug pod not found or was deleted." error
  • Confirm loading spinner shows until the debug pod is Running, then terminal opens
  • Confirm errors still display properly if pod creation fails (e.g., permissions issue)

🤖 Generated with Claude Code

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 openshift-ci bot requested review from cajieh and jhadvig April 7, 2026 12:59
@openshift-ci openshift-ci bot added the component/core Related to console core functionality label Apr 7, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 11c42283-0ce3-43de-a0ba-a6b7507d859e

📥 Commits

Reviewing files that changed from the base of the PR and between d0f1252 and 170581d.

📒 Files selected for processing (1)
  • frontend/packages/console-app/src/components/nodes/NodeTerminal.tsx
📜 Recent review details
🧰 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:

  • frontend/packages/console-app/src/components/nodes/NodeTerminal.tsx
🔇 Additional comments (1)
frontend/packages/console-app/src/components/nodes/NodeTerminal.tsx (1)

254-255: Good lifecycle guard for initial pod creation state.

This loading branch should prevent the transient “Debug pod not found or was deleted.” error while the debug pod is still being created.

As per coding guidelines, "**: Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."


📝 Walkthrough

Walkthrough

The NodeTerminal component was updated to add proper loading state handling. Previously, the component would render NodeTerminalInner based solely on whether an errorMessage existed, regardless of the podName state. The change introduces an additional conditional branch: when no errorMessage is present AND the podName is falsy—indicating the debug pod hasn't been initialized yet—the component now renders a LoadingBox instead of attempting to render the inner component. This modification adds two lines of code with no removals.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Show a loading spinner while the debug pod is being created, instead of
briefly flashing "Debug pod not found or was deleted." The error occurred
because useK8sWatchResource(null) returns loaded=true before pod creation
completes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@rhamilto rhamilto left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 7, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 7, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhamilto, stefanonardo

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 7, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 7, 2026

@stefanonardo: 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 28239f2 link true /test e2e-gcp-console

Full PR test history. Your PR dashboard.

Details

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.

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. component/core Related to console core functionality jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants