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
No description
19 Replies
Percy
Percy6mo ago
Project ID: b2f0a0fd-8a18-47c3-8cf3-ce912b1ef77b
Brody
Brody6mo ago
forgive me for asking but are you sure you didn't merge into main by accident?
Felipe Cardoso
Felipe CardosoOP6mo ago
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.
Felipe Cardoso
Felipe CardosoOP6mo ago
The last merge into main was 2 days ago.
No description
No description
No description
No description
Brody
Brody6mo ago
okay thank you the extra context is it possible you temporarily switched the deployment branch to staging? check your project activity logs
Felipe Cardoso
Felipe CardosoOP6mo ago
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
Felipe Cardoso
Felipe CardosoOP6mo ago
No description
No description
No description
Felipe Cardoso
Felipe CardosoOP6mo ago
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
Brody
Brody6mo ago
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
Duchess
Duchess6mo ago
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.
Brody
Brody6mo ago
^ please log in
Felipe Cardoso
Felipe CardosoOP6mo ago
I appreciate your attention. Have a great week
Brody
Brody6mo ago
you too!
Duchess
Duchess6mo ago
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.
Felipe Cardoso
Felipe CardosoOP6mo ago
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
Felipe Cardoso
Felipe CardosoOP6mo ago
There were no merges or commits in the main branch today, until the moment of the problem When I saw that it had switched to staging again, I tried redeploy, but I saw that it started redeploy on the staging branch again So I aborted redeploy, and made any commit to main to see if it would run in the correct branch, and it was This cannot happen under any circumstances, especially in the way it happened today. Apparently an automatic restart taking another branch.
No description
Duchess
Duchess3w ago
New reply sent from Help Station thread:
It happened againI believe it could be a bug on the page, or something related to my browserThe 3 times it happened, I had the dashboard open.The first time I was following another environment, so it took me a while to realize it.The second time (this afternoon), and again now, I was monitoring the application logs in the production environment.I will disconnect the other environments and keep only the production oneor move the production environment to another serverbecause it is not trustworthy to keep the services running in this unstable environment
You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
Have you since removed the trigger? If so, can you please let us know if it happens againI'm digging into the trigger logic to see if I can figure out what might have occured
You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
I disconnected the other branchesI only kept the "main" branch, I can't take the risk of changing the production environment as was happening.It hasn't happened again, and I hope it stays that way.But I don't feel safe maintaining more than one active environment for the project.
You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
Ok, thanks, please let us know here if the issue occurs again. Thanks.
You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
Hello, I found the problem on the dashboard for myselfI use a HyperX mouse, with some side buttons and on the scroll wheel.These buttons are configured for multimedia controlI noticed that when I am on the project page of the railway website, when I click on any multimedia control button it activates the redeploy of the project/service
You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
Holy moly, can you send us the mouse event of that mouse so we can see if I can filter it on the dashboard?
You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
I set this listener to see which keyup events (which keys) trigger the deploydocument.body.addEventListener('keyup', function(e){console.log(e.key, e.keyCode);});AudioVolumeUp 175AudioVolumeDown 174AudioVolumeUp 175MediaTrackNext 176MediaTrackPrevious 177MediaPlayPause 179I also noticed that this leads to a state where the dashboard freezesAll of these made the deploy run, but at a certain point during the tests, the page froze and stopped responding, as if my computer was frozen or had no internet (but only to access the dashboard)
You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
Oh yes, and it's not just with the mouse, I also tested it with the multimedia keys on my keyboard, and obviously it also activates the deploy
You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
I think this lines up with what we've seen. Going to mark this and log this for Monday.
You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
Can you please let me know when the issue is resolved?
You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
We are not able to reproduce the issue you're describing with multimedia controls. Please share your OS / browser info, as that will help us investigate.
You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
@christianI believe any browser can do it, but I use Google Chrome. It probably has nothing to do with the operating system, but I use Windows 11.To reproduce this, you just need to be on a project's dashboard, in the "deployments" tab.When you press any multimedia key, a new deployment will start.This happened again today, it's always a nuisance.The volume up or down key is one of the multimedia keys that activates the deployment, and this is terrible.
You're seeing this because this thread has been automatically linked to the Help Station thread.
Duchess
Duchess3w ago
New reply sent from Help Station thread:
I think this lines up with what we've seen. Going to mark this and log this for Monday.https://help.railway.app/questions/deploy-environment-wrong-branch-fa97c40b#p-31I thought they had identifiedhttps://help.railway.app/questions/deploy-environment-wrong-branch-fa97c40b#p-29I sent all these details before
You're seeing this because this thread has been automatically linked to the Help Station thread.
Railway Help Station
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 int...
Duchess
Duchess3w ago
New reply sent from Help Station thread:
Thanks for the detailed report, appreciate it!
You're seeing this because this thread has been automatically linked to the Help Station thread.
Want results from more Discord servers?
Add your server