I’m sorry that you’ve hit this issue. It’s definitely not ideal, but it is something that we have seen in the past.
The PK_Release_Id generally increments everytime a release is created. Occasionally, the Release ID for some reason, will fall behind the highest number in the dbo.Release table, usually when something unexpected happens.
Luckily, there is a relatively quick fix for this but it requires running two SQL queries against your database.
Query 1 - find out the highest value in the dbo.Release table.
SELECT Top 10 CAST(REPLACE(id, 'Releases-', '') AS BIGINT) AS MaskedId FROM dbo.Release ORDER BY MaskedId DESC
This should provide you with a list of ID’s. You will want to select the highest value, which will be in row 1. Add approximately 10 to this number and then set that value in the KeyAllocation table using this query.
Set Allocated = 2134
where CollectionName = 'Release'
Please be sure to use best practices and take backups before and after making any changes to the KeyAllocation table. If you re-encounter this issue and need to run through this process again, please contact us before doing so as these instructions are not recommended to be used in any case other than when directly instructed by Octopus Support.
I hope this helps and allows you to keep deploying.