Automated Release Trigger Fails: Sequence contains no matching element

Hello!

I have a certain issue with 1 of the 60+ projects I have on my Octopus installation. For reasons unknown, when my build server pushes a release package to the built-in repository, it doesn’t create a release automatically despite the fact that I have a trigger setup to automatically create one.

I didn’t find one in the Audit logs through the web portal for my instance, but a teammate found the following logs inside the serverlogs:

2022-01-25 11:12:06.3328 3432 193 ERROR Unable to automatically create a release for project ‘PROJECT’ when package PACKAGE version XYZ-1.2.33 was pushed to the built in feed for space Default: Sequence contains no matching element
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate)
at Octopus.Server.Communications.Packages.SnapshotCreationFactory1.SetVersionFromVersioningStrategy(IOctopusQueryExecutor queryExecutor, Project project, Release release, IEnumerable1 candidateVersioningSteps, VariableCollection variables) in C:\BuildAgent\work\c42ca9d2b8233f1c\source\Octopus.Server\Communications\Packages\SnapshotCreationFactory.cs:line 146
at Octopus.Server.Communications.Packages.SnapshotCreationFactory1.<>c__DisplayClass10_0.<FillAndCreateSnapshot>b__6(Release r) in C:\BuildAgent\work\c42ca9d2b8233f1c\source\Octopus.Server\Communications\Packages\SnapshotCreationFactory.cs:line 88 at Octopus.Core.Model.Projects.SnapshotMatchExtensionMethods.<>c__DisplayClass0_0.<Switch>b__0(Release d) in C:\BuildAgent\work\c42ca9d2b8233f1c\source\Octopus.Core\Model\Projects\ISnapshot.cs:line 31 at Octopus.Core.Model.Projects.SnapshotMatchExtensionMethods.Switch(ISnapshot snapshot, Action1 releaseAction, Action1 runbookSnapshotAction) in C:\BuildAgent\work\c42ca9d2b8233f1c\source\Octopus.Core\Model\Projects\ISnapshot.cs:line 39 at Octopus.Server.Communications.Packages.SnapshotCreationFactory1.FillAndCreateSnapshot(IOctopusQueryExecutor queryExecutor, Project project, IProcess process, TSnapshot snapshot, IOctopusPrincipalInternal octopusPrincipal)
at Octopus.Server.Communications.Packages.AutomaticReleaseCreationPackageUploadProcessor.CreateRelease(String packageId, IVersion packageVersion, IReadOnlyList`1 projects, Release release, IOctopusQueryExecutor asSystemRunner, BuiltInFeed builtInFeed) in C:\BuildAgent\work\c42ca9d2b8233f1c\source\Octopus.Server\Communications\Packages\AutomaticReleaseCreationPackageUploadProcessor.cs:line 176

I’ve got automatic triggers on other projects and they work just fine. I also am able to manually create a release without error. The issue is only when I am trying to use the automated trigger on this one project.

  • Tried switching the channel it goes to
  • Tried deleting and recreating the trigger

neither of these work.

For reference, I am running 2021.1 build 7316

Hi Zoren!

Thanks for getting in touch! My first thought is perhaps it’s the invalid semver (XYZ-1.2.33) that could be causing this trouble. If you were to use instead a version like 1.2.33-XYZ and push that, does that get the release automatically created?

I also wonder if you might also be hitting a variant of the following issue, as I’ve seen this happen in automatic release creation as well as scheduled triggers. The fix for it was applied to version 2021.1.7645 so an upgrade might do the trick.

Let me know how you go, or if I can try to help with anything going forward. :slight_smile:

Best regards,

Kenny

Hi Kenneth,

I made a small typo earlier, the SEMVER is actually something like 1.34.0+3456.56 as a build format. We have 3 other projects that are identical to this one (that deploy the same type of package to a different server) but those all have no issues.

I’ll look into doing a software upgrade for the system and see if I can get that fixed.

1 Like

Hi Zoren,

No problem, I appreciate the update. Let me know how you go or if you have any other questions at all moving forward. :slight_smile:

Best regards,

Kenny

Hi Zoren,

I have another question upon looking at this one again, which might help narrow this down further in case the upgrade doesn’t fix it. I wonder if there’s any difference between the 3 working projects and this one project with the issue. Namely the release versioning configurations - is the problem project set to define the versions of its releases from this same package step that is also tied to the release creation trigger? This is set in your project’s deployment settings as shown in the following screenshot.

And are the 3 working ones you mentioned not set up in this same way? I.e. are their release versioning settings not tied to the same package step that is being used by automatic release creation?

I look forward to hearing how you go!

Best regards,

Kenny

Afternoon Kenny,

I updated to the latest version and then ran a test build to try and trigger automatic release creation. It works! I was able to see the release creation details were automatically generated by the system.

1 Like

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