Deployed main branch even tho branch not connected
slicksammy
PROOP

a year 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.

Solved

8 Replies

Railway
BOT

a year 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!


slicksammy
PROOP

a year ago

notice the new build is different from old build (all I did was update ENV)

Attachments


slicksammy
PROOP

a year ago

showing my instance is disconnected from branch

Attachments


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 11 months ago


slicksammy
PROOP

a year 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 11 months ago


echohack
EMPLOYEE

a year 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 11 months ago


slicksammy
PROOP

a year 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 11 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 11 months ago


Railway
BOT

10 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 10 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...