3 days ago
We run two Railway services on Hobby and need to deploy them in a controlled order. Is there a supported way to ensure that only our release process can change the active deployment while a release is running? How can we establish that earlier accepted or queued deployment requests cannot take effect later? Please include GitHub, dashboard, API/CLI, all token types and OAuth.
How do mandatory Railway-initiated host migrations interact with an in-progress release: can they change the active deployment ID, image or source revision, or restore an earlier revision? Please link the applicable guarantees and state whether the solution is available on Hobby. This is a general question; please do not change our project.
4 Replies
3 days ago
For GitHub, you can turn off automatic deployments for each service so new commits no longer deploy on their own, and you can turn on Wait for CI so commits sit in a WAITING state until your GitHub Actions workflows finish. Commits pushed by repo members who have no linked Railway account are held for manual approval by default (autodeploy controls, deployment approvals). We can't confirm a setting that limits deployment changes to a single release process across the dashboard, API/CLI, every token type and OAuth. We also can't confirm any guarantee that a deployment accepted or queued earlier can never become active later. Please test your release flow in a separate environment before you rely on it.
Railway-initiated host migrations create a new deployment, and you can't opt out of them. On Hobby, a service can also be moved to another host ahead of time to balance workloads, and platform-wide upgrades can redeploy a service more than once. These deployments are marked with a banner above the active deployment (reference). We can't confirm whether a migration keeps the same image or source revision, or how it interacts with a release that's in progress.
Status changed to Awaiting User Response Railway • 3 days ago
Railway
For GitHub, you can turn off automatic deployments for each service so new commits no longer deploy on their own, and you can turn on Wait for CI so commits sit in a `WAITING` state until your GitHub Actions workflows finish. Commits pushed by repo members who have no linked Railway account are held for manual approval by default ([autodeploy controls](https://docs.railway.com/deployments/github-autodeploys), [deployment approvals](https://docs.railway.com/services)). We can't confirm a setting that limits deployment changes to a single release process across the dashboard, API/CLI, every token type and OAuth. We also can't confirm any guarantee that a deployment accepted or queued earlier can never become active later. Please test your release flow in a separate environment before you rely on it. Railway-initiated host migrations create a new deployment, and you can't opt out of them. On Hobby, a service can also be moved to another host ahead of time to balance workloads, and platform-wide upgrades can redeploy a service more than once. These deployments are marked with a banner above the active deployment ([reference](https://docs.railway.com/deployments/reference#railway-initiated-deployments)). We can't confirm whether a migration keeps the same image or source revision, or how it interacts with a release that's in progress.
3 days ago
Thank you. The automated response leaves the safety guarantees unresolved. Could a Railway team member please confirm whether any supported Hobby mechanism provides either (a) an atomic conditional deployment based on the current active deployment or revision, or (b) a fence against competing deployment changes and a way to settle all previously accepted or queued operations?
Separately, during a Railway-initiated migration, does the new deployment always preserve the currently active image and source revision, and can an older deployment become active after a newer release? How do these migrations interact with deployment or rollback requests already in flight? Links to the exact guarantees, or confirmation that they are not available, would help us design the release safely. This is a general question; please do not modify our project.
Status changed to Awaiting Railway Response Railway • 3 days ago
3 days ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • 3 days ago
3 days ago
- No, Railway doesn’t have a conditional lock on deployments as you described.
- For migrations, Railway may rebuild from the source instead of reusing the current active image. For the second part of the second question, that answer unfortunately isn't available.
2 days ago
For a project token scoped to an environment, what does environment.unmergedChangesCount = null mean, and does this field count changes staged but not yet applied in that same environment?