Skip to content

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

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
stefanonardo:OCPBUGS-81630
Apr 21, 2026
Merged

OCPBUGS-81630: Fix unnecessary error on Node Terminal tab#16263
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
stefanonardo:OCPBUGS-81630

Conversation

@stefanonardo

@stefanonardo stefanonardo commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

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
  • Guard useEffect cleanup against undefined namespace to prevent TypeError when the component unmounts before pod creation completes
  • Add 7 unit tests covering loading, error, and running states

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
  • Delete the debug pod while terminal is open — "Debug pod not found or was deleted." error appears
  • Unit tests pass: yarn test -- NodeTerminal.spec.tsx

🤖 Generated with Claude Code

@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

coderabbitai Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

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.

@rhamilto rhamilto left a comment

Copy link
Copy Markdown
Member

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 lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 7, 2026
@stefanonardo

Copy link
Copy Markdown
Contributor Author

/retest-required

@stefanonardo

Copy link
Copy Markdown
Contributor Author

/assign @yapei

@stefanonardo

Copy link
Copy Markdown
Contributor Author

/retest

@stefanonardo

Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 9, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@stefanonardo: This pull request references Jira Issue OCPBUGS-81630, 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.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh

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-bot

Copy link
Copy Markdown
Contributor

/jira refresh

The requirements for Jira bugs have changed (Jira issues linked to PRs on main branch need to target different OCP), recalculating validity.

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@openshift-bot: This pull request references Jira Issue OCPBUGS-81630, which is valid.

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

In response to this:

/jira refresh

The requirements for Jira bugs have changed (Jira issues linked to PRs on main branch need to target different OCP), recalculating validity.

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.

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.

Also guard useEffect cleanup against undefined namespace to prevent
TypeError when component unmounts before pod creation completes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 20, 2026
@openshift-ci-robot openshift-ci-robot added jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. and removed jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Apr 20, 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 either version "5.0." or "openshift-5.0.", but it targets "4.22.0" instead

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.

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
  • Guard useEffect cleanup against undefined namespace to prevent TypeError when the component unmounts before pod creation completes
  • Add 7 unit tests covering loading, error, and running states

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
  • Delete the debug pod while terminal is open — "Debug pod not found or was deleted." error appears
  • Unit tests pass: yarn test -- NodeTerminal.spec.tsx

🤖 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.

@stefanonardo

Copy link
Copy Markdown
Contributor Author

/retest-required

@rhamilto

Copy link
Copy Markdown
Member

/lgtm
/approve

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 20, 2026
@openshift-ci

openshift-ci Bot commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

[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

@stefanonardo

Copy link
Copy Markdown
Contributor Author

/verified by tests

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Apr 21, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@stefanonardo: This PR has been marked as verified by tests.

Details

In response to this:

/verified by tests

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.

@stefanonardo

Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 21, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

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

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

In response to this:

/jira refresh

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 commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

@stefanonardo: all tests passed!

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.

@openshift-merge-bot openshift-merge-bot Bot merged commit 49c7b3d into openshift:main Apr 21, 2026
8 checks passed
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@stefanonardo: Jira Issue Verification Checks: Jira Issue OCPBUGS-81630
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-81630 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

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
  • Guard useEffect cleanup against undefined namespace to prevent TypeError when the component unmounts before pod creation completes
  • Add 7 unit tests covering loading, error, and running states

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
  • Delete the debug pod while terminal is open — "Debug pod not found or was deleted." error appears
  • Unit tests pass: yarn test -- NodeTerminal.spec.tsx

🤖 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-merge-robot

Copy link
Copy Markdown
Contributor

Fix included in release 5.0.0-0.nightly-2026-04-22-034352

@stefanonardo stefanonardo deleted the OCPBUGS-81630 branch April 30, 2026 11:31
@stefanonardo

Copy link
Copy Markdown
Contributor Author

/cherry-pick release-4.22

@openshift-cherrypick-robot

Copy link
Copy Markdown

@stefanonardo: new pull request created: #16696

Details

In response to this:

/cherry-pick release-4.22

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.

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/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. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants