Removing PR environments
team-regulis
PROOP

16 days ago

Hi, the automated PR environments that are being created in Railway are extensive and probably expensive. If I turn off the automated creation flag in the console, are these PR environments going to get cleaned up? If not how do I axe them?

They're fairly useless to us because they clog up the works and spin up even on the tiniest PR and then don't seem to get axed when the PR merges. Despite the other thread, we are properly connected to Github and I don't want to disconnect/reconnect from github, that would be badddd.

So can I just go ahead and delete PR envonrments myself ? there are friggin 22 of them right now...

Solved

5 Replies

Railway
BOT

16 days ago

Disabling the PR environments toggle only prevents new ones from being created, it does not clean up existing ones. PR environments are normally auto-deleted when the associated PR is merged or closed, so if you have 22 lingering, the corresponding PRs on GitHub may still be open. You can delete them yourself from Project Settings > Environments in the dashboard, or via CLI with railway environment delete <name>.


Status changed to Awaiting User Response Railway 16 days ago


team-regulis
PROOP

16 days ago

how can i be sure that i am not deleting any important production environments when i delete pr environments though?


Status changed to Awaiting Railway Response Railway 16 days ago


Railway
BOT

16 days ago

PR environments are named after their associated Git branch (e.g. feature/my-change) while your persistent environments have names like production or staging, so they are easy to tell apart in the environment list under Project Settings > Environments. Your production environment is the default one created with the project and will not show a branch-linked name.


Status changed to Awaiting User Response Railway 16 days ago


team-regulis
PROOP

16 days ago

What would be preferred here is : only spin up PR environments on NON-DRAFT PRs with a specific label (e.g. Ready-to-merge). Railway are you listening ? (not the railway bot, actual product ppl)


Status changed to Awaiting Railway Response Railway 16 days ago


Railway
BOT

16 days ago

That filtering isn't available today. PR environments are either on or off per project, with an additional toggle for bot-authored PRs and a "Focused PR Environments" option that limits deploys to services affected by the changed files. There's no way to filter by draft status or label.

You can post this as a feature request on our roadmap at https://station.railway.com/roadmap so other users can upvote it and the product team can track demand.


Status changed to Awaiting User Response Railway 16 days ago


Railway
BOT

9 days 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 9 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...