cloud-run-button
cloud-run-button copied to clipboard
ENV required:false still forcing user to set value in setup console
I have an open source project using Cloud Run + app.json to specify env vars.
Even though required=false in app.json, in the console I get the error message Sorry, your reply was invalid: Value is required
if I try to skip setting it (via enter). It looks like required=false isn't being respected?
https://github.com/scosman/zipstreamer/tree/docker-docs
Can you try to remove the required key? (false is the default) Maybe the parsing of the false
value is wrong.
@jamesward required is true by default according to https://github.com/GoogleCloudPlatform/cloud-run-button/blob/master/cmd/cloudshell_open/appfile.go#L112
Oh right. I got that backwards. I think that what might be needed to make this work is the default value which could (hopefully) be set to an empty string, like:
"value": ""
I'm still seeing the issue with "value": ""
. And not to nit, but an empty string might be handled differently than no value in some apps. An easy way to skip non-required ENV vars would be nice. Thank you!!
Test file: https://github.com/scosman/zipstreamer/blob/cloudrun_fix_required/app.json
CR Link: https://deploy.cloud.run?git_repo=https%3A%2F%2Fgithub.com%2Fscosman%2Fzipstreamer?revision=cloudrun_fix_required