Octo cli "create-release" no viable release plans

Hi I’m trying to use the octo cli to create a release on the latest server version but am encountering an error.

PS C:\Temp> octo create-release --project ConfigAsCodePesterTestsProject --version 0.822.695 --gitRef release/test-release --apiKey xxx --space Test --server xxx
Octopus CLI, version 9.1.7

Detected automation environment: "NoneOrUnknown"
Found space: Test (Spaces-82)
Space name specified, process is now running in the context of space: Test
Handshaking with Octopus Server: xxx
Handshake successful. Octopus version: 2022.4.8471; API version: 3.0.0
Authenticated as: Admin
Found environments:
This Octopus Server supports channels
Found project: ConfigAsCodePesterTestsProject (Projects-201)
Automatically selecting the best channel for this release...
Building a release plan for Channel 'Default'...
Finding deployment process at git reference release/test-release...
Finding release template at git reference release/test-release...
Channel Default does not contain any packageSteps
There are no viable release plans in any channels using the provided arguments. The following release plans were considered:
Channel: 'Default' (this is the default channel)

This issue was not occurring on the previous version we were using with an identically configured project.

This is the log from the old version

PS C:\Temp> octo create-release --project ConfigAsCodePesterTestsProject --version 0.822.695 --gitRef release/test-release --apiKey yyy --space Test --server yyy
Octopus CLI, version 9.1.7

Detected automation environment: "NoneOrUnknown"
Found space: Test (Spaces-2)
Space name specified, process is now running in the context of space: Test
Handshaking with Octopus Server: yyy
Handshake successful. Octopus version: 2022.3.10594; API version: 3.0.0
Authenticated as: Luke Powell <Luke.Powell@allocatesoftware.com>
Found environments:
This Octopus Server supports channels
Found project: ConfigAsCodePesterTestsProject (Projects-1843)
Automatically selecting the best channel for this release...
Building a release plan for Channel 'Default'...
Finding deployment process at git reference release/test-release...
Finding release template at git reference release/test-release...
Selected the release plan for Channel 'Default' - it is a perfect match
Using version number provided on command-line: 0.822.695
Release plan for ConfigAsCodePesterTestsProject 0.822.695
Channel: 'Default' (this is the default channel)

Is this a regression or a change in the functionality that we are not aware of?

Thanks

Hi Luke,

Thanks for getting in touch! I have just tested this on my test instance using the same Octopus server and Octopus CLI versions. I’m also using a version controlled project and the exact command you provided, with my own values. Everything seems to work as expected for me.

From the error, it looks like the channel configured for Projects-201 could be misconfigured and missing the package step definition. Would you be able to check that project’s channels and confirm that its versioning rule references the correct package step?

If unsure, you can try comparing it to Projects-1843 from your 2022.3 Octopus server to see if there’s any noticeable difference in the configuration.

Let me know how you go here.

Best regards,
Daniel

There are no version rules.
The projects and channels on both versions are identical and neither of them use version rules on the single ‘Default’ channel.

Hi @Luke.Powell,

Thank you for getting back to us.

Based on the Octopus CLI output, it looks like something is getting hung up when it analyses the Channels. Are you able to share a screenshot of the settings for the Default Channel for Projects-1843 in Spaces-2 as well as the Default Channel for Projects-201 in Spaces-82?

Let me know at your earliest convenience.

Best Regards,
Donny

Sure,
This is the old version:

This is the new version

Hi @Luke.Powell,

Thank you for getting back to me.

Could you show me the Lifecycles associated with the Projects as well?

I look forward to hearing back from you.

Best Regards,
Donny

Old:

New:

Hi @Luke.Powell,

Thank you for getting back to me.

After a discussion with the team, we came up with two more areas to check.

  • Can you confirm the Default Lifecycle for the Project matches the Lifecycle for the Default Channel for each Project?

  • Could you also try pressing the “Create Release” button in the Octopus UI for each Project and share the Create release for XXXX page for each Project? (We can often find hints on this page if the error is not clear in the CLI)

Let me know regarding the above at your earliest convenience.

Best Regards,
Donny

As requested:

Old:

New:

Old:

New:

Hi @Luke.Powell,

Thank you for providing that information.

At this point, it isn’t clear why this isn’t working. Would you be available to have a quick 30 minute Zoom call to look at this tomorrow or Thursday?

Let me know a day and time that works for you and I’ll send a meeting invitation.

Best Regards,
Donny

I sent you a private message with my availability.

2 Likes

Hi @Luke.Powell,

Thank you for taking the time to meet with me and @adam.hollow today.

Unfortunately, even after matching your exact Octopus Server version, I am still able to create releases in a similarly built Git-enabled Project.

Here are some screenshots of my settings:

On the call, you showed us that there was an issue with the local Git Cache for another project and you are unable to clear those directories manually while Octopus is in use. Would you be able to create a fresh Project on the 2022.4 Octopus Server instance, pointing to a fresh Git File Storage Directory and re-create the Project via the Octopus UI? Once that is built, can you confirm if you are getting the same error via the CLI?

Let me know at your earliest convenience.

Best Regards,
Donny

I’ve noticed something that may be relevant.
When I attempt to create a release with the ‘main’ branch it is successful.
When I attempt with the ‘release/test-release’ branch then it fails.

It might be worth you re-attempting to recreate the issue with a similarly named branch.

If that still works for you then I’ll go ahead with the suggestion from your previous post.

Hi @Luke.Powell,

Thank you for getting back to me.

It didn’t seem to make a difference on my test instance.

Let me know if re-creating the Project yields a different result when you get a chance to try it.

Best Regards,
Donny

I tried recreating the project with a new github repo like requested and the issue does NOT occur on the new project.

Detected automation environment: “NoneOrUnknown”
Found space: Test (Spaces-82)
Space name specified, process is now running in the context of space: Test
Handshaking with Octopus Server: xxx
Handshake successful. Octopus version: 2022.4.8471; API version: 3.0.0
Authenticated as: Admin
Found environments:
This Octopus Server supports channels
Found project: ConfigAsCodePesterTestsProject-3 (Projects-224)
Automatically selecting the best channel for this release…
Building a release plan for Channel ‘Default’…
Finding deployment process at git reference release/test-release…
Finding release template at git reference release/test-release…
Selected the release plan for Channel ‘Default’ - it is a perfect match
Using version number provided on command-line: 0.822.695
Release plan for ConfigAsCodePesterTestsProject-3 0.822.695
Channel: ‘Default’ (this is the default channel)
Creating release…
Release 0.822.695 created successfully!
Release created from commit 826fc28a8eb66bfc919257ec19320cdd659978a5 of git reference refs/heads/release/test-release.

1 Like

Hi @Luke.Powell,

Thank you for getting back to me and confirming. I’m relieved to hear that this worked for you.

This leads me to believe that the Git Cache folders likely all need to be cleared.

I suspect that once these are cleared, the original Project that was not working may start to work again.

If you have a chance to tinker any more, let me know if that is the case.

Best Regards,
Donny

Deleting the git cache had no effect.
Deleting the Git folder on the server and deleting the git cache also had no effect.

The original command still fails with the same error.

Hi @Luke.Powell,

Thank you for confirming.

I’ll relay this to our Engineers. If you wouldn’t mind preserving the broken Project for the moment, they may have a suggestion as to why the new Project works but the old one still does not, even after the Git Cache was manually cleared.

I really appreciate all of the patience you’ve had throughout this process. As soon as I hear back from our Engineers I’ll let you know.

Best Regards,
Donny

Hi @Luke.Powell,

Apologies for the delay in getting back to you on this one.

We’ve just heard back from our Engineers and they were unable to reproduce this behavior in Octopus 2022.3. and 2022.4. Has this issue occurred on any other Projects since the original Project with the issue? If not, are you happy to continue using the new Project going forward?

Let us know at your earliest convenience.

Best Regards,
Donny Bell

Hi Donny,
The problematic project was deleted and we’ve not observed the behaviour since on new projects.
So we’re good unless it re-occurs.
Thanks

2 Likes