Sequence contains more than one element error

We recently performed a data restore from our Octopus Production to Test instance. We then performed an upgrade on our test instance from v2019.3.8 to v2020.4.2.

While mostly a smooth restore and upgrade, we are running into the below error:

"Sequence contains more than one element"

We see this when trying to create a new release in projects (not all, but some). Deleting the release, changing the versioning pattern, changing the package source, changing the Default channel, and removing/re-selecting elements does not work either.

I have seen similar errors in your forum, but I believe it was supposed to be resolved in an earlier release. Is there a fix within Octopus for this? Or does this require the SQL script fix mentioned for similar issues?

Hi Alex,

Thank you for contacting Octopus Support.

If you wouldn’t mind, it would be really helpful to see a copy of the server logs with trace logging enabled. This would (hopefully) give us a really good indication as to what is going on.

Once you are able to obtain the server logs, you may upload them via Octopus.com -> Sign-In -> Support (the link just above where your org is listed).

If you have any issues uploading or if you have any questions, please let me know.

Regards,
Donny

Hi Donny,

Thank you. I will upload those today.

-Alex

1 Like

Hi Alex,

Thank you for sending the logs over.

I was able to figure out that you have run into this bug:

You may try renaming the step templates used in the affected projects to circumvent the issue. However, before doing so, you may want to consider re-creating Octopus on your test instance. Rather than using the Import/Export tool in Octopus Manager, I would recommend the following:

  • Make a copy of your SQL db
  • Install your current version of Octopus on the test server
  • Upgrade to 2020.4.2

Be sure to make note of your master key as you will need this during the installation process.

Optionally, you may run SQL queries to disable items that may not be necessary in a test environment.

To disable Subscriptions:

UPDATE Subscription SET IsDisabled = 1

To disable Triggers

UPDATE ProjectTrigger SET IsDisabled = 1

To disable Deployment Targets

UPDATE Machine SET IsDisabled = 1

After implementing any or all of these, you may re-enable them in the Octopus GUI as needed (i.e. - if you wish to spot test)

I know this is a lot of information. If you have any questions or if anything is unclear, please let me know.

Regards,
Donny

Thank you for the information Donny.

Unfortunately, I cannot perform another restore/upgrade on Test as we are in testing phase. The good news is that your suggestion made me look into our step templates and performing an ‘Update All’ on the templates in that project resolved the issue. Not sure how I missed that.

There are one or two step templates that did not work Updating All. In those cases, I had to completely remove the step template from the project and re-add. Doing so removed the error and auto-updated the step. I did notice however since the upgrade, the step template name within a project does not auto generate the same name as the step template name. You have to manually write it out or copy it, which might just be part of one the upgrade versions since 2019.3.8.

But I will take your suggestion for the next restore/upgrade instead of the import/export tool process I used to avoid these issues. Thank you!

Best,
Alex

1 Like

Hi Alex,

Thank you for getting back to me. I’m glad to hear you were able to get things working again.

Don’t hesitate to reach out if you need anything else. We’re here to help. :slight_smile:

Regards,
Donny

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