feat(deploy): RefreshDeploymentAsync send method
Add CommunicationService.RefreshDeploymentAsync — the typed send method for the small notify-and-fetch wire message (RefreshDeploymentCommand). Mirrors DeployInstanceAsync exactly: SiteEnvelope + Ask<DeploymentStatusResponse> bounded by DeploymentTimeout. CentralCommunicationActor needs no change (HandleSiteEnvelope is fully generic — all SiteEnvelope messages forward to /user/site-communication without a per-type switch). Adds a parallel routing test asserting the envelope reaches the site ClusterClient.
This commit is contained in:
@@ -134,6 +134,27 @@ public class CommunicationService
|
||||
envelope, _options.DeploymentTimeout, cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a small "refresh deployment" notify to a site (notify-and-fetch).
|
||||
/// Replaces <see cref="DeployInstanceAsync"/> on the wire: the site fetches the
|
||||
/// config over HTTP rather than receiving it inline. Reply is the existing
|
||||
/// DeploymentStatusResponse, bounded by the deployment timeout.
|
||||
/// </summary>
|
||||
/// <param name="siteId">The target site identifier.</param>
|
||||
/// <param name="command">The refresh-deployment notify.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>The deployment status response.</returns>
|
||||
public async Task<DeploymentStatusResponse> RefreshDeploymentAsync(
|
||||
string siteId, RefreshDeploymentCommand command, CancellationToken cancellationToken = default)
|
||||
{
|
||||
_logger.LogInformation(
|
||||
"Sending RefreshDeploymentCommand to site {SiteId}, instance={Instance}, deploymentId={DeploymentId}",
|
||||
siteId, command.InstanceUniqueName, command.DeploymentId);
|
||||
var envelope = new SiteEnvelope(siteId, command);
|
||||
return await GetActor().Ask<DeploymentStatusResponse>(
|
||||
envelope, _options.DeploymentTimeout, cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DeploymentManager-006: queries a site for the currently-applied deployment
|
||||
/// identity of a single instance. Used by the Deployment Manager before a
|
||||
|
||||
Reference in New Issue
Block a user