You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When specifying a parameter to have an output source, like this:
parameters:
- name: testdescription: some testsource:
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
Create a new porter bundle using porter create test
Edit the porter.yaml to something like this:
# Optional indicator of the resource type of this fileschemaType: Bundle# Version of the porter.yaml schema used by this file.schemaVersion: 1.0.1# Name of the bundlename: 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 defaultregistry: "localhost:5000"mixins:
- execparameters:
- name: mysql_usertype: stringdefault: wordpresssource:
output: testoutputs:
- name: testinstall:
- exec:
command: ':'uninstall:
- exec:
command: ':'
Run porter explain
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.
I am not super familiar with this, but I believe that this is intentional, and that we don't want to show parameters with external sources, see commit message f92025b . Relevant code:
Some outputs and parameters are really porter "plumbing". They are used
by porter to implement things, like state or persistent parameters, but
aren't intended to be set or used by the end-user.
When we print out how to use a bundle with porter explain, those
shoudn't be displayed.
Parameters with sources - these will be set by Porter internally.
Outputs and Parameters that support bundle state.
I think this is in contrast with the current documentation, which I think communicates that while a source can be used as a default value, the parameter value can still be set explicitly as well (which would warrant it being visible in explain):
Describe the bug
When specifying a parameter to have an output source, like this:
the parameter is not displayed in the list of parameters in
porter explain
on the bundle.Failing test repro in #2904 .
To Reproduce
porter create test
porter.yaml
to something like this:porter explain
Expected behavior
The
mysql_user
parameter should be displayed in a parameter list.Version
porter v1.0.14 (0e739d8)
The text was updated successfully, but these errors were encountered: