Nico
Nico

Reputation: 719

Can i delete the Shelvesets created by TFS Build Service Account

I'm housekeeping the TFS Server and have 40,000 shelvesets of which 6,500 are for the Build Service Accounts.

I assume i can simple remove these as i don't think the builds will refer to old shelvesets.

I exported all current shelvesets. Can someone confirm if we can just delete all of these? Or will we run into trouble if we want to run an old build

We are running TFS 2017.2

Upvotes: 1

Views: 412

Answers (2)

SoftwareCarpenter
SoftwareCarpenter

Reputation: 3923

I don’t see any reason to keep them. Since commits should be occurring therefore giving you code history and reproducible builds.

  • If you delete a shelve set you cannot retrieve it latter for any old builds.
  • Shelve sets are not the same as code commits

Reference the MSDN documentation which applies to TFS 2017 and shelve sets for use cases.

  • the purpose is not to be a version history of code changes or associate code with builds.Thats what commits are used for.
  • Shelve sets are temporary. However, no rule stopping you from keeping forever. Unlikely any value would be gained from so many though.
  • there is not a need to reproduce a build with a shelf set that is older then your code release cycle because commits our occurring making the shelve sets moot.

#NOTE: I do not know why you would have the build agent doing code shelve sets. I would look at your build definition and take out anything automatically creating shelve sets.

Upvotes: 1

Shalem
Shalem

Reputation: 1516

Its always advised to find the details of shelveset unless you know its old enough to delete. You must be a shelveset owner, or your Administer shelved changes permission must be set to Allow as explained here. Shelveset commands to delete/find/list/... are listed here

TFS Sidekicks tool provides a dedicated UI for a number of clean-up actions, including old shelvesets till TFS2015. Not sure about its working in 2017

Upvotes: 0

Related Questions