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

feat(ui): Resubmit workflows with parameters. Fixes #4662 #11083

Merged
merged 6 commits into from
Jul 16, 2023

Conversation

toyamagu-2021
Copy link
Member

@toyamagu-2021 toyamagu-2021 commented May 14, 2023

Signed-off-by: [email protected] [email protected]

Fixes #4662

Motivation

  • We can change parameters when submitting [archived] workflows.

Modifications

  • Popup side panel to change parameters when we click resubmit button in [archived] workflows details page.

Verification

To check regression

manifest
spec:
  templates:
    - name: main
      inputs: {}
      outputs: {}
      metadata: {}
      dag:
        tasks:
          - name: step-a
            template: step-template-a
            arguments:
              parameters:
                - name: template-param-1
                  value: '1'
                - name: template-param-2
                  value: 'yes'
                  enum:
                    - 'yes'
                    - 'no'
          - name: step-b
            template: step-template-b
            arguments: {}
    - name: step-template-a
      inputs:
        parameters:
          - name: template-param-1
          - name: template-param-2
            enum:
              - 'yes'
              - 'no'
      outputs: {}
      metadata: {}
      script:
        name: ''
        image: alpine
        command:
          - /bin/sh
        resources: {}
        source: |
          echo "{{inputs.parameters.template-param-1}}"
          echo "{{inputs.parameters.template-param-2}}"
    - name: step-template-b
      inputs:
        parameters:
          - name: workflow-param-1
            value: '{{workflow.parameters.workflow-param-1}}'
          - name: workflow-param-2
            value: '{{workflow.parameters.workflow-param-2}}'
      outputs: {}
      metadata: {}
      container:
        name: main
        image: argoproj/argosay:v2
        command:
          - /argosay
        args:
          - echo
          - >-
            {{inputs.parameters.workflow-param-1}}-{{inputs.parameters.workflow-param-2}}
        resources: {}
  entrypoint: main
  arguments:
    parameters:
      - name: workflow-param-2
      - name: workflow-param-1
        value: 'yes'
        enum:
          - 'yes'
          - 'no'
Submit workflows
  • image
  • image
  • image
Submit workflows from workflow templates select entrypoint
  • image
  • image

Check to resubmit workflow

manifest

Resubmit to success
  • before
    image
  • resubmit
    image
  • after
    image
Resubmit to fail
  • before:
    image
  • resubmit
    image
  • after
    image
Resubmit to success with memoized
  • before
    image
  • resubmit
    image
  • after
    image
Resubmit archived workflow
  • before (Note that Pending status means workflow is deleted by GC)
    image
  • resubmit
    image
  • after
    image

@toyamagu-2021 toyamagu-2021 force-pushed the resubmit-with-param branch 3 times, most recently from cea0c80 to 2177c0a Compare May 20, 2023 06:07
@toyamagu-2021 toyamagu-2021 marked this pull request as ready for review May 20, 2023 06:35
@toyamagu-2021
Copy link
Member Author

Flaky tests are failing, but I'd like to get community feedback before making these successes.

@terrytangyuan
Copy link
Member

I am working on #11121 so this should be implemented in workflows detail/list page once that's merged.

@toyamagu-2021
Copy link
Member Author

Fair enough!
I' will rebase these changes after your PR is merged.

@toyamagu-2021 toyamagu-2021 marked this pull request as draft June 7, 2023 02:50
@terrytangyuan
Copy link
Member

#11121 has been merged

@toyamagu-2021 toyamagu-2021 changed the title feat: UI Resubmit [archived] workflows with parameter (#4662) feat: UI Resubmit workflows with parameter (#4662) Jul 15, 2023
@toyamagu-2021 toyamagu-2021 marked this pull request as ready for review July 15, 2023 12:30
return p.value;
}
}

private submit() {
this.setState({isSubmitting: true});
services.workflows
.submit(this.props.kind, this.props.name, this.props.namespace, {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

};

services.workflows
.resubmit(this.props.workflow.metadata.name, this.props.workflow.metadata.namespace, opts)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you check if this works for archived workflow as well?

Copy link
Member Author

@toyamagu-2021 toyamagu-2021 Jul 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works basically (please see PR description), but I noticed an edge case where this logic will not work because there is more than one workflow that has the same name and namespace.
Could you comment on this issue #11371?

Copy link
Member

@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one looks good. We can discuss remaining issue separately.

@agilgur5 agilgur5 added this to the v3.5.0 milestone Jun 24, 2024
@argoproj argoproj locked as resolved and limited conversation to collaborators Jun 24, 2024
@agilgur5 agilgur5 changed the title feat: UI Resubmit workflows with parameter (#4662) feat(ui): Resubmit workflows with parameters. Fixes #4662) Sep 27, 2024
@agilgur5 agilgur5 changed the title feat(ui): Resubmit workflows with parameters. Fixes #4662) feat(ui): Resubmit workflows with parameters. Fixes #4662 Sep 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI: Ability to change parameters when re-submitting workflows
3 participants