Fix target deployer resolution
Some checks failed
Lint Checks / Run linter (pull_request) Failing after 33s
Webapp Test / Run webapp test suite (pull_request) Successful in 5m43s
Deploy Test / Run deploy test suite (pull_request) Successful in 6m19s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Successful in 8m49s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 10m44s
Smoke Test / Run basic test suite (pull_request) Successful in 4m40s

This commit is contained in:
Prathamesh Musale 2024-10-03 17:50:18 +05:30
parent d1c68448c8
commit 48de1b0539

View File

@ -183,7 +183,9 @@ def command( # noqa: C901
if not response.ok: if not response.ok:
response.raise_for_status() response.raise_for_status()
config_ref = response.json()["id"] target_deployer = deployer
if (not deployer) and len(deployer_record.names):
target_deployer = deployer_record.names[0]
deployment_request = { deployment_request = {
"record": { "record": {
@ -191,7 +193,7 @@ def command( # noqa: C901
"application": app, "application": app,
"version": "1.0.0", "version": "1.0.0",
"name": f"{app_record.attributes.name}@{app_record.attributes.version}", "name": f"{app_record.attributes.name}@{app_record.attributes.version}",
"deployer": deployer, "deployer": target_deployer,
"meta": {"when": str(datetime.utcnow())}, "meta": {"when": str(datetime.utcnow())},
} }
} }