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
I expect spin up to bail out and prevent from launching the app - if the required variable foo is not specified (e.g., by setting the SPIN_VARIABLE_FOO environment variable)
Actual behavior
I can start the app locally using spin up. Sending a request to the app (which tries to load the foo variable will result in a runtime error:
Variables are lazily loaded each time they are accessed. I guess we could evaluate if the runtime config contains only the environment provider, where the set of variables and values can't change after startup, and do validation in that case.
Alternatively I think @lann has suggested switching variables to be read once at startup in which case this would happen automatically. (Sorry Lann if I am misremembering.) That's a breaking change though.
Currently, the
spin up
command does not check if required variables are provided when launching the application.Consider a Spin application with the following manifest:
Expected behavior
I expect
spin up
to bail out and prevent from launching the app - if the required variablefoo
is not specified (e.g., by setting theSPIN_VARIABLE_FOO
environment variable)Actual behavior
I can start the app locally using
spin up
. Sending a request to the app (which tries to load thefoo
variable will result in a runtime error:Spin Version
I see this behavior with current spin version (tested
3.0.0
,3.1.2
and3.2.0
)The text was updated successfully, but these errors were encountered: