fix(sdk): Support per workflow TTL (ttl_seconds_after_finished) with new format of Argo workflow manifest (#7141)
* Support per workflow TTL (ttl_seconds_after_finished) with new format of Argo workflow manifest * Update test for TTL * Declare fix in release note of SDK * update syntaxe * Update RELEASE.md Add Braking change due to incompatibility with KFP pre 1.7 due to Argo 2.X
This commit is contained in:
parent
22a8fdfe31
commit
577902ca46
|
@ -16,6 +16,7 @@
|
|||
* Remove sdk/python/kfp/v2/google directory for v2, including google client and custom job [\#6886](https://github.com/kubeflow/pipelines/pull/6886)
|
||||
* APIs imported from the v1 namespace are no longer supported by the v2 compiler. [\#6890](https://github.com/kubeflow/pipelines/pull/6890)
|
||||
* Deprecate v2 compatible mode in v1 compiler. [\#6958](https://github.com/kubeflow/pipelines/pull/6958)
|
||||
* Fix breaking change in Argo 3.0, to define TTL for workflows. Makes SDK incompatible with KFP pre-1.7 versions [\#7141](https://github.com/kubeflow/pipelines/pull/7141)
|
||||
|
||||
### For Pipeline Authors
|
||||
|
||||
|
|
|
@ -832,8 +832,7 @@ class Compiler(object):
|
|||
|
||||
# set ttl after workflow finishes
|
||||
if pipeline_conf.ttl_seconds_after_finished >= 0:
|
||||
workflow['spec'][
|
||||
'ttlSecondsAfterFinished'] = pipeline_conf.ttl_seconds_after_finished
|
||||
workflow['spec']['ttlStrategy'] = {'secondsAfterCompletion': pipeline_conf.ttl_seconds_after_finished}
|
||||
|
||||
if pipeline_conf._pod_disruption_budget_min_available:
|
||||
pod_disruption_budget = {
|
||||
|
|
|
@ -981,7 +981,7 @@ implementation:
|
|||
dsl.get_pipeline_conf().set_ttl_seconds_after_finished(86400)
|
||||
|
||||
workflow_dict = kfp.compiler.Compiler()._compile(some_pipeline)
|
||||
self.assertEqual(workflow_dict['spec']['ttlSecondsAfterFinished'],
|
||||
self.assertEqual(workflow_dict['spec']['ttlStrategy']['secondsAfterCompletion'],
|
||||
86400)
|
||||
|
||||
def test_pod_disruption_budget(self):
|
||||
|
|
Loading…
Reference in New Issue