Fix SCUM generated run deployment flow
This commit is contained in:
@@ -129,7 +129,7 @@ func (svc *CoreService) RegisterRunHello(hello domain.RunControlHello) (domain.R
|
||||
}
|
||||
|
||||
// queueManagedGuidedDeploymentAfterRegistration advances only a newly-created,
|
||||
// target-bound guided server. Selecting guided-install is the owner's prior
|
||||
// dedicated guided server. Selecting guided-install is the owner's prior
|
||||
// authorization for this bounded write; reconnects remain idempotent.
|
||||
func (svc *CoreService) queueManagedGuidedDeploymentAfterRegistration(hello domain.RunControlHello) error {
|
||||
if hello.ComponentKind != domain.DistributionComponentRun || strings.TrimSpace(hello.ServerInstanceID) == "" {
|
||||
@@ -139,7 +139,7 @@ func (svc *CoreService) queueManagedGuidedDeploymentAfterRegistration(hello doma
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if strings.TrimSpace(instance.DeploymentTargetID) == "" || instance.RunEndpointID != hello.RunEndpointID || instance.State != domain.ServerInstanceStateDraft || instance.Deployment.Mode != domain.ServerDeploymentModeGuided {
|
||||
if instance.RunEndpointID != hello.RunEndpointID || instance.RunEndpointID != dedicatedRunEndpointID(instance.ID) || instance.State != domain.ServerInstanceStateDraft || instance.Deployment.Mode != domain.ServerDeploymentModeGuided {
|
||||
return nil
|
||||
}
|
||||
_, err = svc.deployServerInstance(domain.ServerLifecycleCommand{
|
||||
@@ -158,7 +158,7 @@ func (svc *CoreService) validateDedicatedRunHello(hello domain.RunControlHello)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if strings.TrimSpace(instance.DeploymentTargetID) == "" {
|
||||
if strings.TrimSpace(instance.DeploymentTargetID) == "" && instance.RunEndpointID != dedicatedRunEndpointID(instance.ID) {
|
||||
return nil // legacy Run registrations keep their historical endpoint contract.
|
||||
}
|
||||
if hello.PluginID != instance.PluginID || hello.RunEndpointID != instance.RunEndpointID {
|
||||
|
||||
Reference in New Issue
Block a user