fix migrations

This commit is contained in:
EgorAnti
2026-10-20 14:27:59 +03:00
parent 05fcccb9ed
commit 7565b65997
9 changed files with 43 additions and 9 deletions
+13 -1
View File
@@ -3,6 +3,7 @@
import json
import os
from pathlib import Path
import shutil
import subprocess
import time
import uuid
@@ -55,7 +56,18 @@ def main():
check(len(observed)>=2,'less than two API instances observed before failure; verify LB/session affinity')
print('Executing explicit '+args.mode+' hook; hook output suppressed to avoid leaking secrets.')
# No shell interpolation and no Docker commands in this test.
proc = subprocess.Popen([str(script)],env=env,stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL)
command = [str(script)]
if os.name == 'nt' and script.suffix.lower() == '.sh':
interpreter = shutil.which('sh')
if interpreter is None:
git = shutil.which('git')
if git is not None:
candidate = Path(git).resolve().parents[1] / 'bin' / 'bash.exe'
if candidate.is_file():
interpreter = str(candidate)
check(interpreter is not None,'sh interpreter is required to run the action script on Windows')
command = [interpreter,str(script)]
proc = subprocess.Popen(command,env=env,stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL)
started = time.monotonic()
successes,failures,after_instances = [],0,[]
try: