Closed
Description
Hi, just started using hera and it is pretty cool! But, I am having an issue with imagePullPolicy.
I am using version 5.1.3
Sample code:
from hera.workflows import Workflow, script
@script(image_pull_policy="Always")
def pull():
pass
with Workflow(generate_name="pull-", namespace="argo") as w:
pull()
w.create()
Error output:
Traceback (most recent call last):
File "/home/.../demo.py", line 11, in <module>
w.create()
File "/home/.../lib/python3.10/site-packages/hera/workflows/workflow.py", line 335, in create
WorkflowCreateRequest(workflow=self.build()), namespace=self.namespace
File "/home/.../lib/python3.10/site-packages/hera/workflows/workflow.py", line 212, in build
templates.append(template._build_template())
File "/home/.../lib/python3.10/site-packages/hera/workflows/script.py", line 172, in _build_template
script=self._build_script(),
File "/home/.../lib/python3.10/site-packages/hera/workflows/script.py", line 187, in _build_script
_ModelScriptTemplate(
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for ScriptTemplate
imagePullPolicy
str type expected (type=type_error.str)
Metadata
Metadata
Assignees
Labels
No labels