Open timmc-edx opened 5 months ago
@timmc-edx your response in the linked GSRE ticket looks like this has been resolved. Can you confirm that this ticket can be closed?
It was fixed in https://github.com/edx/helm-charts/pull/150/files but I may want to re-fix it—the function they used was quote
, which is appropriate for use in shell scripts rather than for YAML files. I think we want string
instead. It's relatively low priority but should be a quick fix (now that I have documented how to test helm-charts changes locally!)
We can't set boolean-looking environment variables for containers using the
extraEnvs
config provided by the django-ida Helm chart.Setting a value to
true
orfalse
results in a sync failure with an error message likeunrecognized type: string
following a large blob of config. Inspecting the config, we can see it includes something like{\"name\":\"DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT\",\"value\":true}
—the booleantrue
rather than the string"true"
. This happens even if the boolean was originally quoted as a string. Likely we're falling prey to Jinja-templated-YAML failing to escape the values it writes, inadvertently converting strings to bools.Setting a (quoted) boolean directly in the
env
subtree of the django-ida Helm chart works fine, so likely what we need to do is stringify and quote the env var values in the loop where we apply extraEnvs.A/C:
quote
to (probably)string
--quote
is for shell scriptsunrecognized type: string
but this seems to be backwards; the message should beunrecognized type: bool