capactio / capact

Simple way to manage applications and infrastructure.
https://capact.io
Apache License 2.0
80 stars 19 forks source link

[CLI] Cannot pass input parameters both via browsing an interactive mode #594

Closed mszostok closed 2 years ago

mszostok commented 2 years ago

Description

In capact hub interfaces browse we are not ask to provide required input parameters and TypeInstances. Additionally, passing parameters in interactive mode also doesn't work.

Expected behavior

User is able to specify the input parameters in interactive mode. In browse mode, is also asked to provide them if necessary.

Steps to reproduce

Problem with browsing

  1. Browse interfaces:

    capact hub interface browse

    select cap.interface.database.redis.install and submit Action with defaults.

  2. Get Action details:

    capact act get {name} -oyaml

    in status, you will see:

      status:
        canceledBy: null
        createdBy: null
        message: |-
          Cannot render given action: while rendering Action: while validating required and additional input data: 1 validation error detected:
          - Parameters "input-parameters":
              * required but missing input parameters (will retry - 12/15)

Problem with passing parameters in interactive mode

  1. Create Action for Redis in interactive mode:
    capact act create cap.interface.database.redis.install -i
  2. When asked about input parameters, paste:
    input-parameters:
      name: local
  3. When submitting the Action you will get error:
    Error: while executing mutation to create Action: graphql: invalid character 'i' looking for beginning of value