Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion rust/agama-manager/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,25 @@ impl Service {
.await?;
Ok(is_empty)
}

/// Returns the product configuration.
///
/// When the software is busy, the configuration will not include the product
/// information. However, most of that information is already available in the
/// manager service.
async fn product_software_config(&self) -> Result<Option<api::software::Config>, Error> {
let Some(product) = &self.product else {
return Ok(None);
};

let mut software_config = self.config.software.clone().unwrap_or_default();
let product_config = software_config.product.get_or_insert_default();
let product = product.read().await;
product_config.id = Some(product.id.clone());
product_config.mode = product.mode.clone();

Ok(Some(software_config))
}
}

impl Actor for Service {
Expand Down Expand Up @@ -658,7 +677,7 @@ impl MessageHandler<message::GetExtendedConfig> for Service {
let software = if self.is_software_available().await? {
Some(self.software.call(software::message::GetConfig).await?)
} else {
None
self.product_software_config().await?
};

Ok(Config {
Expand Down
2 changes: 1 addition & 1 deletion rust/agama-utils/src/api/question.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ impl Action {
pub struct Answer {
#[serde(alias = "answer")]
pub action: String,
#[serde(alias = "password")]
#[serde(alias = "password", skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}

Expand Down
11 changes: 11 additions & 0 deletions rust/package/agama.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Thu Jan 29 07:04:09 UTC 2026 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- Expose the product configuration even in the software service is busy
(bsc#1257443).

-------------------------------------------------------------------
Thu Jan 29 06:24:00 UTC 2026 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- Fix answers validation (gh#agama-project/agama#3094).

-------------------------------------------------------------------
Wed Jan 28 17:07:32 UTC 2026 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

Expand Down
Loading