I have a Variable Set that, according to the Usage tab, is unused. However, when I attempt to delete the Variable Set, a error is displayed telling me I can’t delete it because it’s being used.
Is there a set of API calls I can make to discover what is causing the Variable Set to be undeletable?
The variable set can’t be deleted because it’s currently being referenced in a release or runbook snapshot. Please refer to usages for more detail.
Thank you for contacting Octopus Support. I’m sorry to hear you are running into this issue.
Can you confirm if the following URL gives you any different information than the usage tab in the UI?
You can pull this information directly from the URL of the variable set per my example below:
I would expect the JSON to return something like this:
Let me know what you find at your earliest convenience.
Thanks for that, the API endpoint did indeed give me different results, and there was one release that was still using the Variable Set. As soon as I updated the variables snapshot I was able to delete the Variable Set.
However, just looking at response from the
usages API endpoint in Chrome DevTools, I think there may be a bug somewhere. For a Variable Set that is widely used, it’s reported that it’s only attached to projects, not releases or runbook snapshots. As an example, the project below only has one release and the Variable Set that produced the
usages output is in the variable snapshot for that release.
Example response -
"ProjectName": "6a. Create Enduser",
Thank you for the quick response. I’m glad to hear you were able to find the associated release and get unblocked.
We’ll take a look and try to reproduce this in a test environment. If I can confirm a bug, I’ll reply with a link to the associated GitHub issue once I create it.
I don’t know if I’ll get a chance to get to this today. If not, it will be early next week after Monday’s UK bank holiday.
I hope you have a good weekend!
Thanks Donny, and no rush at all. It’s not something we routinely need to do.