ke4roh / vertx-engine

An execution engine for processing things, based on vertx
Apache License 2.0
1 stars 2 forks source link

Allow for first-class steps #39

Closed ke4roh closed 5 years ago

ke4roh commented 5 years ago

Like Ansible has yum, allow for steps to be keys with arguments in our DSL. This will probably require an annotation, and remove the need for specifying the fully-qualified class name in the DSL.

LightGuard commented 5 years ago

I understand what you're getting at, but could you give a use case example or something we could write a test for?

ke4roh commented 5 years ago
- name: Make a thing
  copy: &rememberThis 
     from: "{{ data | long | filter | string }}"
     data: "{{doc.here}}"
     register: aPlace
- name: Copy the other thing
  copy: 
     <<: *rememberThis
     from: "{{doc.q}}"
     register: newPlace
LightGuard commented 5 years ago

What you've just laid out here would be a pretty major change to how our pipelines are defined and called. I don't think it's a bad thing, but we will need to rework a few things.

A step should be given its configuration after it has been run through jinjava with the latest doc and environment.

The definition of a step would also need to include an annotation to give it a name so we can easily find it. We also need to think about a namespace, if desired. If not, what exactly happens when two steps with the same name exist?

What are your thoughts?

ke4roh commented 5 years ago

Tabling for now because the fully-qualified class name can be worked around with Yaml anchor/alias and exact similarity to Ansible is not critical.