Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not loop forever when message when Gateway API is not available #2738

Closed
Tracked by #2733
joaquimrocha opened this issue Jan 9, 2025 · 8 comments
Closed
Tracked by #2733
Assignees
Labels
bug Something isn't working
Milestone

Comments

@joaquimrocha
Copy link
Collaborator

joaquimrocha commented Jan 9, 2025

See #2504 (comment) for context.
Like other views, we need to account for whether this is resource is available.

@joaquimrocha joaquimrocha added blocker Completely prevents the user from using the software. bug Something isn't working labels Jan 9, 2025
@joaquimrocha joaquimrocha moved this from Queued to Proposed in Release Plan / Roadmap Jan 9, 2025
@joaquimrocha joaquimrocha moved this from Proposed to Queued in Release Plan / Roadmap Jan 9, 2025
@joaquimrocha joaquimrocha added this to the v0.28.0 milestone Jan 9, 2025
@illume illume removed the blocker Completely prevents the user from using the software. label Jan 9, 2025
@farodin91
Copy link
Contributor

@joaquimrocha Do you any link how it is done in different locations?

@joaquimrocha
Copy link
Collaborator Author

joaquimrocha commented Jan 10, 2025

The useList function, which we use for most listings, returns results as null till the fetching is done. After that, if there's an error, we display it (otherwise the results are shown). E.g.:

const { items, error, clusterErrors } = resourceClass.useList({ namespace: useNamespaces() });

errorMessage={resourceClass.getErrorMessage(error)}

@joaquimrocha
Copy link
Collaborator Author

@farodin91 Let me know if you are taking a look or whether you prefer us to do it. Cheers.

@farodin91
Copy link
Contributor

I'll try checkout these ideas in the evening.

@joaquimrocha
Copy link
Collaborator Author

Hi @farodin91 . We would like to release this week with a fix for this. Let me know if you were able to take a look or whether we should take it. Sorry for the pressure, just trying to understand how we should move.

@farodin91
Copy link
Contributor

@joaquimrocha Go for it. My last week were pretty full.

@joaquimrocha
Copy link
Collaborator Author

@sniok URGENT: Turns out this is an existing error in the useKubeObjectList logic and so it's currently affecting Headlamp when there's no endpoint for a certain resource. There are two problems:

  1. We are not throwing an exception when no endpoint is available and instead we pretend that the list of items is just empty.
  2. There's no single error being exported from useList, and thus this line in ResourceTable is wrong:
    const { items, error, clusterErrors } = resourceClass.useList({ namespace: useNamespaces() });

We should also probably fix the issue that we're not passing the endpoints for the desired cluster when querying.

@joaquimrocha
Copy link
Collaborator Author

Fixed with #2766

@github-project-automation github-project-automation bot moved this from In Progress to Done in Release Plan / Roadmap Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

4 participants