Exception when creating new release on existing project in 2019.4.0

We’ve upgraded our Octopus to 2019.4.0 and after the upgrade we started getting errors on creating releases in existing projects. Not all projects are affected, only some of them.

The stack trace is this:

Octopus v2019.4.0

Sequence contains no matching element
System.InvalidOperationException
at System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate)
at Octopus.Server.Communications.Packages.ReleaseCreation.ReleasePackageMetadataCalculator.<>c__DisplayClass5_3.b__11(PackageReference packageReference)
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Linq.Enumerable.SelectManyIterator at System.Collections.Generic.List1…ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at Octopus.Server.Communications.Packages.ReleaseCreation.ReleasePackageMetadataCalculator.DeterminePackageMetadata(IOctopusQueryExecutor queryExecutor, Project project, IEnumerable1 releaseSelectedPackages, IList1 packageActions)
at Octopus.Server.Web.Api.Rules.ReleaseWorkItemsRule.AfterMapBeforeStore(Release model, ReleaseResource resource, ISpecialRuleContext context)
at Octopus.Server.Web.Infrastructure.Api.Responder1.ExecuteRegisteredRules[TRule](Action2 ruleCallback)
at Octopus.Server.Web.Infrastructure.Api.CreateResponseDescriptor2.Responder.ExecuteRegistered() at Octopus.Server.Web.Infrastructure.Api.Responder1.Respond(TDescriptor options, NancyContext context)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object x)
at Nancy.Routing.Route.<>c__DisplayClass4.b__3(Object parameters, CancellationToken context)

Hi Martin,

Thanks for getting in touch. We’ve had a couple of reports of this and have found the cause, it occurs if you have package steps that are scoped to a channel. We’ve raised an issue that you can track on GitHub and we’re working on a fix as a priority.

Apologies for the inconvenience caused.

Regards
Shannon

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