Brian Pohl
11/14/2022, 7:25 PMk8s_job_op
? I declare my op like this:
def function_to_create_k8s_op( <a lot of variables > ):
op = k8s_job_op.configured(
config_or_config_fn = {
'image': f"{image_url}:{tag}",
'service_account_name': env['SERVICE_ACCOUNT'],
'command': ['java'],
'args': args,
'resources': {
'requests': {
'cpu': cpu,
'memory': memory,
},
},
'image_pull_policy': 'Always',
'env_vars': all_env_vars
},
name = name,
)
return op
I tried op.retry_policy = RetryPolicy(...
but that attribute is read-only. My understanding is that k8s_job_ops.configured(config_schema
should only be used to set the config schema of the op, which is already defined here. I have also tried setting other attributes by passing them into job_spec_config
, but I found that those were being ignored, and the only way to get attributes set was to pass them into config_or_config_fn
(which seems like a a bug, but because I'm using an older version - 1.0.2 - i'm not focusing on that).
So is there any opening to insert a retry policy? Or would the best option be trying to upgrade to the newest version and then using job_spec_config
? If so, I also could use a pointer to the correct K8s spec argument for retries, because in my last run through the docs I didn't see any.daniel
11/14/2022, 7:51 PMBrian Pohl
11/14/2022, 7:57 PMdaniel
11/15/2022, 8:22 PMBrian Pohl
11/15/2022, 8:23 PMSimon
11/15/2022, 11:10 PMdaniel
11/15/2022, 11:16 PMSimon
11/17/2022, 4:49 PMdaniel
11/17/2022, 4:50 PM