Deployments endpoint error

Upgraded OD Server to 2021.2.7727 running into an error when using the deployments endpoint. Trying to get the latest deployment id for a specific environment with the following

https://company.com/api/deployments?take=1&environments=Environments-6&projects=AutomatedAccounting&taskState=success

I’m getting the following error, subtracted 100’s of @taskid parameters

Exception occurred while executing a reader for SELECT *\r\nFROM [dbo].[Deployment]\r\nWHERE ((([SpaceId] = ‘Spaces-1’)))\r\nAND ([ProjectId] IN (@projectid1))\r\nAND ([EnvironmentId] IN (@environmentid1))\r\nAND ([TaskId] IN (@taskid1, @taskid2, … \r\nORDER BY [Created] DESC\r\nSQL Error 8003 - The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.

This has been working perfectly fine until we upgraded. Any idea what is wrong?

Hi Jasper,

Thank you for reaching out to us with your query.

It looks like you might be encountering the following issue:

I’ve checked and it doesn’t seem that a fix is available just yet. You may want to subscribe to the issue above to be notified when one is released.

I hope this is helpful. Please let me know if you have any questions.

Best Regards,

Charles

Yes - omitting TaskState filter and I do not get the error. Do you know which version of OD introduced the error and is it possible to roll OD back? This error is blocking the a production deployment, and I need to find a workaround until fixed.

Hi Jasper,

Thank you for getting back to me with your query.

Unfortunately I can’t determine which version of Octopus Server this issue was introduced in. I have asked the relevant team if they can advise and will update you once I hear back from them.

One possible workaround might be to remove the taskState filter from the API call which should allow the query to complete correctly. You could then filter the results by taskState in your script/application after they have been returned.

I hope this is helpful. I’ll let you know once I hear back from the relevant team.

Best Regards,

Charles

Hi Charles,
That’s a reasonable workaround - thanks

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.