Deploy environment - wrong branch
Project id
b2f0a0fd-8a18-47c3-8cf3-ce912b1ef77b
I have this project with 3 environments, each one connected to its branch.
Today I merged a pull request (#90) on my "staging" branch, but something wrong happened.
As we can see on the print screen, the "main" environment deployed the branch from the pull request (#90) that was merged only into "staging".
I only noticed it after a couple of hours when the users notified me that they were having difficulty in some process.
What can I do to avoid it?
This never happened before.
I noticed some instability on railway during the deployment on staging, but I didn't imagined that this could affect the main environment.
![No description](https://cdn.answeroverflow.com/1252051768133812294/Screenshot_20240616-2053543.png)
![No description](https://cdn.answeroverflow.com/1252051768435544146/Screenshot_20240616-2055242.png)
17 Replies
Project ID:
b2f0a0fd-8a18-47c3-8cf3-ce912b1ef77b
forgive me for asking but are you sure you didn't merge into main by accident?
Yes I am. I just restarted the application and it came back to PR 88.
I think it is clear on the screenshots that shows the "history deploys"... There you can see that there was a build after pr 90 merged on "staging", 2 hours later I restarted and it runned on pr 88
It should only show builds after pr merged on branch main, not staging
The pr #89 was merged on develop, and runned correctly, only on develop environment.
The last merge into main was 2 days ago.
![No description](https://cdn.answeroverflow.com/1252070066544054302/Screenshot_20240616-221841.png)
![No description](https://cdn.answeroverflow.com/1252070067009753140/Screenshot_20240616-221832.png)
![No description](https://cdn.answeroverflow.com/1252070067429052457/Screenshot_20240616-221825.png)
![No description](https://cdn.answeroverflow.com/1252070068200935529/Screenshot_20240616-221814.png)
okay thank you the extra context
is it possible you temporarily switched the deployment branch to staging? check your project activity logs
I sent the print in the first message (2nd image) showing the branch the environment is connected to.
I never changed it.
But as I said, while the deploy was happening, the dashboard was going through something, it was very slow on loading. I thought it was my internet, I changed my DNS , cleaned my cash to ensure that wasn't anything here
I couldn't find any activity logs that show anything about changing environment / branch links
![No description](https://cdn.answeroverflow.com/1252073884367196201/Screenshot_20240616-2233332.png)
![No description](https://cdn.answeroverflow.com/1252073884631699466/Screenshot_20240616-2233202.png)
![No description](https://cdn.answeroverflow.com/1252073885059383336/Screenshot_20240616-223311.png)
On activity logs, we can see the deployment 2 days ago
The 7 hours ago (wrong deploy)
After that I restarted, and while I didn't get what was happening, I tried to change an environment variable , I thought it was something related to it, but after that I saw the pr stuff and rollback the environment variable
Nothing about changing the branch like
alright thanks for all the info, this does seem like a glitch from railway, i will escalate and hopefully they can shed some light on why this happened and why this would be unlikely to happen again
New reply sent from Help Station thread:
This thread has been escalated to the Railway team.You're seeing this because this thread has been automatically linked to the Help Station thread.
^ please log in
I appreciate your attention. Have a great week
you too!
New reply sent from Help Station thread:
Hey there, very sorry for the experience. I have raised a ticket internally to track down how this may have happened.You're seeing this because this thread has been automatically linked to the Help Station thread.
hi
It just happened again
But this time, i even had made anything on mais branchs..
It just changed to staging branch, from nothing
![No description](https://cdn.answeroverflow.com/1253390361217466488/image.png)