Add configurable beta test plans and staged rollout
This commit is contained in:
@@ -316,7 +316,7 @@ export function deleteVersion(versionId: number): void {
|
||||
.prepare(
|
||||
`SELECT b.id FROM betas b
|
||||
JOIN beta_scripts bs ON bs.beta_id = b.id
|
||||
WHERE bs.script_version_id = ? AND b.state = 'running' LIMIT 1`
|
||||
WHERE bs.script_version_id = ? AND b.state IN ('running','ready-promote') LIMIT 1`
|
||||
)
|
||||
.get(versionId) as { id: number } | undefined;
|
||||
if (beta) throw new ScriptError(`beta ${beta.id} is still running against this version`, 'in-use-beta');
|
||||
@@ -334,7 +334,7 @@ export function deleteScript(scriptId: number): void {
|
||||
.prepare(
|
||||
`SELECT b.id FROM betas b
|
||||
JOIN beta_scripts bs ON bs.beta_id = b.id
|
||||
WHERE bs.script_id = ? AND b.state = 'running' LIMIT 1`
|
||||
WHERE bs.script_id = ? AND b.state IN ('running','ready-promote') LIMIT 1`
|
||||
)
|
||||
.get(scriptId) as { id: number } | undefined;
|
||||
if (beta) throw new ScriptError(`beta ${beta.id} is still running against this script`, 'has-active-beta');
|
||||
|
||||
Reference in New Issue
Block a user