2 months ago
Whenever we duplicate a service in a project, the target service gets created without the sealed variables from the original service.
When we then manually re-create the sealed variable (still during the setup stage of the duplicated service, before it's been created), presumably due to some kind of bug, the service ends up being created with an empty value for that sealed variable.
Because of how sealed variables work, you can't view them after they're saved.
It's hard to notice this until production breaks later due to the missing variable, even though we entered the value correctly in the UI on our end.
This has already broken production for us twice, and it's very difficult to catch before issues arise.
Could this be fixed? Either by allowing sealed variables to carry over to duplicated services, or by fixing the bug that prevents them from being saved during service duplication?
3 Replies
Status changed to Awaiting Railway Response Railway • about 2 months ago
2 months ago
Sealed variables not carrying over during service duplication is documented, expected behavior since their values are irretrievable by design.
The issue where sealed variables save with empty values during the duplicated service's setup stage sounds like a bug, though. Could you share a link to an affected project so we can take a closer look? If you'd also like to see sealed variables carry over during duplication, feel free to post that as a feature request on the feedback board.
Status changed to Awaiting User Response Railway • about 2 months ago
2 months ago
Hi Noah,
Thanks for your fast response. I'll try to limit the specifics to things we can share publicly.
My project ID is 68003dcd-1624-479d-b907-bed7b271fca5 if you want to take a look.
We serve different major versions of our backend as services in Railway. For minor versions, we just redeploy the existing service so it pulls an updated Docker image. But we tend to duplicate the backend service when we ship a major version, since we still want to serve customers who haven't updated our app yet.
This means duplicating and deleting Railway services is fairly routine for us, and the duplication step is where we run into the bug where sealed variables get saved empty.
I'm not sure carrying sealed variables over during duplication would conflict with their design - it wouldn't let me as a user view the variable, and the app itself would still be able to access the value just like with any sealed variable.
That said, I understand that's how it's currently implemented, so I'll go ahead and post the feature request.
Thanks!
Status changed to Awaiting Railway Response Railway • about 2 months ago
2 months ago
Thanks for the info! Appreciate it and let me know the link to the feature request. Happy to dive in
Status changed to Awaiting User Response Railway • about 2 months ago
Status changed to Solved eden881 • about 2 months ago
