Skip to content

Commit 3d56e45

Browse files
committed
adding imageTagName to Radix job runner
1 parent 50a76f4 commit 3d56e45

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

app/data/WorkflowDS/Blueprints/Radix.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
"type": "CORE:BlueprintAttribute",
1818
"description": "The schedulerPort defined in the radixconfig.yaml file",
1919
"attributeType": "string"
20+
},
21+
{
22+
"name": "imageTagName",
23+
"type": "CORE:BlueprintAttribute",
24+
"description": "Overrides the {imageTagName} placeholder in the Radix component's image tag. If omitted, the default declared in radixconfig.yaml is used.",
25+
"attributeType": "string",
26+
"optional": true
2027
}
2128
]
2229
}

src/job_handler_plugins/radix/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,17 @@ def start(self) -> str:
3737
payload["DMSS_URL"] = config.DMSS_URL
3838
payload["DM_JOB_URL"] = config.DM_JOB_URL
3939
payload["JOB_DMSS_ID"] = self.job.dmss_id
40+
41+
# Optional per-submission override of the Radix component's image tag.
42+
# The template's 'image' must contain '{imageTagName}' for this to take effect;
43+
# if the runner omits it, Radix falls back to the default in radixconfig.yaml.
44+
body: dict = {"payload": json.dumps(payload)}
45+
if image_tag := self.job.runner.get("imageTagName"):
46+
body["imageTagName"] = image_tag
47+
4048
result = requests.post(
4149
_get_job_url(self.job),
42-
json={"payload": json.dumps(payload)},
50+
json=body,
4351
timeout=10,
4452
)
4553
result.raise_for_status()

0 commit comments

Comments
 (0)