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

Function artifact inputs as command parameters #289

Open
AntoineDao opened this issue Mar 3, 2021 · 2 comments
Open

Function artifact inputs as command parameters #289

AntoineDao opened this issue Mar 3, 2021 · 2 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@AntoineDao
Copy link
Member

I have noticed that @chriswmackey has used an input artifact as a parameter inside of a function's command. Technically this should not be allowed by Queenbee and we could write a test for it to make sure it doesn't break. Here is a shortened example of the command Function written by Chris:

Should be Invalid

type: Function
inputs:
- type: FunctionFileInput
  name: condition-csv
  description: A CSV file of thermal conditions output by a thermal mapping function.
  required: true
  path: condition.csv
name: tcp
command: ladybug-comfort map tcp {{inputs.condition-csv}}

Valid equivalent

type: Function
inputs:
- type: FunctionFileInput
  name: condition-csv
  description: A CSV file of thermal conditions output by a thermal mapping function.
  required: true
  path: condition.csv
name: tcp
command: ladybug-comfort map tcp condition.csv

Bug or Feature?

I think this issue could be turned into something more interesting than a simple bug fix. My thinking is that we already duplicate the condition.csv path in the example above.

What do we think of allowing this sort of parametrization of the command where an artifact input can be templated in the command such that executors (ie: queenbee-argo and queenbee-luigi then replace the templated value with the path key in the input artifact object?

This would have the following benefits:

  • Avoid duplicated code which could lead to errors
  • Provide a unified-ish syntax for input parameters and artifacts

I'm going to tag the people that seem most relevant to add to this discussion here: @chriswmackey, @mostaphaRoudsari and @tymokvo

@AntoineDao AntoineDao added bug Something isn't working enhancement New feature or request labels Mar 3, 2021
@AntoineDao
Copy link
Member Author

^ I have deployed the newer version of queenbee-argo which supports this proposed feature to staging so we can test it live while making a decision on whether or not to accept using artifact inputs and command template parameters.

@tymokvo
Copy link
Contributor

tymokvo commented Mar 3, 2021

I am in favor of increased flexibility by allowing this. Clearly one of the users already thinks it should be valid 😼 . I'm not totally sure what the trade off is though. Is there some risk or complexity involved in enabling it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants