-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
PodmanLogin and InjectKubeConfig Requests Fail When Dashboard Runs in a Single Tab.
When a workspace transitions to RUNNING status, the dashboard simultaneously triggers two parallel operations:
- Background API calls to inject kubeconfig and perform podman login into workspace containers
- UI navigation to redirect the browser to the workspace IDE URL
When the Eclipse Che Dashboard is running in a single browser tab (no additional tabs open), the injectKubeConfig and podmanLogin API requests can fail because the browser cancels pending HTTP requests when navigating away from the current page.
The Race Condition
┌─────────────────────────────────────────────────────────────────────────────┐
│ WebSocket: Workspace RUNNING │
└─────────────────────────────────────────────────────────────────────────────┘
│
┌───────────────────────┴───────────────────────┐
▼ ▼
┌─────────────────────────────────┐ ┌─────────────────────────────────┐
│ handleWebSocketMessage() │ │ Redux Store Update │
│ │ │ (workspace.status = RUNNING) │
└─────────────────────────────────┘ └─────────────────────────────────┘
│ │
▼ ▼
┌─────────────────────────────────┐ ┌─────────────────────────────────┐
│ async injectKubeConfig() │ │ OpenWorkspace.runStep() │
│ async podmanLogin() │ │ detects workspace.isRunning │
│ │ │ │
│ (HTTP POST requests start) │ │ checks isAvailableEndpoint() │
└─────────────────────────────────┘ └─────────────────────────────────┘
│ │
│ ▼
│ ┌─────────────────────────────────┐
│ │ tabManager.replace(ideUrl) │
│ │ → window.location.replace() │
│ └─────────────────────────────────┘
│ │
▼ ▼
┌─────────────────────────────────┐ ┌─────────────────────────────────┐
│ ❌ HTTP Requests CANCELLED │ │ ✓ Browser navigates to IDE │
│ (page is navigating away) │ │ │
└─────────────────────────────────┘ └─────────────────────────────────┘
Che version
7.112@latest
Steps to reproduce
- Deploy Eclipse Che
- (Optional) Configure external docker registries in the Dashboard to make the issue more visible
- Open the Eclipse Che Dashboard in a browser:
{che-server}/dashboard/ - Close all other browser tabs - ensure the dashboard is running in the only open tab
- Open browser DevTools → Network tab (filter by "XHR" or "Fetch" for clarity)
- Navigate to a factory URL by changing the browser address to:
{che-server}/dashboard/#https://registry.devfile.io/devfiles/nodejs-mongodb/1.0.0 - Observe the workspace creation and starting process in the Network tab
- When the workspace transitions to
RUNNING:- Note the
kubeconfigPOST request is initiated - Observe that the page immediately redirects to the IDE URL
- The
kubeconfigrequest shows as "cancelled" status in the Network tab
- Note the
Note: Due to the sequential nature of the API calls (
injectKubeConfigis called first, thenpodmanLogin), the behavior depends on network timing:
- If the IDE URL availability check (
isAvailableEndpoint) takes longer,kubeconfigmay complete successfully, butpodmanloginwill still be cancelled- If the IDE URL is immediately available, both requests will be cancelled
Expected behavior
The injectKubeConfig and podmanLogin API calls should complete successfully before the browser navigates to the IDE URL, ensuring that:
- The kubeconfig is properly injected into workspace containers
- Podman is authenticated with the OpenShift internal registry
- Podman is authenticated with any external docker registries configured by the user
Runtime
OpenShift
Screenshots
Installation method
chectl/latest
Environment
macOS
Eclipse Che Logs
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status