Environment auto connecting to main branch
Anonymous
PROOP

a month ago

Hi,

we have the following environment set up. A staging and production environment. The staging environment is setup to track our main branch and auto deploy, while our production environment we manually deploy the latest commit through the UI.

This has worked fine for some time, but today we noticed that our production services were deploying without manually triggering them. This caused a production issue for us. When investigating we saw that the services were tracking the main branch and auto deploying.

We can't understand how this happened as non of us synced environments with production or updated the service's settings.

Some advice into the matter would be great, as this is quite critical that this works for us.

$10 Bounty

2 Replies

Status changed to Awaiting Railway Response Railway about 1 month ago


Status changed to Open Railway about 1 month ago


domehane
FREE

a month ago

Hello ,

so the safest way to make sure production never auto deploys is to go into each service in your production environment → settings → source → and hit disconnect on the branch as long as a branch is connected, railway will auto deploy on push, even if you didn't intend it to once disconnected, you can still deploy manually using cmd+k → "deploy latest commit" whenever you're ready to push to prod to figure out what happened, check your project audit log to see if any settings changed around that time

Hope this help you :)


domehane

Hello , so the safest way to make sure production never auto deploys is to go into each service in your production environment → settings → source → and hit disconnect on the branch as long as a branch is connected, railway will auto deploy on push, even if you didn't intend it to once disconnected, you can still deploy manually using cmd+k → "deploy latest commit" whenever you're ready to push to prod to figure out what happened, check your project audit log to see if any settings changed around that time Hope this help you :)

Anonymous
PROOP

a month ago

Hi Domehane, yes, I’m aware of that behaviour. The issue we’re seeing is that although production is initially disconnected from any branch (so it shouldn’t auto-deploy), after some time it appears to automatically reconnect itself to a branch.

This is the core problem for us: our production environments start off with no branch connection, but at some point they end up linked to main without any explicit action from our side. From our perspective, this behaviour feels unexpected and somewhat opaque.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...