Octo create-release fails to find package version for a script step

(Jakub Januszkiewicz) #1

I have a project with 2 steps:

  • Step1: a “Run a script” step with a package reference Package1,
  • Step2: a “Deploy a Windows Service” step with package ID Package1.

I upload 2 versions of Package1: 1.0.0 and 1.0.1.

I run a create-release command and try to specify Package1 version 1.0.0 to be used, but it doesn’t work as I expected. I try the following ways to specify the package version:

The PackageID:PackageVersion format

dotnet octo create-release --project MultiplePackagesTest --package Package1:1.0.0 --version 5.5.5 --ignoreexisting --whatif

Release plan for MultiplePackagesTest 5.5.5
Channel: 'Default' (this is the default channel)
  #   Name    Package Name   Version   Source             Version rules
  --- ------- -------------- --------- ------------------ -------------------
  1   Step1   Package1       1.0.1     Latest available   Allow any version
  2   Step2                  1.0.0     User specified     Allow any version

The StepName:PackageVersion format for each step

dotnet octo create-release --project MultiplePackagesTest --package Step1:1.0.0 --package Step2:1.0.0 --version 5.5.5 --ignoreexisting --whatif

Release plan for MultiplePackagesTest 5.5.5
Channel: 'Default' (this is the default channel)
  #   Name    Package Name   Version   Source             Version rules
  --- ------- -------------- --------- ------------------ -------------------
  1   Step1   Package1       1.0.1     Latest available   Allow any version
  2   Step2                  1.0.0     User specified     Allow any version

The *:PackageVersion format

dotnet octo create-release --project MultiplePackagesTest --package *:1.0.0 --version 5.5.5 --ignoreexisting --whatif

Release plan for MultiplePackagesTest 5.5.5
Channel: 'Default' (this is the default channel)
  #   Name    Package Name   Version   Source             Version rules
  --- ------- -------------- --------- ------------------ -------------------
  1   Step1   Package1       1.0.1     Latest available   Allow any version
  2   Step2                  1.0.0     User specified     Allow any version

When I additionally provide a 3-parts package specification (StepName:PackageName:PackageVersion), it works, also with * for step name, for example:

dotnet octo create-release --project MultiplePackagesTest --package Package1:1.0.0 --package *:Package1:1.0.0 --version 5.5.5 --ignoreexisting --whatif

Release plan for MultiplePackagesTest 5.5.5
Channel: 'Default' (this is the default channel)
  #   Name    Package Name   Version   Source           Version rules
  --- ------- -------------- --------- ---------------- -------------------
  1   Step1   Package1       1.0.0     User specified   Allow any version
  2   Step2                  1.0.0     User specified   Allow any version

But according to the documentation, the 2-part package specification should work for script steps as well (the 3-parts version is described as an additional one that can be used). Is this a bug in the octo tool or in the documentation?

I’m using octo version 6.12.0.

(Shannon Lewis) #3

Hi Jakub,

Thanks for getting in touch and sorry you’re hitting this issue. We’ve had a couple of other reports about this but hadn’t gotten to the bottom of what had lead to this behavior until I revisited it today.

There is an existing GitHub issue with some further details, but to answer your question it’s a bug in the documentation if compared to the design and current implementation :slight_smile:

We’ve had a talk within the team though and agree that the current implementation isn’t intuitive to use, it should work like the documentation says. The core part is that at the moment we assume no explicit package reference name equates to meaning the default package (like in your Step2), which is technically correct according to the design but is not intuitive.

We’ll hopefully be looking to see how we can adjust the design/implementation to address this over the next couple of weeks.

Regards
Shannon

(Jakub Januszkiewicz) #4

Hi @Shannon_Lewis,

I’ll be watching the GitHub issue to see how this progresses - thanks for linking it here!

Greetings,
Jakub

(system) closed #6

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