Possible variable references bug
infomiho
PROOP

3 months ago

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)

Solved

12 Replies

infomiho
PROOP

2 months ago

@Brody bump since it's probably a real bug


2 months ago

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.

1458861773519323100
1458861773938753500


2 months ago

Also, please do not ping anyone from the team #🛂|readme #5


infomiho
PROOP

2 months ago

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

1458904497261777200
1458904497668489500
1458904497941250000


2 months ago

Unfortunately I can't check your project as I'm not part of the Railway team.
So you're saying that when you try to do the auto complete, the variable doesn't work?


infomiho
PROOP

2 months ago

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


2 months ago

What does the variable render as in the UI?


infomiho
PROOP

2 months ago

You can see it in the screenshot in my last message and you can see what the server sees on this link https://kitchen-sink-0200-server-production-e522.up.railway.app/


2 months ago

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


2 months ago

Will open a #🤗|feedback thread as it's more likely to get seen




Status changed to Solved brody about 2 months ago


Loading...