7 months ago
Hi, I occasionally disconnect my service to stop auto deploys. Today I updated an ENV var to get ready for a deploy and instead of redeploying the existing build, it grabbed the latest one from my main branch. Please see screenshots, you can see that the current build is different from the one that got deployed.
8 Replies
7 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
7 months ago
notice the new build is different from old build (all I did was update ENV)
Attachments
7 months ago
Yes, disconnecting and re-connecting will pull the latest commit. Usually we suggest that if you want to "freeze" the state of your deployments, you use a release branch where you only push to when you want there to be changes deployed.
Status changed to Awaiting User Response Railway • 7 months ago
7 months ago
I understand (and disagree from a ux perspective), but why should updating an ENV var behave that way?
Status changed to Awaiting Railway Response Railway • 7 months ago
7 months ago
Typically an environment variable will change the state of the service, such as deploying a license key, a database connection string, etc, which typically requires a restart of the service.
Status changed to Awaiting User Response Railway • 7 months ago
7 months ago
So why would a restart of a service not "restart the service" and instead pull latest from the branch?
Status changed to Awaiting Railway Response Railway • 7 months ago
7 months ago
You are deploying from GitHub and the deployment will reflect the current state of the branch you are deploying from. To Angelo's point, you can create a separate branch and connect Railway to that if you wish to manage which commit is deployed.
If you wish to go back to a specific version of your code, you can find the corresponding deployment in the Deployments tab and click the three-dot menu, and then select "Redeploy".
You can read more about Deployment Actions in the Docs.
Status changed to Awaiting User Response Railway • 7 months ago
6 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 6 months ago