forked from agama-project/agama
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Issue #932 Fixed #1
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Knut Alejandro Anderssen González <kanderssen@suse.de>
## Problem Until now, the communication between our network model and its D-Bus interface worked only in one direction (from D-Bus to the model). And that was pretty limiting. ## Solution In #885 we introduce the usage of `oneshot::channel()` to enable bi-directional communication between the model and the D-Bus interface. It worked rather well, so it is time to extend this approach. Some use cases that are covered: * Perform a complex validation in the model (considering the whole model) and return the result to the D-Bus interface. * Return the D-Bus path of a new connection (implemented in this PR). But there is another interesting implication: the model is the single source of truth (no more cloned data in the interface). In the future, we are expected to listen to NetworkManager and update some parts of our model accordingly. Not having to replicate that information to D-Bus (except when new things add or disappear) makes things easier. Note: `org.opensuse.Agama1.Network.Device` and `org.opensuse.Agama1.Network.Devices` are excluded by now. ## Testing - *Added a new unit test* - *Tested manually* ## To do - [x] Reduce the boilerplate associated to the usage of channels.
Agama-weblate commit: 2ad365d9d13ef872b40b5aa4fb5bd4e99f104def
Updating the service translation files from the agama-weblate repository
- Fix several issues detected by Clippy. - Rename agama-dbus-server "locale" to "l10n" (to avoid `locale/locale`). - Define some 'types' for D-Bus proxies to make easier to read the code. - Run Clippy in the continuous integration.
Agama-weblate commit: d0322d40d617c6790d5a2767fd47ca98ff25f3e0
Updating the service translation files from the agama-weblate repository
* It prevents a "future cannot be sent between threads safely" error.
* Drop the ObjectsRegistry mutex and use message passing. * Use `async_trait` in the network Adapter trait, although it should not be needed in version 1.75 (another PR would follow). * Set the minimal version to 1.74. * Improve ServiceError messages.
Updating the tree must be done in a separate task. Otherwise, it could fight with an incoming request for the ObjectServer mutex, blocking the actions dispatching.
## Problem If the network service receives an `Apply` at the same time as any other request, it may get blocked. ## Solution Updating the tree must be done in a separate task. Otherwise, it could fight with an incoming request for the ObjectServer mutex, blocking the actions dispatching. ## Using tokio-console I decided to use [tokio-console](https://docs.rs/tokio-console/latest/tokio_console/) to make it easier to find the problem. This tool collects and displays information about the asynchronous tasks in your program. In the screenshot below you can see that the D-Bus `Set` dispatchers are blocked. ![Captura desde 2023-12-29 10-52-45](https://github.com/openSUSE/agama/assets/15836/648e5f1e-eb6b-431b-be40-45cdeaf9e980) Once you find the problem, it is kind of "obvious", but it may take some time until you figure out what is happening. To use `tokio-console` you need to add some instrumentation to your program and, at this point, it implies adding some unstable Tokio APIs. So if you want to give it a try, you can try the code in the [tokio-console branch](https://github.com/openSUSE/agama/compare/tokio-console).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
When editing a file system, the form shows a disabled selector for the mount point field. Using a disabled widget does not make sense in this case because the mount point will never be editable. The disabled widget should be replaced by plain text.
Moreover, the selector currently uses a FormSelect component. It should be replaced by the Select component, similar to the file system type selector.
Solution
I am new to open-source contributions so I don't know how to test the react components properly. Sorry for the inconvenience.
I wanted to attach screenshots too but I'm having a problem setting up the project using Virtual Machine.