Depoloying templates only supports SNAKE_CASE environment variables
ntkzwane
FREEOP

2 years ago

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?

55 Replies

ntkzwane
FREEOP

2 years ago

N/A


brody
EMPLOYEE

2 years ago

can you give some full examples of variables that dont work please


ntkzwane
FREEOP

2 years 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

1217891693588910000


ntkzwane
FREEOP

2 years ago

This is what it looks like when deploying the template

1217891844764074000


ntkzwane
FREEOP

2 years 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 💔

1217892030877925600


brody
EMPLOYEE

2 years ago

can you send them in plaintext here please


ntkzwane
FREEOP

2 years ago

Sure can do


ntkzwane
FREEOP

2 years ago

plugins.security.disabled
node.store.allow-mmap
discovery.type
http.host


ntkzwane
FREEOP

2 years ago

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
EMPLOYEE

2 years ago

cool bug, i can reproduce


brody
EMPLOYEE

2 years ago

the values do get saved into the template, just arent shown when deploying


brody
EMPLOYEE

2 years ago

1217893104925806600


brody
EMPLOYEE

2 years 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


ntkzwane
FREEOP

2 years ago

Yeah was surprised when I wnet back to edit the template and found they're all correctly saved 😅 . Lovely thank you!


brody
EMPLOYEE

2 years ago

hey @Faraz could you take a look at this when you get a chance, variable values arent showing up when going to deploy a template


fp
EMPLOYEE

2 years ago

Hmm, interesting.


fp
EMPLOYEE

2 years ago

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
EMPLOYEE

2 years ago

sounds very plausible


brody
EMPLOYEE

2 years ago

little correction, they don't show up when going to deploy the template too


brody
EMPLOYEE

2 years ago

1218097037791199200


fp
EMPLOYEE

2 years ago

Like, their values?


brody
EMPLOYEE

2 years 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


fp
EMPLOYEE

2 years ago

Right.


fp
EMPLOYEE

2 years ago

Let me see if it's something quick as I am in template land already.


brody
EMPLOYEE

2 years ago

for context I was able to reproduce that with a template made with the v2 composer


fp
EMPLOYEE

2 years ago

Hmm, I see the issue.


brody
EMPLOYEE

2 years ago

ouuu do tell


fp
EMPLOYEE

2 years ago

Hmm, very interesting JavaScript adventure.


brody
EMPLOYEE

2 years ago

always is


fp
EMPLOYEE

2 years ago

Hmm, fun.


fp
EMPLOYEE

2 years ago

It might actually be a bug with react hook form.


brody
EMPLOYEE

2 years ago

oh that's real fun


fp
EMPLOYEE

2 years ago

Fun indeed.


fp
EMPLOYEE

2 years ago

This is what's happening btw.

1218113520768385000


fp
EMPLOYEE

2 years ago

I have a PR open with a solution but it's kinda hacky so will merge upon review.


brody
EMPLOYEE

2 years 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


fp
EMPLOYEE

2 years ago

Fix merged should be live in a few.


brody
EMPLOYEE

2 years ago

hmmm, doesnt look like it worked?
problem for monday though 🙂


fp
EMPLOYEE

2 years ago

On phone but what do your variables look like?


brody
EMPLOYEE

2 years ago

for node•store.allow-mmap the variable is just false


brody
EMPLOYEE

2 years ago

wait why is there a bullet point there


brody
EMPLOYEE

2 years ago

1218307694583087000


brody
EMPLOYEE

2 years ago

1218307808039272400


fp
EMPLOYEE

2 years ago

Ah, multiple dots.


fp
EMPLOYEE

2 years ago

Let me actually fix it rn.


fp
EMPLOYEE

2 years ago

Will fix the display thing too.


brody
EMPLOYEE

2 years ago

1:20am tho


fp
EMPLOYEE

2 years ago

PR merged.


brody
EMPLOYEE

2 years ago

now thats dedication


fp
EMPLOYEE

2 years ago

Looks good now!


brody
EMPLOYEE

2 years ago

problem for next week

1218313871974994000


fp
EMPLOYEE

2 years ago

Interesting.


brody
EMPLOYEE

2 years ago

nothing is broken, just the coloring


fp
EMPLOYEE

2 years ago

Yeah, JSON renders fine.


ntkzwane
FREEOP

2 years ago

Looks gooooood, thanks for the quick fix 🙏🏾


Loading...