redhat-developer / redhat-developer/vscode-openshift-tools

Application Explorer is slow to load when there are many k8s contexts

Open
#2,918 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug
Dominant language
TypeScript
Stars
123
Forks
63
Avg merge
6h 16m
Merged PRs (30d)
74

Description

To reproduce:

  1. Connect to a local OpenShift or Kubernetes cluster, such as crc, kind, minikube
  2. Create a bunch of namespaces/projects using odo create namespace (make around 25)
  3. Double check under the Kubernetes Explorer that there are >= 20 items listed under "Clusters"
  4. Log out of the cluster and shut it down so that it's inaccessible
  5. (Re)load the extension and immediately navigate to the "Application Explorer"

Expected: within in a few seconds, the extension detects that the cluster is not accessible, and presents buttons that the user can use to login in to a cluster

Actual: The buttons appear fairly fast, but they will be greyed out, and a progress bar is displayed. It takes much longer for the progress bar to complete and the buttons to be clickable than when there were less namespaces/projects.

The result of this bug is that the extension appears to take longer to load after you have been playing around with Kubernetes for a while.

Also, the public UI tests for vscode-openshift might start failing on your computer, since the testing framework cannot detect the buttons properly if they are greyed out, and one of our tests checks if the buttons are present.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the delay with at least 20 items under Kubernetes Explorer, then navigate immediately to the Application Explorer after shutting down the cluster. Start by examining the public UI tests for vscode-openshift and the Application Explorer loading behavior; done means the login buttons become clickable promptly and the affected UI test passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, typescript, vscode
Domain
cloud, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.