Skip to content

Conversation

@joseivanlopez
Copy link
Contributor

@joseivanlopez joseivanlopez commented Jul 3, 2025

Problem

The storage config is lost after registering a product.

https://bugzilla.suse.com/show_bug.cgi?id=1245400

Solution

Reprobe the system instead of a complete probing.

Note: in the future, a better solution will be implemented to avoid delegating the reprobing call to the clients, see https://gist.github.com/joseivanlopez/8d8103ffd4a8e5539046cb6e134be05f.

@coveralls
Copy link

coveralls commented Jul 4, 2025

Coverage Status

coverage: 64.409% (-0.01%) from 64.423%
when pulling f8e6b54 on joseivanlopez:reprobe
into 7c9844d on agama-project:master.

@joseivanlopez joseivanlopez marked this pull request as ready for review July 4, 2025 11:25
- Service status: only #start_up needs to manage the service status.
  The rest of methods are always called from D-Bus methods, which
  already manage the service status.
- Reprobing: hack for forcing reprobing is not needed anymore.
const probe = () => post("/api/manager/probe_sync");

/**
* Triggers a synchronous reprobing process.
Copy link
Contributor

Choose a reason for hiding this comment

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

Jus a question, does Agama server provide their async counterparts? Asking because I also see in manager "probe_sync" and "probe".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, an async version is not needed yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Anyway, all this about sync/async probing/reprobing is something to revisit. For now, just following the current approach.

Copy link
Contributor

@dgdavid dgdavid Jul 7, 2025

Choose a reason for hiding this comment

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

Anyway, all this about sync/async probing/reprobing is something to revisit.

Great then.

Thank you

Copy link
Contributor

@dgdavid dgdavid left a comment

Choose a reason for hiding this comment

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

As per my limited Rust knowledge, LGTM

pub async fn reprobe(&self) -> Result<(), ManagerHTTPClientError> {
// BaseHTTPClient did not anticipate POST without request body
// so we pass () which is rendered as `null`
Ok(self.client.post_void("/manager/reprobe_sync", &()).await?)
Copy link
Contributor

Choose a reason for hiding this comment

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

🤯

@joseivanlopez joseivanlopez merged commit 94d46cc into agama-project:master Jul 7, 2025
9 checks passed
@imobachgs imobachgs mentioned this pull request Jul 21, 2025
imobachgs added a commit that referenced this pull request Jul 21, 2025
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