Keep legacy Windows starter worker pins outside official GNU enrollments
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user