perf(deploy): flatten-session caching, bulk DeploySiteAsync, paged management queries

This commit is contained in:
Joseph Doherty
2026-08-14 21:14:22 -04:00
parent ee193cd2bb
commit 48b3c40a7f
59 changed files with 3051 additions and 231 deletions
@@ -1,5 +1,26 @@
namespace ZB.MOM.WW.ScadaBridge.Commons.Messages.Management;
public record MgmtDeployArtifactsCommand(int? SiteId = null);
/// <summary>
/// Deploys every deployable instance at one site in a single operation.
///
/// <para>
/// Distinct from <see cref="MgmtDeployArtifactsCommand"/>, which ships the
/// SYSTEM-WIDE artifact sets (shared scripts, external systems, DB/data
/// connections) to a site. This command deploys the site's INSTANCE
/// configurations — the same per-instance pipeline
/// <c>MgmtDeployInstanceCommand</c> runs, batched.
/// </para>
///
/// <para>
/// Not all-or-nothing: each instance keeps its own deployment id, revision hash,
/// operation lock and status record, and a failure on one is reported as a failed
/// row while the rest proceed. Individually retryable via the single-instance
/// deploy. Additive contract; new fields go on the end with a default.
/// </para>
/// </summary>
/// <param name="SiteId">Database id of the target site. Required — this command is never fleet-wide.</param>
public record MgmtDeploySiteCommand(int SiteId);
public record QueryDeploymentsCommand(int? InstanceId = null, string? Status = null, int Page = 1, int PageSize = 50);
public record GetDeploymentDiffCommand(int InstanceId);