feat(server): keep monitors and in-flight runs going when a licence lapses
Monitor execution and the workflow runner are deliberately unguarded: billing state must not take away a customer's ability to know their infrastructure is on fire, and killing a run midway leaves a half-configured server. The plan called for a server-limit check in gRPC Register. Left out: a server row only comes from CreateServer, which already checks the cap, so counting in Register counts the caller itself and would reject a legitimate agent at exactly the cap.
This commit is contained in:
@@ -202,6 +202,9 @@ func runServer(instanceID, runID string, srvIdx int, steps []models.ResolvedStep
|
||||
allSecrets := map[string]string{}
|
||||
serverFailed := false
|
||||
|
||||
// A run already in flight when the licence expires finishes its remaining
|
||||
// steps. New runs are blocked at the API, but killing a workflow midway leaves
|
||||
// a server in a half-configured state, which is worse than letting it complete.
|
||||
for i, step := range steps {
|
||||
startStep(runID, serverID, i, "running")
|
||||
stepStart := time.Now()
|
||||
|
||||
Reference in New Issue
Block a user