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

Product selection has to be an atomic action #1005

Open
joseivanlopez opened this issue Jan 18, 2024 · 0 comments
Open

Product selection has to be an atomic action #1005

joseivanlopez opened this issue Jan 18, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@joseivanlopez
Copy link
Contributor

joseivanlopez commented Jan 18, 2024

When a product is selected, the manager service performs its config phase. That phase consists on a set of steps: storage probing, storage proposal, software probing, etc. And nothing prevents new D-Bus calls to be dispatched in middle of the proccess, which has several implications:

  • Some changes can be lost. For example, if you request a storage proposal before the config phase is done, then your proposal could be overwritten by the proposal requested by the manager service.
  • If you request some information before finishing the config phase, then the result could be misleading. For example, checking for the availability of a package before the software proposal is done.

Selecting a new product should be an atomic action, preventing certain interactions till the process is completed.

@joseivanlopez joseivanlopez added the enhancement New feature or request label Jan 18, 2024
joseivanlopez added a commit that referenced this issue Jan 19, 2024
## Problem

The call to the sotware service to check for the availability of a
package is mocked and always returns true, assuming the package is
always available. Of course, the availability of a package depends of
the currently selected product.

## Solution

Perform a D-Bus call to the software service in order to know if a
package is available.

Note: This change exposes a problem in our services. Asking for the
product availability should be done once the software proposal is done,
otherwise the result is not reliable at all, see
#1005. For example, the TPM
option in the storage settings could not appear until the software
service has finished, see #995.

## Testing

* Added new unit tests
* Tested manually
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant