Depoloying templates only supports SNAKE_CASE environment variables
Heya ππΎ, I'm having issues deploying a template that has preset variables that are not in
snake_case
format, the variables are in the following form: http.port
.
The service deploys fine when I use these veriables within an existing project, and setting up the template does correctly store the variables in the template's configuration, they only don't work when it comes to deploying the template - their default values are not pre-populated, and cannot be updated in the 'configure service' step of deploying the template.
I unfortunately cannot use any other format for specifying the environment variables as this is a limitation with the service itself - https://github.com/opensearch-project/opensearch-build/issues/4451
Here is the link to the template: https://railway.app/template/_GawOC
Is this a bug with the deploy template UI, or are these variables working by accident elsewhere, and support for them isn't intended?48 Replies
Project ID:
N/A
N/A
can you give some full examples of variables that dont work please
Here's the full list of variables for the service. Only
PORT
and OPENSEARCH_INITIAL_ADMIN_PASSWORD
work, all the others don't get pre-populated when deploying the templateThis is what it looks like when deploying the template
Just to confirm, this is an example of one of the values I expect to see, though they don't come up - and can't be populated, so the
Deploy
button never gets enabled πcan you send them in plaintext here please
Sure can do
plugins.security.disabled
node.store.allow-mmap
discovery.type
http.host
Just to be super clear, they work perfectly fine when I add them to an existing service that I manually add to a project, it's only on the template deployment UI where they freak out
cool bug, i can reproduce
the values do get saved into the template, just arent shown when deploying
i'll bring this up to the applicable person, should be a quick fix, ill get back to you with an update when i have any news
Yeah was surprised when I wnet back to edit the template and found they're all correctly saved π
. Lovely thank you!
hey @fp could you take a look at this when you get a chance, variable values arent showing up when going to deploy a template
Hmm, interesting.
I wonder if it's trying to parse them as reference variables because of the
.
and then omitting them as there's no reference.sounds very plausible
little correction, they don't show up when going to deploy the template too
Like, their values?
yeah, they're just empty when going to deploy the template, but the values do exist within the template itself, just aren't populated
Right.
Let me see if it's something quick as I am in template land already.
for context I was able to reproduce that with a template made with the v2 composer
Hmm, I see the issue.
ouuu do tell
Hmm, very interesting JavaScript adventure.
always is
Hmm, fun.
It might actually be a bug with react hook form.
oh that's real fun
Fun indeed.
This is what's happening btw.
I have a PR open with a solution but it's kinda hacky so will merge upon review.
I'm honestly surprised that OP was the first to report this, as I thought I've seen templates that used period's in the variable names
Fix merged should be live in a few.
hmmm, doesnt look like it worked? https://railway.app/new/template/-abym-
problem for monday though π
On phone but what do your variables look like?
for
nodeβ’store.allow-mmap
the variable is just false
wait why is there a bullet point thereAh, multiple dots.
Let me actually fix it rn.
Will fix the display thing too.
1:20am tho
Solution
PR merged.
now thats dedication
Looks good now!
problem for next week
Interesting.
nothing is broken, just the coloring
Yeah, JSON renders fine.
Looks gooooood, thanks for the quick fix ππΎ