diff --git a/backend/windmill-api-settings/src/lib.rs b/backend/windmill-api-settings/src/lib.rs index 6a87e2f9e1..ccc169d0f7 100644 --- a/backend/windmill-api-settings/src/lib.rs +++ b/backend/windmill-api-settings/src/lib.rs @@ -2656,8 +2656,12 @@ async fn write_role_catalog( .rows_affected(); if written == 0 { return Err(error::Error::internal_err( - "The instance Postgres settings row is missing, so the data table role catalog could not be recorded. Refresh the custom instance user password in instance settings to recreate it, then try again." - .to_string(), + concat!( + "The instance Postgres settings row is missing, so the data table role catalog ", + "could not be recorded. Refresh the custom instance user password in instance ", + "settings to recreate it, then try again." + ) + .to_string(), )); } Ok(()) diff --git a/backend/windmill-api-workspaces/src/workspaces.rs b/backend/windmill-api-workspaces/src/workspaces.rs index ca38bfd082..c83e3cc5be 100644 --- a/backend/windmill-api-workspaces/src/workspaces.rs +++ b/backend/windmill-api-workspaces/src/workspaces.rs @@ -2209,7 +2209,9 @@ async fn list_datatables( let mut items = Vec::with_capacity(names.len()); for name in names { // A pointer entry owns no database, so what it resolves to is the only truthful answer - // here; a chain that cannot be followed is reported with what the caller can still see. + // here. One that resolves to nothing — a pointer whose workspace was deleted — is dropped + // rather than listed with a database it does not have; what happened is named where it is + // actionable instead: by the delete that stranded it, and by any attempt to use it. let Ok(governing) = resolve_governing_datatable(&db, &w_id, &name).await else { continue; }; @@ -3681,9 +3683,10 @@ async fn edit_datatable_config( ) .await?; - // Check that non-superadmins are not abusing Instance databases, nor pointing an entry at - // another workspace's data table. Both reach a database this workspace does not own: an - // instance database directly, a reference through whoever governs it. + // Check that non-superadmins are not abusing Instance databases, which reach a database this + // workspace does not own. Pointing an entry at another workspace's data table is not checked + // here because it cannot be requested at all: `reference` is overwritten from the stored entry + // above, for every caller. if !is_superadmin { for (name, dt) in new_config.settings.datatables.iter() { let old_dt = old_datatables.get(name); diff --git a/backend/windmill-api-workspaces/src/workspaces_extra.rs b/backend/windmill-api-workspaces/src/workspaces_extra.rs index 61b4cc39be..1cb5188e5b 100644 --- a/backend/windmill-api-workspaces/src/workspaces_extra.rs +++ b/backend/windmill-api-workspaces/src/workspaces_extra.rs @@ -1338,7 +1338,11 @@ pub(crate) async fn delete_workspace( .collect::>() .join(", "); Ok(format!( - "Deleted workspace {}. These data tables were governed by it and no longer resolve: {}. Their databases still exist; a superadmin can point them at another workspace's data table.", + concat!( + "Deleted workspace {}. These data tables were governed by it and no longer ", + "resolve: {}. Their databases still exist; a superadmin can point them at ", + "another workspace's data table." + ), &w_id, stranded )) }