R
Railwayβ€’9mo ago
Goatmun

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?
Solution:
PR merged.
Jump to solution
48 Replies
Percy
Percyβ€’9mo ago
Project ID: N/A
Goatmun
GoatmunOPβ€’9mo ago
N/A
Brody
Brodyβ€’9mo ago
can you give some full examples of variables that dont work please
Goatmun
GoatmunOPβ€’9mo ago
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 template
No description
Goatmun
GoatmunOPβ€’9mo ago
This is what it looks like when deploying the template
No description
Goatmun
GoatmunOPβ€’9mo ago
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 πŸ’”
No description
Brody
Brodyβ€’9mo ago
can you send them in plaintext here please
Goatmun
GoatmunOPβ€’9mo ago
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
Brody
Brodyβ€’9mo ago
cool bug, i can reproduce the values do get saved into the template, just arent shown when deploying
Brody
Brodyβ€’9mo ago
No description
Brody
Brodyβ€’9mo ago
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
Goatmun
GoatmunOPβ€’9mo ago
Yeah was surprised when I wnet back to edit the template and found they're all correctly saved πŸ˜… . Lovely thank you!
Brody
Brodyβ€’9mo ago
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
Faraz
Farazβ€’9mo ago
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.
Brody
Brodyβ€’9mo ago
sounds very plausible
Brody
Brodyβ€’9mo ago
little correction, they don't show up when going to deploy the template too
Brody
Brodyβ€’9mo ago
No description
Faraz
Farazβ€’9mo ago
Like, their values?
Brody
Brodyβ€’9mo ago
yeah, they're just empty when going to deploy the template, but the values do exist within the template itself, just aren't populated
Faraz
Farazβ€’9mo ago
Right. Let me see if it's something quick as I am in template land already.
Brody
Brodyβ€’9mo ago
for context I was able to reproduce that with a template made with the v2 composer
Faraz
Farazβ€’9mo ago
Hmm, I see the issue.
Brody
Brodyβ€’9mo ago
ouuu do tell
Faraz
Farazβ€’9mo ago
Hmm, very interesting JavaScript adventure.
Brody
Brodyβ€’9mo ago
always is
Faraz
Farazβ€’9mo ago
Hmm, fun. It might actually be a bug with react hook form.
Brody
Brodyβ€’9mo ago
oh that's real fun
Faraz
Farazβ€’9mo ago
Fun indeed.
Faraz
Farazβ€’9mo ago
This is what's happening btw.
No description
Faraz
Farazβ€’9mo ago
I have a PR open with a solution but it's kinda hacky so will merge upon review.
Brody
Brodyβ€’9mo ago
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
Faraz
Farazβ€’9mo ago
Fix merged should be live in a few.
Brody
Brodyβ€’9mo ago
hmmm, doesnt look like it worked? https://railway.app/new/template/-abym- problem for monday though πŸ™‚
Faraz
Farazβ€’9mo ago
On phone but what do your variables look like?
Brody
Brodyβ€’9mo ago
for nodeβ€’store.allow-mmap the variable is just false wait why is there a bullet point there
Brody
Brodyβ€’9mo ago
No description
Brody
Brodyβ€’9mo ago
No description
Faraz
Farazβ€’9mo ago
Ah, multiple dots. Let me actually fix it rn. Will fix the display thing too.
Brody
Brodyβ€’9mo ago
1:20am tho
Solution
Faraz
Farazβ€’9mo ago
PR merged.
Brody
Brodyβ€’9mo ago
now thats dedication
Faraz
Farazβ€’9mo ago
Looks good now!
Brody
Brodyβ€’9mo ago
problem for next week
No description
Faraz
Farazβ€’9mo ago
Interesting.
Brody
Brodyβ€’9mo ago
nothing is broken, just the coloring
Faraz
Farazβ€’9mo ago
Yeah, JSON renders fine.
Goatmun
GoatmunOPβ€’9mo ago
Looks gooooood, thanks for the quick fix πŸ™πŸΎ
Want results from more Discord servers?
Add your server