Keep legacy Windows starter worker pins outside official GNU enrollments

This commit is contained in:
2026-11-18 11:03:55 +01:00
parent 07154833b3
commit 0b07baf7be
4 changed files with 16 additions and 8 deletions
+2 -2
View File
@@ -29,11 +29,11 @@ def publish(tenant, platform, release, official_windows=False, *, root=Path('/op
sql = """SELECT json_build_object('envelope',convert_from(envelope,'UTF8')::json,
'agent',agent_sha256,'agent_size',agent_bytes,'helper',helper_sha256,'helper_size',helper_bytes,
'starter_worker',(SELECT json_build_object('sha256',sha256,'bytes',size_bytes)
FROM customer_starter_workers WHERE tenant_id=:'customer' AND platform=:'platform'))
FROM customer_starter_workers WHERE tenant_id=:'customer' AND platform=:'platform' AND official_windows=:'official'::boolean))
FROM agent_update_releases WHERE tenant_id=:'customer' AND platform=:'platform' AND release_id=:'release';"""
raw = subprocess.check_output(['docker','exec','-i',database_container,
'psql','-XqtA','-v','ON_ERROR_STOP=1','-U','postgres','-d','rmm','-v','customer='+tenant,
'-v','platform='+platform,'-v','release='+release],input=sql.encode())
'-v','platform='+platform,'-v','official='+str(official_windows),'-v','release='+release],input=sql.encode())
if not raw.strip():
raise ValueError('Selected release is missing from the source customer catalog')
row = json.loads(raw)