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:Jump to 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?
10 Replies
Project ID:
c1780bfa-ba7b-4a72-9d1c-5376df06055c
c1780bfa-ba7b-4a72-9d1c-5376df06055c
@thomas - stuck pr environments, sorry but I have no clue who to ping for this, could you pull in the appropriate person?
I think this is best for now.
Thread has been flagged to Railway team by @thomas.
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?
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.
ahh okay I see, thank you for the additional info! I have made a ticket to look into this.
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
correct!