I noticed the same on our environment, this is our setup.
Environments: CI, TEST
Retention Policy: 20 deployed releases
In a given day, we might create a couple of releases to CI in a day, and only deploy to TEST a couple of times a week.
Normally, the release that is deployed to TEST is the oldest. And since that is the case, the retention policy will try to delete it. But since it is still mapped to IIS, the task is stuck on trying to delete it.
Hope it makes sense, and will be addressed in a future build soon.
I am seeing the same problem “Applying retention policies” never finishes, in version 3.2.1 But the reason is different. Log says it’s due to not being able to delete the files.
Should this perhaps just error out with this explanation? Or is there a setting our Octoadmins can configure to reduce the retry count and error out earlier.