Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow created from Workflowtemplate doesn't respect the activeDeadlineSeconds defined the Workflowtemplate #4044

Closed
ediezh opened this issue Sep 16, 2020 · 3 comments · Fixed by #4063
Assignees
Labels

Comments

@ediezh
Copy link

ediezh commented Sep 16, 2020

Summary

  • Define a workflowtemplate with a activeDeadlineSeconds: 36000
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: workflow-template-test
  namespace: argo
spec:
  activeDeadlineSeconds: 36000
 ...
  • Submit a workflow from this workflowtemplate
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: workflow-test-
spec:
  workflowTemplateRef:
    name: workflow-template-test
...
  • Expect the workflow has activeDeadlineSeconds: 36000

  • But instead, the workflow has activeDeadlineSeconds: 86400 which is from the controller workflow defaults

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
...
  generateName: workflow-test-
  namespace: argo
spec:
  activeDeadlineSeconds: 86400
...

Diagnostics

What version of Argo Workflows are you running?

Client:

argo: v2.10.0-rc4+8d6dae6.dirty
  BuildDate: 2020-07-28T22:59:40Z
  GitCommit: 8d6dae6128074445d9bd0222c449643053568db8
  GitTreeState: dirty
  GitTag: v2.10.0-rc4
  GoVersion: go1.13.4
  Compiler: gc
  Platform: darwin/amd64

Server:

argo: v2.10.0-rc7
  BuildDate: 2020-08-14T00:51:56Z
  GitCommit: 267da535b66ed1dab8bcc90410260b7cf4b80e2c
  GitTreeState: clean
  GitTag: v2.10.0-rc7
  GoVersion: go1.13.4
  Compiler: gc
  Platform: linux/amd64

Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

@simster7
Copy link
Member

Hmmm it's not obvious to me what should take precedence between the WorkflowTemplate and the workflow defaults.

If you were to manually set the workflow's activeDeadlineSeconds field, you'd expect that to override the WorkflowTemplate. This is exactly what the workflow defaults do, so it is possible that this is actually desired behavior.

I'll discuss with the team and get back.

@simster7 simster7 self-assigned this Sep 16, 2020
@alexec
Copy link
Contributor

alexec commented Sep 16, 2020

Order of precedence:

  1. workflow
  2. workflow template
  3. workflow defaults

@simster7
Copy link
Member

But that order of precedence is paradoxical:

If there is a workflow default, then each submitted workflow will be modified. If a submitted workflow is modified, then it will override the workflow template.

To keep the desired order of preference that @alexec mentioned, we would have to add logic for workflow defaults to not apply to workflows that call other workflow templates and said workflow templates contain the same settings that the workflow defaults do.

It doesn't seem to be desirable logic to have in the codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants