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

fix: display error messages during installation #1909

Merged
merged 6 commits into from
Jan 16, 2025
Merged

Conversation

imobachgs
Copy link
Contributor

@imobachgs imobachgs commented Jan 16, 2025

Problem

If something goes wrong during packages installation, Agama web UI does not show any message. We
found out that there are some problems:

  • When the connection goes down, TanStack Query will not perform any request (until the network is
    up).
  • The UI might loose the QuestionsChanged event if it is reconnecting the WebSocket at that point.

Solution

To overcome those problems, we have introduced the following changes:

  • Set TanStack Query network mode to "always" when running on localhost.
  • Invalidate questions query when the WebSocket is reconnected to make sure we do not miss any
    message.

Note

We could play with the refetchOnReconnect setting at global level. But let's be conservative at
this point.

Additional changes

agama-web-server:

  • Exit the WebSocket handler when the client is disconnected
  • Log the events

web UI:

  • refactor(web): expose onerror and onclose at WSClient level

Testing

  • Tested manually

Screenshots

Error message from libzypp

@imobachgs imobachgs marked this pull request as ready for review January 16, 2025 13:36
@imobachgs imobachgs merged commit 33324bd into master Jan 16, 2025
7 checks passed
@imobachgs imobachgs deleted the fix-error-reporting branch January 16, 2025 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants