redhat-developer / odo

odo - Developer-focused CLI for fast & iterative container-based application development on Podman and Kubernetes. Implementation of the open Devfile standard.
https://odo.dev
Apache License 2.0
774 stars 244 forks source link

`odo preference view -o json` takes a long time if cluster is inaccessible #7205

Open datho7561 opened 5 months ago

datho7561 commented 5 months ago

/kind bug

What versions of software are you using?

Operating System: Fedora 39

Output of odo version:

===============================================
⚠  unable to fetch the cluster server version
===============================================
odo v3.15.0 (10b5e8a8f)

Podman Client: 4.9.0

How did you run odo exactly?

Set my ~/.kube/config to point to my crc cluster, which is stopped. Then I run : odo preference view -o json

Actual behavior

Takes around 40 seconds

Expected behavior

Takes < 1 second

Any logs, error output, etc?

datho7561 commented 5 months ago

It seems like it's checking the status of the cluster, but I don't see why this would be needed for this command.

rm3l commented 5 months ago

odo preference view lists all the Devfile Registries odo can use, and (since odo v3.8.0) it also tries to list those coming from the current cluster. That's why it is trying to contact the current cluster. More details in https://odo.dev/docs/user-guides/advanced/using-in-cluster-devfile-registry/

Actual behavior

Takes around 40 seconds

I guess any oc/kubectl command communicating with the cluster would take the same amount of time, right?

datho7561 commented 5 months ago

Okay, thanks! I didn't know that the cluster could provide Devfiles

I guess any oc/kubectl command communicating with the cluster would take the same amount of time, right?

Yes, odo version takes around the same amount of time as odo preference view.

github-actions[bot] commented 2 months ago

A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.

rm3l commented 2 months ago

/remove-lifecycle stale /lifecycle frozen