-
Notifications
You must be signed in to change notification settings - Fork 223
Closed
Labels
bugOops, sorry!Oops, sorry!
Description
Describe the bug
When overriden a parameter specified in a parameter set, the overriden parameter should not be resolved as specified in the parameter set.
This block scenarios, where you override a parameter read from an environment variable that haven't been defined, because it is overriden.
According to the documentation:
When a bundle is executed, parameter values are resolved in a hierarchy of (from highest to lowest precedence):
- Overrides specified either with the --param flag or by setting parameters directly on an installation resource
- Parameter sets specified with the --parameter-set flag or by setting the parameter set name directly on an installation resource
- Parameter values remembered from the last time the bundle was run
- Defaults defined for the parameter in the bundle definition
To Reproduce
Steps to reproduce the behavior:
- Create and apply a parameter set containing the value
name
with an environment source, e.g.:
{
"schemaType": "ParameterSet",
"schemaVersion": "1.0.1",
"name": "hello-llama",
"parameters": [
{
"name": "name",
"source": {
"env": "FOO"
}
}
]
}
- Run
porter install --reference getporter/hello-llama:v0.1.1 -p hello-llama --param name=Bar
- See error describing that the parameter
hello-llama.name
could not be resolved
Expected behavior
The installation should succeed because the parameter is overriden, and should not be read from the parameter set.
Porter Command and Output
$ porter install --reference getporter/hello-llama:v0.1.1 -p hello-llama --param name=Bar
unable to process provided parameter sets: 1 error occurred:
* unable to resolve parameter hello-llama.name from env FOO: environment variable env is not defined
Version
porter v1.2.1 (aa97c59)
Metadata
Metadata
Assignees
Labels
bugOops, sorry!Oops, sorry!