Expected behavior
Ability to delete an old environment that is no longer in use.
Actual behavior
Receive a 422 on the request with error “Production environment cannot be removed”.
Failure Logs
N/A
Context
The environment in question is named “OLD” and is not marked as the default environment. The current default environment is the production environment.
- Project Name: Pharos. Environment is named “OLD”
Hello @txtjournals,
Following this thread it seems that deleting a production environment is not possible. So I updated your environment as a remote one and you should be able to remove it now.
Let me know if this did not work
Thanks @anon16419211, that did it! Considering I previously had 2 production environments, is there a way to do this ourself if it happens again or to help others with the same issue?
@anon16419211 So this introduced another problem. Now that the environment is gone, it’s showing me this:
When I click “Deploy to production”, I receive a 409 on https://api.forestadmin.com/api/environments
with the following body:
{"errors":[{"status":409,"detail":"An environment with this name already exists. Please choose another name.","meta":{"entityName":"Environment"},"name":"EnvironmentConflictError"}]}
What’s strange is that I (thought I) had another production environment already set up…
@anon16419211 Any ideas on this new issue as a result of fixing the first?
Not for the moment unfortunatly
I can see that there are two environments under the project Pharos and one has the name production so it could explain your issue. How many environments are available for you and which one are you currently using?
Sorry for the late reply I thought it was a closed topic
Yes we currently have 2 environments. The one labeled “Production” is remote and is the one I would like to designate as “Production” (the other is dev), but when I try I get the error above.