Cannot Delete Tag from Tenant Tag Set

I have a tenant Tag which I am unable to delete. I have even tried cloning my VM and deleting all Variable Sets, Releases, Tenants and Projects so there is absolutely nothing left for it to be associated with and I still cannot delete. I get the message “You appear to be removing an existing tag. This action will fail if the tag is already in use.”

I’ve noticed there is a closed issue which looks similar

There is also a related GitHub issue

https://github.com/OctopusDeploy/Issues/issues/3436

Should I wait until the outcome of the GitHub issue? Is there any other diagnostic info I can provide to assist you here?

Thanks heaps!

Hi Pnolan

Thanks for contacting us, I suspect there is a snapshot somewhere that is still referencing the tenant tag, you can find more information about snapshots from this link https://octopus.com/docs/key-concepts/projects/releases#snapshots

You won’t be able to remove the tenant tag If you have a release that reference it. If the release is the current deployed version, you will need to wait until it becomes non current and get cleaned up by the retention policy, if it is not the current version, I would suggest to look into your retention policy to check if it is still being kept.

We are planning to implement this issue in the near future, please keep track of this issue https://github.com/OctopusDeploy/Issues/issues/3436

Regards
Eddy

Hi Eddy thanks for your reply.

I’ve even tried cloning my VM and deleting all Variable Sets, Releases, Tenants and Projects so there is absolutely nothing left and I still cannot delete.

Should deleting all the releases have also removed the snapshots?


Kind Regards
Patrick Nolan | Architecture Practice Lead
e5 Workflow - Built for Business

[image001]

M. +61 (0) 435 172 112
T . +61 (0) 2 9221 0070
www.e5workflow.comhttp://www.e5workflow.com/

• Please consider the environment before printing this email.
P R I V I L E G E D AND C O N F I D E N T I A L
This message is for the named person(s) use only. It may contain confidential, proprietary or legally privileged information of e5 Workflow Pty Ltd. No confidentiality or privilege is waived or lost by any mistransmission. If the reader of this message is not the intended recipient, or the employee responsible for delivering the message to the intended recipient(s), please notify us immediately by telephone at the number noted above. Any distribution or copying of this communication is strictly prohibited

image001.jpg

Hi Patrick

I suspect that you might just see the first client side warning message as the screenshot attached, this message will show whenever you click on the delete button of a tag regardless of if it is being referenced else where or not, can you please try to click on Save button and see what the system actually comes back with?

If still cannot delete it by clicking on the Save button, the server should send back a more details message to tell what actually referenced it. FYI, certificate, deployment target and account can reference a tag.

Hope that helps

Regards
Eddy

Hi Eddy,

When I click Save I then get a second error (see attached).

I am 100% sure I am not using the Tag in any Variable Sets. As discussed I event tried cloning my VM and deleting all Variable Sets, Releases, Tenants and Projects so there was nothing left (almost a clean install) and I still got the same message.

[cid:image001.png@01D34CCF.5E891620]


Kind Regards
Patrick Nolan | Architecture Practice Lead
e5 Workflow - Built for Business

[image001]

M. +61 (0) 435 172 112
T . +61 (0) 2 9221 0070
www.e5workflow.comhttp://www.e5workflow.com/

• Please consider the environment before printing this email.
P R I V I L E G E D AND C O N F I D E N T I A L
This message is for the named person(s) use only. It may contain confidential, proprietary or legally privileged information of e5 Workflow Pty Ltd. No confidentiality or privilege is waived or lost by any mistransmission. If the reader of this message is not the intended recipient, or the employee responsible for delivering the message to the intended recipient(s), please notify us immediately by telephone at the number noted above. Any distribution or copying of this communication is strictly prohibited

image001.jpg

Hi Patrick

I think there might be a snapshot in VariableSet that referenced the tag, so can you please try to use Chrome and browse to the tenant tag set that with the target tenant tag, attached is the screenshot that from my machine, it highlights how to get the URL to the tenant tag set, place it in the browser, you should get a json document back something similar to this one

{ "Id": "TagSets-2", "Name": "SET1", "Description": "", "SortOrder": 0, "Tags": [ { "Id": "TagSets-2/Tags-3", "CanonicalTagName": "SET1/red", "Name": "red", "Description": null, "Color": "#6e6e6e", "SortOrder": 0 } ], "Links": { "Self": "/api/tagsets/TagSets-2" } }

In this sample, TagSets-2/Tags-3 is the tag id that I am looking for, you then can run a SQL script by using the id as below to find the record that referenced it
SELECT * FROM dbo.[VariableSet] WHERE RelatedDocumentIds LIKE '%TagSets-2/Tags-3%'

If you get record from the script and you no longer need it, you can just delete it and try to remove the tenant tag again. This is related to the issue that you mentioned earlier, we will try to fix it in the near future.

Hope that helps

Regards
Eddy

Thanks Eddy that worked!