Issue:
Admins cannot archive older environments that don't appear to have any projects associated with them. They run into the toast error:
Cannot archive environment. Project count that use this environment is <number>
On the environment's Projects tab, there are no projects listed.
On the Environments Overview page, the # of Projects column will list the <number> of private projects that are using the environment.
Root Cause:
There are private projects using the environment that do not appear under the environment's Projects tab.
Resolution:
Workaround to archive the environment
1. Go to your environment's Overview page
2. Grab the environment ID at the end of the URL
3. Paste the ID into these 2 MongoDB commands
4. Run the commands in MongoDB
rs.secondaryOk()
db.projects.find({"overrideV2EnvironmentId": ObjectId("YOUR_ENVIRONMENT_ID"), "isArchived":false}).count()
db.projects.find({"overrideV2EnvironmentId": ObjectId("YOUR_ENVIRONMENT_ID"), "isArchived":false})
5. From the output, copy the value for the project's "name"
6. On the Admin > Projects page, paste the project name in the search box and then click on the project name
8. On the Project Settings page, switch the environment
9. On the Environment page, archive the environment
References/Internal Records:
DOM-51619
Comments
0 comments
Please sign in to leave a comment.