Can't delete unused tenant tag or tag set

Hi OD,

I recently created a tenant tag set and added a single tag. I then used the .Net Client API to add that tag to the scope of all variables in a specific library variable set. That LVS is linked to a project and I cut a release of that project.

I’ve learned that deletion of the tenant tag is restricted when there’s reference to it in LVS’s or release variable snapshots. So I removed the tenant tag scope from the LVS variables and I used the API to delete the offending release.

I am not aware of any remaining variables that have the tenant tag scope (regardless of value) and the snapshot for the one release I cut should have been deleted when I deleted the release.

However, I still can’t delete the tenant tag set or the single tag in that set.

One thing I’ve noticed is that the underlying variable sets against every library variable set (and newly created LVSs), that is the VariableSetResource behind all LibraryVariableSetResources, have a TenantTags item in the ScopeValues collection linking to my specific tag in the tenant tag set.

Is this what is preventing me from deleting the tenant tag set or the child tenant tag?

I attempted to create a new LVS to see whether it would be safe to simply remove the TenantTags item from the ScopeValues collection of all my LVSs, but the new one has the same thing. Do you advise that I empty the TenantTags collection from all of my LVSs?

Thanks,

Jay

Hi Jay,

Thanks for contacting us. Yes there are a lot of things that can hold onto a tenant tag. We currently have an open issue to try and make it easier to delete tenant tags from the system.

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

Check all the places listed in the issue. I suspect you have missed a snapshot somewhere that is still referencing the tenant tag.

Hope that helps.
Cam

Hi Cam,

yes, you were quite right. Another developer hooked my library variable set up to a separate project. He cut a release and there was a snapshot I had to remove.

I wasn’t expecting someone else to have made that reference link in that short period where I was experimenting with tags (only a few minutes!).

Thanks for the help,

Jay