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
Porter is showing the TOTAL number of parameters in the bundle, including porter specific parameters which are not included in the parameter set.
To Reproduce
Run porter parameters generate for any bundle. Note that it shows a number one higher than the number of parameters defined in porter.yaml because it is counting PORTER_DEBUG.
Expected behavior
It should show the number of parameters defined in porter.yaml.
Porter Command and Output
$ porter parameters generate hello-llama -r getporter/hello-llama:v0.1.0
Generating new parameter set hello-llama from bundle hello-llama
==> 2 parameters declared for bundle hello-llama
Version
porter v0.38.1-32-gb76f5c1c (b76f5c1c)
How to Fix
Create your fix based on the v1 branch. When you submit your PR, set the destination to the v1 branch.
This is the incorrect line of code. We should loop over the parameters in the bundle and count only parameters that are not internal. You can use this function IsInternal to know if it should be counted or not.
fmt.Fprintf(p.Out, "==> %d parameters declared for bundle %s\n", len(bundle.Parameters), bundle.Name)
The output from this command is hard to unit test, since it is interactive, so testing manually is fine. You can run the command in the bug report to verify the fix is working.
The text was updated successfully, but these errors were encountered:
Describe the bug
Porter is showing the TOTAL number of parameters in the bundle, including porter specific parameters which are not included in the parameter set.
To Reproduce
Run porter parameters generate for any bundle. Note that it shows a number one higher than the number of parameters defined in porter.yaml because it is counting PORTER_DEBUG.
Expected behavior
It should show the number of parameters defined in porter.yaml.
Porter Command and Output
Version
porter v0.38.1-32-gb76f5c1c (b76f5c1c)
How to Fix
Create your fix based on the v1 branch. When you submit your PR, set the destination to the v1 branch.
This is the incorrect line of code. We should loop over the parameters in the bundle and count only parameters that are not internal. You can use this function IsInternal to know if it should be counted or not.
porter/pkg/porter/parameters.go
Line 132 in 784d61c
The output from this command is hard to unit test, since it is interactive, so testing manually is fine. You can run the command in the bug report to verify the fix is working.
The text was updated successfully, but these errors were encountered: