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

Error with Inputs Implementation in Kestra Flows #5663

Open
userS4B0 opened this issue Oct 25, 2024 · 0 comments
Open

Error with Inputs Implementation in Kestra Flows #5663

userS4B0 opened this issue Oct 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@userS4B0
Copy link

Describe the issue

Issue Overview

When attempting to implement inputs in Kestra flows, an error message appears indicating a problem with the input. However, the input is correctly passed to the task, and the flow executes successfully.

Steps to reproduce

  1. Configure a Kestra flow with an input in YAML.
  2. Set up a simple flow to execute a "hello world" command on remote servers via Ansible.
  3. Run the flow manually in the Kestra environment.
Example Kestra Workflow
id: ansible_test_01
namespace: mycompany.examples.ansible
  
inputs:
  - id: hosts
    type: STRING
    required: true
    defaults: "test_server" # In this example refers to localhost
    displayName: "Destination Server"


tasks:
  - id: ansible_task
    type: io.kestra.plugin.ansible.cli.AnsibleCLI
    inputFiles:
      inventory.yml: "{{ read('inventory/test_inventory.yml') }}"
      playbook.yml: "{{ read('playbooks/test_plb.yml') }}"

    containerImage: cytopia/ansible:latest-tools
    taskRunner:
      type: io.kestra.plugin.scripts.runner.docker.Docker
      cpu:
        cpus: 1
      memory:
        memory: 512Mb
      pullPolicy: IF_NOT_PRESENT

    commands:
      - ansible-playbook -i inventory.yml playbook.yml --limit {{ inputs.hosts }}
    
    env:
      ANSIBLE_HOST_KEY_CHECKING: "False"
Example inventory/test_inventory.yml
all:
  hosts:
    test_server: 
      ansible_connection: local
    test_server_2:
      ansble_host: 172.31.174.5
      ansible_port: 1473
Example playbooks/test_plb.yml
- hosts: all
  tasks:
  - name: Send Hello World Message
    debug:
      msg: "Hello From Ansible"

Expected Behaviour

The flow should run without displaying any errors regarding the inputs when they are configured correctly.

Actual Behaviour

Even though the input is passed correctly and the flow executes successfully, an error message consistently appears regarding problems with the input.

Error Message Screenshot

KestrInputError

Successful Execution Screenshot

KestraFlowSuccess

Additional Context

This error message appears in every Kestra flow that includes inputs, regardless of whether it’s with the Ansible plugin or other plugins.

Environment

  • Kestra Version: kestra-0.19.5
  • Operating System: Ubuntu (noble) 24.04.1 LTS
  • Java Version: OpenJDK Runtime Environment Temurin-21.0.5+11 (build 21.0.5+11-LTS)
@userS4B0 userS4B0 added the bug Something isn't working label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

1 participant