feat(deploymentmanager): seam for subtree deploy — DeployAreaAsync / PreviewSubtreeDeployAsync signatures + SubtreeDeployPreview (Gitea #40)
This commit is contained in:
@@ -1113,6 +1113,39 @@ public class DeploymentService
|
||||
return Result<SiteDeploymentSummary>.Success(summary);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bulk-deploys every instance in an area subtree — the area itself plus all
|
||||
/// of its descendant areas — with exactly the rules of
|
||||
/// <see cref="DeploySiteAsync"/> (Disabled always skipped, up-to-date skipped
|
||||
/// unless <paramref name="force"/>, not all-or-nothing). Gitea #40.
|
||||
/// </summary>
|
||||
/// <param name="areaId">The database ID of the subtree's root area.</param>
|
||||
/// <param name="user">The username initiating the deployment.</param>
|
||||
/// <param name="force">Deploy up-to-date instances too; never re-enables Disabled ones.</param>
|
||||
/// <param name="cancellationToken">Cancellation token for the operation.</param>
|
||||
/// <returns>The same per-instance result matrix as a site deploy, or a failure when the area cannot be resolved.</returns>
|
||||
public Task<Result<SiteDeploymentSummary>> DeployAreaAsync(
|
||||
int areaId,
|
||||
string user,
|
||||
bool force = false,
|
||||
CancellationToken cancellationToken = default)
|
||||
=> throw new NotImplementedException();
|
||||
|
||||
/// <summary>
|
||||
/// Cheap pre-confirm counts for a site or area subtree deploy (Gitea #40): how
|
||||
/// many instances the subtree holds and how many of those are Disabled. A DB
|
||||
/// read only — no staleness probe.
|
||||
/// </summary>
|
||||
/// <param name="siteId">The site the subtree belongs to.</param>
|
||||
/// <param name="areaId">The subtree's root area, or null for the whole site.</param>
|
||||
/// <param name="cancellationToken">Cancellation token for the operation.</param>
|
||||
/// <returns>The counts, or a failure when the site or area cannot be resolved.</returns>
|
||||
public Task<Result<SubtreeDeployPreview>> PreviewSubtreeDeployAsync(
|
||||
int siteId,
|
||||
int? areaId,
|
||||
CancellationToken cancellationToken = default)
|
||||
=> throw new NotImplementedException();
|
||||
|
||||
/// <summary>
|
||||
/// True when a bulk site deploy should leave this instance alone because the
|
||||
/// site is already running the config it would be sent.
|
||||
@@ -2535,3 +2568,10 @@ public record SiteDeploymentSummary(
|
||||
int SuccessCount,
|
||||
int FailureCount,
|
||||
IReadOnlyList<SkippedInstanceResult>? SkippedInstances = null);
|
||||
|
||||
/// <summary>
|
||||
/// Pre-confirm counts for a site or area subtree bulk deploy (Gitea #40).
|
||||
/// </summary>
|
||||
/// <param name="Total">Instances in the subtree.</param>
|
||||
/// <param name="Disabled">Of those, the Disabled ones a bulk deploy always skips.</param>
|
||||
public record SubtreeDeployPreview(int Total, int Disabled);
|
||||
|
||||
Reference in New Issue
Block a user