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


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


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


2 years ago

cool bug, i can reproduce


2 years ago

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


2 years ago

1217893104925806600


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!


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


2 years ago

Hmm, interesting.


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.


2 years ago

sounds very plausible


2 years ago

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


2 years ago

1218097037791199200


2 years ago

Like, their values?


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


2 years ago

Right.


2 years ago

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


2 years ago

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


2 years ago

Hmm, I see the issue.


2 years ago

ouuu do tell


2 years ago

Hmm, very interesting JavaScript adventure.


2 years ago

always is


2 years ago

Hmm, fun.


2 years ago

It might actually be a bug with react hook form.


2 years ago

oh that's real fun


2 years ago

Fun indeed.


2 years ago

This is what's happening btw.

1218113520768385000


2 years ago

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


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


2 years ago

Fix merged should be live in a few.


2 years ago

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


2 years ago

On phone but what do your variables look like?


2 years ago

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


2 years ago

wait why is there a bullet point there


2 years ago

1218307694583087000


2 years ago

1218307808039272400


2 years ago

Ah, multiple dots.


2 years ago

Let me actually fix it rn.


2 years ago

Will fix the display thing too.


2 years ago

1:20am tho


2 years ago

PR merged.


2 years ago

now thats dedication


2 years ago

Looks good now!


2 years ago

problem for next week

1218313871974994000


2 years ago

Interesting.


2 years ago

nothing is broken, just the coloring


2 years ago

Yeah, JSON renders fine.


ntkzwane
FREEOP

2 years ago

Looks gooooood, thanks for the quick fix 🙏🏾


Loading...