Force package version not available on git connected projects

If I understood correctly for those projects rule-test executed without preReleaseTag, comparing to other projects where it is executed with preReleaseTag. I select package version like “1.30.0-net6.66163” rule-test executed without preReleaseTag, payload looks like this: {“version”:“1.30.0-net6.66163”,“feedType”:“BuiltIn”} and returns response

  "Errors": [],
  "SatisfiesVersionRange": true,
  "SatisfiesPreReleaseTag": true
}

If I call

https://octopus.nikohealth.com/api/channels/rule-test

directly through swagger interface with just feedType and version I got response back:

{
  "Errors": [],
  "SatisfiesVersionRange": true,
  "SatisfiesPreReleaseTag": true
}

If I additionally specify channel version rule as preReleaseTag

curl -X 'POST' \
  'https://octopus.nikohealth.com/api/channels/rule-test?feedType=BuiltIn&preReleaseTag=%5E%24%7C%5Ebeta%5C.%5Cd%2B%24&version=1.30.0-net6.66163'

then I get

{
  "Errors": [],
  "SatisfiesVersionRange": true,
  "SatisfiesPreReleaseTag": false
}

Have no idea why for those projects having issue preReleaseTag not added

I also noticed that preReleaseTag not included into

https://octopus.nikohealth.com/api/Spaces-2/feeds/Feeds-1/packages/versions

call when select package version on projects with issues, on other project preReleaseTag is included.

Hi @nkomlichenko,

The previous screenshot shows that you were using the CI channel, which even if it has the same rule, the JSON could be corrupted in some other way. I’ve confirmed the JSON all looks correct for the Hotfix channel but I haven’t seen that it’s being used when creating the release:

Could you please confirm if you get the same behaviour when using the Hotfix channel when creating the release or send through the JSON for the CI channel?

The only way I’ve been able to replicate the behaviour you are seeing is if I select a channel that hasn’t had any rules configured, where it will use the complete package version for the rule-test without a preReleaseTag as since there isn’t a rule it doesn’t need to know about the pre-release tag.

Test Channel:

Test Channel rule-test Response:
{"version":"1.0.0.0-net6.0.1","preReleaseTag":"^$|^beta\\.\\d+$","feedType":"BuiltIn"}

Default Channel:

Default Channel rule-test Response:
{"version":"1.0.0.0-net6.0.1","feedType":"BuiltIn"}

Feel free to reach out with any questions at all!

Best Regards,

well I wouldn’t provide all details above if it was working fine for hotfix channel. I mentioned at the beginning that it is not working on 2 projects which was switched to git support. On any channel with preReleaseTag. I am attaching recording below so you can see. Don’t know what else I can provide, I guess the only option to switch back to not using git, looks like it is not yet ready.

Is any other information required? Can I connect remotely with you team members to show it live ? Let me know. As octopus customer I don’t really like “we cannot reproduce” response.
Thank you!

Hi @nkomlichenko,

Cheers for that video, that showed the issue clearly and I’ve finally managed to reproduce it!

It seems that for Version Controlled Projects, the Channel Package Version Rules isn’t updated when a Step is renamed.

For non-Version Controlled Projects, this value is updated automatically so I’ve raised a bug for this to be added for Git based projects also: CaC - Channel Package Version Rules Aren't Updated When Referenced Step Name Modified · Issue #8162 · OctopusDeploy/Issues · GitHub

In your case it looks like the Channel Package Version Rule is referencing Steps “db” and “api” however based on the Release Creation page, those steps are actually called “DB” and “API”:

Are you able to add the uppercase step names to the Channel’s Package Version Rule? That should resolve the issue but let me know if you run into any issues or have any questions at all!

Best Regards,

Sorry was out on holidays for few days.
It is working!!! I just re-add steps to version rule and see both “force version selection” check and “only this channel” checkbox during package selection.
Thanks for your help and time spent to find it, you saved lots of time we spend for using cli as workaround.

1 Like

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