After deleting a service it's PR-environments stuck. Closing PR-s in gh does not work.

I recreated a service, but I have a bunch of stuck environments. I can not delete them from the Environments settings panel, since they are PR, and do not have expanding menu with deleting options, how usual envs do. Is there a way to clean this up? Maybe via api (I looked for a solution, did not find one though).
Solution:
hi! i attached a postman collection with some API queries you should be able to use to delete environments by Id. i'm curious about the root of the problem though so we can address it. did you merge the PRs and they did not get deleted?
Jump to solution
10 Replies
Percy
Percy13mo ago
Project ID: c1780bfa-ba7b-4a72-9d1c-5376df06055c
Alexander Kremenets
Alexander KremenetsOP13mo ago
c1780bfa-ba7b-4a72-9d1c-5376df06055c
Brody
Brody13mo ago
@thomas - stuck pr environments, sorry but I have no clue who to ping for this, could you pull in the appropriate person?
thomas
thomas13mo ago
I think this is best for now.
Duchess
Duchess13mo ago
Thread has been flagged to Railway team by @thomas.
Solution
Melissa
Melissa13mo ago
hi! i attached a postman collection with some API queries you should be able to use to delete environments by Id. i'm curious about the root of the problem though so we can address it. did you merge the PRs and they did not get deleted?
Alexander Kremenets
Alexander KremenetsOP13mo ago
Thank you, I will try with postman. Yeah, once again - I had a project with one service in multiple environments (PR included). Then I removed the service. It had been deleted from all the environments. Though, the PR envs ramain, simply without the linked project. Hence, in a way I understand why they was not removed on closing the PRs (project was not linked any more). Maybe you could delete all the PR-environments linked to the project on project deletion.
Melissa
Melissa13mo ago
ahh okay I see, thank you for the additional info! I have made a ticket to look into this.
Greg Schier
Greg Schier12mo ago
Just to clarify that I understand this correctly: 1. Open a PR linked to the service 2. Railway creates PR env for service 3. You delete the service 4. No way to delete the PR environment because Railway normally deletes on merge
Alexander Kremenets
Alexander KremenetsOP10mo ago
correct!
Want results from more Discord servers?
Add your server