I just upgraded from 3.14.15926 to 3.5.16 and I not cannot deploy to a specific tenant from the command line tool. I now either need to get this resolved ASAP or revert back to 3.14.15926 in some way.
The Project I am deploying has 3 tenants but I deploy them individually with separate calls so that bamboo doesn’t timeout trying to do all 3 at the same time.
I can simulate the problem from the command line with the line below
.\octo.exe deploy-release --project="Dev" --tenant="Tenants-42" --releaseNumber 2017.7.18.498 --server http://octopus/ --progress --waitfordeployment -user="****" -pass="****"
I get this in the bamboo logs
Octopus Deploy Command Line Tool, version 4.21.0
Handshaking with Octopus server: http://octopus/
Handshake successful. Octopus version: 3.15.6; API version: 3.0.0
Authenticated as: ******
Finding project: Inforgen Dev
Finding release 2017.7.18.498
Octopus Server returned an error: An item with the same key has already been added.
Server exception:
An item with the same key has already been added.
System.ArgumentException
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Nevermore.SqlQueryGenerator.AddParameter(String fieldName, Object value)
at Nevermore.QueryBuilder`1.Parameter(String name, Object value)
at Octopus.Server.Web.Infrastructure.Api.IndexResponseDescriptor`2.Responder.<>c__DisplayClass2_0.<Execute>b__0(ISpecialRuleContext c, IQueryRule r)
at Octopus.Server.Web.Infrastructure.Api.Responder`1.ExecuteRules[TRule](Action`2 ruleCallback)
at Octopus.Server.Web.Infrastructure.Api.IndexResponseDescriptor`2.Responder.Execute()
at Octopus.Server.Web.Infrastructure.Api.Responder`1.Respond(TDescriptor options, NancyContext context)
at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object x)
at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)
and this in the Octopus logs
Unable to trigger deployment for project 'Dev' release 2017.7.18.497 to environment QA: Dev can only be deployed to tenants. Either deploy this release to a tenant, or configure this project to allow un-tenanted deployments. http://g.octopushq.com/MultiTenantProjectTenantRequired
Once you have corrected these problems you can try again.
If the problem is related to a variable you will need to update the variables for this release or recreate the release for the changes to take effect.
If the problem is related to the deployment process you will need to create a new release for the changes to take effect.
Unhandled error on request: http://octopus/api/tenants?ids=Tenants-42 5e95c68ba96f4407a251944a778b7f03 by ****** : An item with the same key has already been added.
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Nevermore.SqlQueryGenerator.AddParameter(String fieldName, Object value)
at Nevermore.QueryBuilder`1.Parameter(String name, Object value)
at Octopus.Server.Web.Infrastructure.Api.IndexResponseDescriptor`2.Responder.<>c__DisplayClass2_0.<Execute>b__0(ISpecialRuleContext c, IQueryRule r)
at Octopus.Server.Web.Infrastructure.Api.Responder`1.ExecuteRules[TRule](Action`2 ruleCallback)
at Octopus.Server.Web.Infrastructure.Api.IndexResponseDescriptor`2.Responder.Execute()
at Octopus.Server.Web.Infrastructure.Api.Responder`1.Respond(TDescriptor options, NancyContext context)
at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object x)
at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)
If I go to http://octopus/api/tenants?ids=Tenants-42 then I get this
{
"ErrorMessage": "An item with the same key has already been added.",
"FullException": "An item with the same key has already been added.\r\nSystem.ArgumentException\r\n at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)\r\n at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)\r\n at Nevermore.SqlQueryGenerator.AddParameter(String fieldName, Object value)\r\n at Nevermore.QueryBuilder`1.Parameter(String name, Object value)\r\n at Octopus.Server.Web.Infrastructure.Api.IndexResponseDescriptor`2.Responder.<>c__DisplayClass2_0.<Execute>b__0(ISpecialRuleContext c, IQueryRule r)\r\n at Octopus.Server.Web.Infrastructure.Api.Responder`1.ExecuteRules[TRule](Action`2 ruleCallback)\r\n at Octopus.Server.Web.Infrastructure.Api.IndexResponseDescriptor`2.Responder.Execute()\r\n at Octopus.Server.Web.Infrastructure.Api.Responder`1.Respond(TDescriptor options, NancyContext context)\r\n at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)\r\n at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object x)\r\n at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)"
}