refactor(deploy): retire cross-cluster DeployInstanceCommand wire path (config now fetched)
This commit is contained in:
@@ -92,11 +92,6 @@ public class SiteCommunicationActor : ReceiveActor, IWithTimers
|
||||
Receive<RegisterLocalHandler>(HandleRegisterLocalHandler);
|
||||
|
||||
// Pattern 1: Instance Deployment — forward to Deployment Manager
|
||||
Receive<DeployInstanceCommand>(msg =>
|
||||
{
|
||||
_log.Debug("Routing DeployInstanceCommand for {0} to DeploymentManager", msg.InstanceUniqueName);
|
||||
_deploymentManagerProxy.Forward(msg);
|
||||
});
|
||||
Receive<RefreshDeploymentCommand>(msg =>
|
||||
{
|
||||
_log.Debug("Routing RefreshDeploymentCommand for {0} to DeploymentManager", msg.InstanceUniqueName);
|
||||
|
||||
@@ -116,29 +116,9 @@ public class CommunicationService
|
||||
// ── Pattern 1: Instance Deployment ──
|
||||
|
||||
/// <summary>
|
||||
/// Sends a deployment command for an instance to a site.
|
||||
/// </summary>
|
||||
/// <param name="siteId">The target site identifier.</param>
|
||||
/// <param name="command">The deployment command.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>The deployment status response.</returns>
|
||||
public async Task<DeploymentStatusResponse> DeployInstanceAsync(
|
||||
string siteId, DeployInstanceCommand command, CancellationToken cancellationToken = default)
|
||||
{
|
||||
_logger.LogDebug(
|
||||
"Sending DeployInstanceCommand to site {SiteId}, instance={Instance}, correlationId={DeploymentId}",
|
||||
siteId, command.InstanceUniqueName, command.DeploymentId);
|
||||
|
||||
var envelope = new SiteEnvelope(siteId, command);
|
||||
return await GetActor().Ask<DeploymentStatusResponse>(
|
||||
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.
|
||||
/// Sends a small "refresh deployment" notify to a site (notify-and-fetch):
|
||||
/// 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>
|
||||
|
||||
@@ -154,9 +154,9 @@ public class SiteReplicationActor : ReceiveActor
|
||||
{
|
||||
if (string.IsNullOrEmpty(msg.CentralFetchBaseUrl))
|
||||
{
|
||||
// The still-present direct DeployInstanceCommand wire path (retired in Task 14)
|
||||
// replicates with empty coords; there is nothing to fetch. Skip quietly rather
|
||||
// than calling FetchAsync("") and logging an error — T18 reconciliation backstops.
|
||||
// The direct DeployInstanceCommand cross-cluster wire path was retired (Task 14).
|
||||
// This guard is a defensive fallback: skip quietly rather than calling FetchAsync("")
|
||||
// and logging a spurious error. T18 reconciliation backstops any missed writes.
|
||||
_logger.LogDebug(
|
||||
"No fetch coords for {Instance} (deployment {DeploymentId}) — skipping replicated fetch; T18 reconciliation is the backstop",
|
||||
msg.InstanceName, msg.DeploymentId);
|
||||
|
||||
Reference in New Issue
Block a user