porter icon indicating copy to clipboard operation
porter copied to clipboard

`porter explalin` does not show parameters that have an output source

Open lbergnehr opened this issue 1 year ago • 2 comments

Describe the bug

When specifying a parameter to have an output source, like this:

parameters:
  - name: test
    description: some test
    source:
      output: test

the parameter is not displayed in the list of parameters in porter explain on the bundle. Failing test repro in #2904 .

To Reproduce

  1. Create a new porter bundle using porter create test
  2. Edit the porter.yaml to something like this:
# Optional indicator of the resource type of this file
schemaType: Bundle

# Version of the porter.yaml schema used by this file.
schemaVersion: 1.0.1

# Name of the bundle
name: porter-hello

# Version of the bundle. Change this each time you modify a published bundle.
version: 0.1.0

# Description of the bundle and what it does.
description: "An example Porter configuration"

# Registry where the bundle is published to by default
registry: "localhost:5000"

mixins:
  - exec

parameters:
  - name: mysql_user
    type: string
    default: wordpress
    source:
      output: test

outputs:
  - name: test

install:
  - exec:
      command: ':'

uninstall:
  - exec:
      command: ':'

  1. Run porter explain
  2. The output is something like this:
Name: porter-hello
Description: An example Porter configuration
Version: 0.1.0
Porter Version: v1.0.14

Outputs:
------------------------------------------
  Name  Description  Type    Applies To
------------------------------------------
  test               string  All Actions

This bundle uses the following tools: exec.

To install this bundle run the following command, passing --param KEY=VALUE for any parameters you want to customize:
porter install

Expected behavior

The mysql_user parameter should be displayed in a parameter list.

Version

porter v1.0.14 (0e739d88)

lbergnehr avatar Sep 13 '23 12:09 lbergnehr