Skip to content

fix(rust): do not try to connect when it is not needed#2192

Merged
imobachgs merged 3 commits intomasterfrom
no-client
Mar 24, 2025
Merged

fix(rust): do not try to connect when it is not needed#2192
imobachgs merged 3 commits intomasterfrom
no-client

Conversation

@imobachgs
Copy link
Contributor

@imobachgs imobachgs commented Mar 22, 2025

Problem

Agama CLI tries to connect to the HTTP server even when it is unnecessary. For instance, when running the agama download, the client will try to connect to the HTTP server.

Solution

With this change, the Agama CLI will connect to the server only when needed.

Testing

  • Tested manually

Future work

I decided to make a simple fix because we plan to redesign the commands.

* Do not build the HTTP client for those commands
  that do not need one.
@imobachgs imobachgs merged commit 9e71c03 into master Mar 24, 2025
7 checks passed
@imobachgs imobachgs deleted the no-client branch March 24, 2025 07:23
@imobachgs imobachgs mentioned this pull request Mar 27, 2025
imobachgs added a commit that referenced this pull request Mar 27, 2025
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Mar 27, 2025
https://build.opensuse.org/request/show/1256465
by user IGonzalezSosa + anag+factory
- Version 13

- Support for manual files deployment in unattended mode
  (gh#agama-project/agama#2121)

- Do not try to connect to the HTTP server when it is not needed
  (gh#agama-project/agama#2192).

- Add extensions from the registration server (automatic
  installation only) (jsc#AGM-100)

- Improve init scripts execution (gh#agama-project/agama#2161):
  * Properly run the scripts (gh#agama-project/agama#2144).
  * Allow setting the scripts path with the SCRIPTS_DIR
    environment variable.
  * Do not exit with an error if there are not scripts.
  * Make agama-scripts.sh idempotent.

- Extend storage model schema with LVM (gh#agama-project/agama#2089).
imobachgs added a commit that referenced this pull request Apr 2, 2025
## Problem

YaST-like URLs are not supported for info files because we use CURL to
retrieve the file.

Fixes #2176.

## Solution

Use "agama download" to get the info file.

## Testing

- Updated the integration test.

> [!WARNING]
> The tests fail because the `agama download` command tries to connect
to the Agama HTTP server even if unnecessary. See
#2192 for a fix.
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