Coder Social home page Coder Social logo

Comments (3)

loicmathieu avatar loicmathieu commented on July 23, 2024

I run the first example and it show this exception: Missing variable: 'my_input' on '{{ inputs.my_input }}' at line 1 which is expected ad the variable my_input didn't exist. If you have the exception with the variable inputs it means you are not on the latest version of Kestra.

For the second point:

In the above flow, inputs is an empty map {} as if there would be no inputs, even though there is one, even explicitly set to null.

null means no input, one possibility would be to switch run context variables serialization to ALWAYS (inputs will be included in this list) so variables set to null would be included.

from kestra.

anna-geller avatar anna-geller commented on July 23, 2024

Let's explore that option with ALWAYS or some alternatives then. The goal is for both examples from the issue body to work in 0.17

from kestra.

anna-geller avatar anna-geller commented on July 23, 2024

great work @loicmathieu <3 I thought this would be way more complex, thx a lot!

image

this one also works as expected:

id: my_flow
namespace: dev

inputs:
  - id: my_input
    type: STRING
    defaults: null
    required: false

tasks:
  - id: check
    type: io.kestra.plugin.core.flow.If
    condition: "{{ inputs.my_input is null }}"
    then: 
      - id: isnull
        type: io.kestra.plugin.core.log.Log
        message: it's a null
    else:
      - id: isnotnull
        type: io.kestra.plugin.core.log.Log
        message: not null

seems like nothing left to discuss regarding serialization so I'll cancel that meeting

from kestra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.