We've used Copado to deploy changes between environments for a couple years, but for the past couple weeks, we've seen our deployments in Salesforce complete successfully (in the Deployment Status UI with the two circles), and then automatically retry again, until we get:
Fatal Error LIMIT_EXCEEDED: Try deploying again. Your deployment exceeded its maximum retry limit. If you keep seeing this error, please contact Salesforce Customer Support.
It happens for very simple deployments (just a field): what causes Salesforce to retry it?
For some of these deployments, we see the changes in the Setup Audit History, for each retry (so duplicate lines in that history), despite a deployment that ends with Failed.
Copado says it's a Salesforce issue, and Salesforce says it's a developer issue.
The closest open known issue I can find is Deployment Fails with UNKNOWN_EXCEPTION: admin operation already in progress" or "LIMIT_EXCEEDED error" When there is more one Deployment in queue., but we don't have more than one deployment in queue (according to the Deployment Status UI). Is there another way of checking to see if there are pending deployments that aren't showing up in the UI?
Any other ideas? We're running all tests which takes 45 minutes, but that doesn't seem excessively long compared to other instances I've heard about.
UPDATE: This started when we deployed code based on the Kevin Poorman's apex Promise implementation (which is really nice to use and appreciated!).
I reproduced it in a fresh developer org using class one, two, three, and four. When trying to deploy a field label change via workbench running all local tests, I can reproduce the LIMIT_EXCEEDED result: