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

fix: override storedWorkflowSpec when override parameter (#11631) #11634

Merged
merged 2 commits into from Aug 20, 2023

Conversation

toyamagu-2021
Copy link
Member

@toyamagu-2021 toyamagu-2021 commented Aug 20, 2023

Signed-off-by: toyamagu-2021 toyamagu2021@gmail.com

Fixes #11631

Motivation

  • Override parameter when retrying workflow submitted from WorkflowTemplate

Modifications

  • Override .Status.StoredWorkflowSpec.Arguments.Parameters when overriding parameter.

Verification

Retry workflow submitted from WorkflowTemplate with parameter

spec:
  templates:
    - name: argosay
      inputs:
        parameters:
          - name: code
            value: '{{workflow.parameters.code}}'
      outputs: {}
      metadata: {}
      container:
        name: main
        image: argoproj/argosay:v2
        command:
          - sh
          - '-c'
        args:
          - exit '{{workflow.parameters.code}}'
        resources: {}
  entrypoint: argosay
  arguments:
    parameters:
      - name: code
(⎈|k3d-k3s-default:argo)➜  argo-workflows git:(fix-11631) ./dist/argo retry exit-9xj9g --parameter code=0
INFO[2023-08-20T16:17:11.967Z] Deleting pod                                  podDeleted=exit-9xj9g
INFO[2023-08-20T16:17:11.972Z] Workflow to be dehydrated                     Workflow Size=1485
Name:                exit-9xj9g
Namespace:           argo
ServiceAccount:      unset
Status:              Running
Conditions:          
 PodRunning          False
 Completed           False
Created:             Sun Aug 20 16:16:29 +0900 (42 seconds ago)
Started:             Sun Aug 20 16:17:11 +0900 (now)
Duration:            0 seconds
EstimatedDuration:   6 seconds
Progress:            0/1
ResourcesDuration:   3s*(1 cpu),2s*(100Mi memory)
Parameters:          
  code:              0

toyamagu-2021 added a commit to toyamagu-2021/argo-workflows that referenced this pull request Aug 20, 2023
Signed-off-by: toyamagu-2021 <toyamagu2021@gmail.com>
@toyamagu-2021 toyamagu-2021 marked this pull request as ready for review August 20, 2023 07:42
@toyamagu-2021 toyamagu-2021 marked this pull request as draft August 20, 2023 08:09
Signed-off-by: toyamagu-2021 <toyamagu2021@gmail.com>
Signed-off-by: toyamagu-2021 <toyamagu2021@gmail.com>
@terrytangyuan terrytangyuan merged commit 027b9c9 into argoproj:master Aug 20, 2023
24 checks passed
terrytangyuan pushed a commit that referenced this pull request Sep 5, 2023
…1634)

Signed-off-by: toyamagu-2021 toyamagu2021@gmail.com
dpadhiar pushed a commit to dpadhiar/argo-workflows that referenced this pull request May 9, 2024
) (argoproj#11634)

Signed-off-by: toyamagu-2021 toyamagu2021@gmail.com
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overriding parameter to retry workflow does not work when using WorkflowTempalate
2 participants