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

Allow passing of parameters to sub-workflows from root-level workflow inputs and step outputs #80

Open
dustinblack opened this issue Apr 20, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@dustinblack
Copy link
Member

Please describe what you would like to see in this project

With the implementation of foreach loops of sub-workflows with #71 we find a usability limitation that should be addressed. The current implementation expects the complete sub-workflow schema input requirements to be passed in whole via each list item from the parent workflow input. This causes potentially a lot of duplication of input parameters that can be cumbersome and error-prone. Furthermore, a workflow author should be able to use the output of a plugin in the parent workflow as part of the input to the sub-workflow.

Please describe your use case

Global input example

The workflow author should be able to accept inputs for a benchmark workload once at a global (parent workflow) level that can be passed directly to the sub-workflow(s) where the benchmark plugins are called in order to avoid the need to provide unchanging inputs for each loop iteration.

I would like to provide this:

global_param_a: foo
global_param_b: bar
loops:
  - param_c: 1
    param_d: 2
  - param_c: 10
    param_d: 20

Instead of the current:

loops:
  - param_a: foo
    param_b: bar
    param_c: 1
    param_d: 2
  - param_a: foo
    param_b: bar
    param_c: 10
    param_d: 20

Plugin output example

The workflow author should be able to run the kubeconfig plugin once in the parent workflow and pass the connection output to the sub-workflow(s) for orchestrating.

input:
  root: RootObject
  objects:
    RootObject:
      id: RootObject
      properties:
        kubeconfig:
          type:
            type_id: string
          required: true
        workloads:
          type:
            type_id: list
            items:
              type_id: object
              id: workload
              properties:
                foo:
                  type:
                    type_id: string
                  required: true

steps:
  kubeconfig:
    plugin: quay.io/arcalot/arcaflow-plugin-kubeconfig:0.2.0
    input:
      kubeconfig: !expr $.input.kubeconfig
  workload_loop:
    kind: foreach
    items: !expr $.input.workloads
    # I should be able to pass '!expr $.steps.kubeconfig.outputs.connection' here somehow
    workflow: sub-workflow.yaml
    parallelism: 1
@dustinblack dustinblack added the enhancement New feature or request label Apr 20, 2023
@dustinblack dustinblack moved this to Backlog in Arcaflow Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: Backlog
Development

No branches or pull requests

1 participant