Integrate signed agent catalog, tenant enrollment and HTTPS installers

This commit is contained in:
2026-11-17 15:56:18 +01:00
parent 689f326460
commit 7fd17272d5
70 changed files with 12982 additions and 327 deletions
+14 -11
View File
@@ -1091,7 +1091,11 @@ pub async fn operation(
"needs_attention"
} else if c("succeeded") == n {
"succeeded"
} else if c("succeeded") + c("failed") + c("cancelled") + c("expired") + c("closed_unknown")
} else if c("succeeded")
+ c("failed")
+ c("cancelled")
+ c("expired")
+ c("closed_unknown")
== n
{
if c("succeeded") > 0 {
@@ -1242,12 +1246,13 @@ pub async fn close_unknown(
}
let mut tx = rmm_persistence::tenant_tx(&state.pool, tenant).await?;
crate::permissions::require_principal(&mut tx, p, "plans:approve").await?;
let row =
sqlx::query("SELECT attempt_id,state,revision,result FROM jobs WHERE job_id=$1 FOR UPDATE")
.bind(id)
.fetch_optional(&mut *tx)
.await?
.ok_or_else(missing)?;
let row = sqlx::query(
"SELECT attempt_id,state,revision,result FROM jobs WHERE job_id=$1 FOR UPDATE",
)
.bind(id)
.fetch_optional(&mut *tx)
.await?
.ok_or_else(missing)?;
if row.get::<Uuid, _>("attempt_id") != input.attempt_id
|| row.get::<i64, _>("revision") != input.revision
{
@@ -1287,11 +1292,9 @@ pub async fn close_unknown(
.bind(tenant)
.bind(Uuid::new_v4())
.bind(&p.name)
.bind(
json!({"job_id":id,"attempt_id":input.attempt_id,"grant_id":grant,"closure_id":closure,
.bind(json!({"job_id":id,"attempt_id":input.attempt_id,"grant_id":grant,"closure_id":closure,
"original_revision":input.revision,"reason":input.reason,"session_hash":session,
"approval_origin":p.approval_origin(),"testsimulation":p.testsimulation}),
)
"approval_origin":p.approval_origin(),"testsimulation":p.testsimulation}))
.execute(&mut *tx)
.await?;
tx.commit().await?;