Skip to content

Add VersioningStrategy and VersionTagRegex to ChannelRule and SearchPackageVersionsQuery#421

Merged
NickJosevski merged 1 commit into
mainfrom
nj/non-semver-ordering
Jul 15, 2026
Merged

Add VersioningStrategy and VersionTagRegex to ChannelRule and SearchPackageVersionsQuery#421
NickJosevski merged 1 commit into
mainfrom
nj/non-semver-ordering

Conversation

@NickJosevski

Copy link
Copy Markdown
Contributor

Summary

Additive changes to support the MostRecentlyPublished package ordering strategy being introduced in Octopus Server (server PR #43750).

pkg/channels/channel_rule.go

  • VersioningStrategy string"MostRecentlyPublished" uses publish date ordering instead of SemVer comparison; unset/"SemVer" preserves existing behaviour
  • VersionTagRegex string — regex matched against the full version/tag string, used with MostRecentlyPublished as an alternative to VersionRange + Tag

pkg/feeds/search_package_versions_query.go

  • VersioningStrategy stringuri:"versioningStrategy,omitempty" query param for /feeds/{id}/packages
  • VersionTagRegex stringuri:"versionTagRegex,omitempty" query param

Both changes are purely additive — no existing fields, behaviour, or tests are changed. The CLI (OctopusDeploy/cli) will consume these new fields in a follow-up PR to correctly handle MostRecentlyPublished channels during release create.

Test plan

  • go build ./... clean
  • go test ./pkg/channels/... ./pkg/feeds/... pass

…ackageVersionsQuery

ChannelRule gains two new optional fields to support the MostRecentlyPublished
ordering strategy introduced in Octopus Server:

- VersioningStrategy: "MostRecentlyPublished" orders packages by publish date
  instead of SemVer comparison; unset or "SemVer" preserves existing behaviour
- VersionTagRegex: regex matched against the full version/tag string, used with
  MostRecentlyPublished as an alternative to VersionRange + Tag

SearchPackageVersionsQuery gains the corresponding query parameters:
- versioningStrategy: passed to the /feeds/{id}/packages endpoint
- versionTagRegex: regex filter on the full version string

Both changes are purely additive — existing fields and behaviour are unchanged.
@NickJosevski
NickJosevski merged commit 7fd7f1d into main Jul 15, 2026
6 checks passed
@NickJosevski
NickJosevski deleted the nj/non-semver-ordering branch July 15, 2026 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants