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

agama config load/store for "storage" uses the HTTP API #1600

Merged
merged 6 commits into from
Sep 18, 2024

Conversation

mvidner
Copy link
Member

@mvidner mvidner commented Sep 13, 2024

Problem

To recap:

When moving to the new HTTP-based architecture, we took some shortcuts. One of them was not using HTTP clients in the command-line interface.

Solution

  • Add StorageHTTPClient
  • This 🛑 ends D-Bus 🛑 usage from SettingsStore ✔️

Testing

  • Added a new unit test
  • Tested manually: note that it is easy to pass invalid Storage config in this way which will confuse the UI to the point of not rendering the storage parts at all.

Screenshots

No

@coveralls
Copy link

coveralls commented Sep 13, 2024

Coverage Status

coverage: 72.447% (-0.007%) from 72.454%
when pulling dbeb055 on http-client-storage
into bc057f4 on master.

@mvidner
Copy link
Member Author

mvidner commented Sep 13, 2024

Hmm, after load worked on the first try I wondered how store would work. And it does! ... by not validating anything? Is that right?

# echo '{"storage":{"bogus": "validate much?"}}' | agama config load
# agama config show
{
  "user": {
    "...": "...".
  },
  "storage": {
    "bogus": "validate much?"
  }
}

TODO: Is StorageSettings (un)escaped right??
this completes the elimination of D-Bus clients from the CLI use case
for consistency with other FooStore structs
@mvidner mvidner marked this pull request as ready for review September 18, 2024 08:36
Copy link
Member

@imobachgs imobachgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats! I have added just a minor comment but, otherwise, it LGTM.

rust/agama-server/src/storage/web.rs Outdated Show resolved Hide resolved
Co-authored-by: Imobach González Sosa <igonzalezsosa@suse.com>
@mvidner mvidner merged commit eb86857 into master Sep 18, 2024
2 checks passed
@mvidner mvidner deleted the http-client-storage branch September 18, 2024 09:03
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.

3 participants