#Possible variable references bug

13 messages · Page 1 of 1 (latest)

zenith jacinth
#

Hey, I think I might have encountered a bug with the variable references. The bug happens when a service tries to reference another service env variable but the other service has a name that requires quotes to be referenced.

For example, kitchen-sink-0.20.0-server tries to reference the client service URL like this https://"${{ kitchen-sink-0.20.0-client".RAILWAY_PUBLIC_DOMAIN }}. The value of the env variable turns out to be http:// when accessed by the server.

I've created a small reproduction here in project with ID: cd9b3605-236d-452d-b828-1900a94e6e8b (see screenshot for what I set and visit https://kitchen-sink-0200-server-production-e522.up.railway.app/ to see what the app received)

zenith jacinth
#

@elder tiger bump since it's probably a real bug

noble rivet
# zenith jacinth Hey, I think I might have encountered a bug with the variable references. The bu...

I have no problems when referencing a service name with spaces using double quotes. Even so, Railway seems to just remove the double quotes and work normally.

From what I've seen in your message, you're using:

https://"${{ kitchen-sink-0.20.0-client".RAILWAY_PUBLIC_DOMAIN }}

which is incorrect and should be:

https://${{"kitchen-sink-0.20.0-client".RAILWAY_PUBLIC_DOMAIN }}

Or do not even include quotes as Railway shouldn't have a problem on referencing it.

Also, I never had problems when referencing variables with double spaces, dashes and more in the past, it just works.

If you're able to create a template or more detailed instructions on how to reproduce it would help.

noble rivet
zenith jacinth
#

Sorry for tagging the team, I thought it was OK since it looked like a potential bug.

I can still reproduce this reliably 😄 check the cd9b3605-236d-452d-b828-1900a94e6e8b project

noble rivet
zenith jacinth
#

Yes sir, trying to use the variable that gets auto completed gives me "CLIENT_URL":"https://"

elder tiger
#

What does the variable render as in the UI?

zenith jacinth
noble rivet
#

Hey, just getting back into this, can confirm that it's reproduceable

#

Will open a #1157406325593096264 thread as it's more likely to get seen

elder tiger
#

@zenith jacinth - #1460784476706832539 message