-
Notifications
You must be signed in to change notification settings - Fork 44
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
feat(software): Reload repositories after failure #1894
Changes from 17 commits
98e59b1
479d7c8
f9d3c32
e425bb6
2750478
d5fd4a4
f741fcc
84fc31d
28d19b3
fd53849
005f32a
7d1543f
4ca53aa
99d9d48
f2b7fcb
c050f35
eff1a18
455ded2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
------------------------------------------------------------------- | ||
Fri Jan 17 15:50:15 UTC 2025 - Ladislav Slezák <[email protected]> | ||
|
||
- The web server provides /api/software/repositories endpoint | ||
for reading the currently configured repositories, | ||
related to (gh#agama-project/agama#1894) | ||
|
||
------------------------------------------------------------------- | ||
Thu Jan 16 13:10:54 UTC 2025 - Imobach Gonzalez Sosa <[email protected]> | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,24 @@ def issues | |
private_constant :SOFTWARE_INTERFACE | ||
|
||
dbus_interface SOFTWARE_INTERFACE do | ||
# array of repository properties: pkg-bindings ID, alias, name, URL, product dir, enabled | ||
# and loaded flag | ||
dbus_method :ListRepositories, "out Result:a(issssbb)" do | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In storage we are tending to other kind of interfaces. The storage API returns JSON data instead of D-Bus structs, dicts, etc. At the end, we are using D-Bus as a transport layer, and probably we will replace it in the future by a HTTP API. Having JSON data has 2 advandanges in our case:
I guess it is fine to continue with this approach using structs in software. Anyway, we want to rewrite this service in rust. |
||
backend.repositories.repositories.map do |repo| | ||
[ | ||
[ | ||
repo.repo_id, | ||
repo.repo_alias, | ||
repo.name, | ||
repo.raw_url.uri.to_s, | ||
repo.product_dir, | ||
repo.enabled?, | ||
!!repo.loaded? | ||
] | ||
] | ||
end | ||
end | ||
|
||
# value of result hash is category, description, icon, summary and order | ||
dbus_method :ListPatterns, "in Filtered:b, out Result:a{s(sssss)}" do |filtered| | ||
[ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
------------------------------------------------------------------- | ||
Mon Jan 20 14:44:52 UTC 2025 - Ladislav Slezák <[email protected]> | ||
|
||
- The software service provides DBus API for reading the currently | ||
configured repositories, related to (gh#agama-project/agama#1894) | ||
|
||
------------------------------------------------------------------- | ||
Fri Jan 17 20:42:58 UTC 2025 - Josef Reidinger <[email protected]> | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
------------------------------------------------------------------- | ||
Fri Jan 17 15:51:15 UTC 2025 - Ladislav Slezák <[email protected]> | ||
|
||
- The software page displays a link for reloading the repositories | ||
again if some repository failed to load | ||
(gh#agama-project/agama#1894) | ||
|
||
------------------------------------------------------------------- | ||
Thu Jan 16 13:11:06 UTC 2025 - Imobach Gonzalez Sosa <[email protected]> | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. But there is not need to do it right now.