Skip to content

[v25.3.x] rpk/connect: don't cap version segments at two digits - #31451

Merged
r-vasquez merged 1 commit into
redpanda-data:v25.3.xfrom
vbotbuildovich:ai-backport-pr-31438-v25.3.x-1785959698
Aug 5, 2026
Merged

[v25.3.x] rpk/connect: don't cap version segments at two digits#31451
r-vasquez merged 1 commit into
redpanda-data:v25.3.xfrom
vbotbuildovich:ai-backport-pr-31438-v25.3.x-1785959698

Conversation

@vbotbuildovich

Copy link
Copy Markdown
Collaborator

Backport of PR #31438

  • Command: git cherry-pick -x 4f03977 7d6f075
  • Commits backported: 2
  • Conflicts resolved: 0
  • Commits skipped (already on target): 1
  • Backport branch: ai-backport-pr-31438-v25.3.x-1785959698

Conflict details

No content conflicts. 4f03977837 auto-merged onto v25.3.x with only
context shifts in src/go/rpk/pkg/cli/connect/install.go and
src/go/rpk/pkg/cli/connect/BUILD.

Skipped commit

  • 7d6f0758de ("Merge remote-tracking branch 'origin/dev' into
    rpk-uncap-plugin-version-segments"): a merge of dev into the PR branch, not
    authored PR content. Its diff against second parent (dev) is exactly the
    three files already delivered by 4f03977837; its diff against first parent
    (the PR commit) is unrelated src/v/cloud_topics/ work picked up from dev.
    Cherry-picking it with -m 1 would have imported that unrelated cloud_topics
    change onto the release branch, so it was skipped. No PR code is dropped: the
    backported tree contains the full change (regex fix, doc comment, new
    install_test.go, and the go_test target in BUILD).

Note on divergence from dev

v25.3.x still has the older connectRepoClient/getPluginURL implementation
in this package, whereas dev has refactored it to plugin.RepoClient. That
refactor is out of scope for this backport and was intentionally not carried
over; the version-validation fix is self-contained in validateVersion and
applies to both shapes unchanged.

Verification not performed

go test ./pkg/cli/connect/ -run TestValidateVersion could not be executed in
the backport sandbox (command not permitted). The new test is carried over
verbatim from the source commit and is expected to pass; CI on the backport PR
will confirm.

Fixes: #31450,

install validated --connect-version against
`^v?\d{1,2}\.\d{1,2}\.\d{1,2}`. The two-digit cap on each segment
rejected every Redpanda Connect release since 4.100.0 before the plugin
manifest was ever consulted.

Segments are now unbounded in width, and the pattern is anchored at both
ends so trailing garbage fails validation up front rather than at
download time. The optional [-+] suffix group preserves prereleases like
4.102.0-rc1, which the previous unanchored pattern accepted and forwarded
to the manifest.

The ai, check and k8s plugin validators carry a copy of the same regex
and are deliberately left untouched here.

Covered by a new TestValidateVersion; the package had no test file
previously.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 4f03977)
@vbotbuildovich vbotbuildovich added this to the v25.3.x-next milestone Aug 5, 2026
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Aug 5, 2026
@vbotbuildovich
vbotbuildovich requested review from a team, kbatuigas and r-vasquez as code owners August 5, 2026 19:56
@r-vasquez
r-vasquez merged commit a2eaaf5 into redpanda-data:v25.3.x Aug 5, 2026
24 checks passed
@tyson-redpanda tyson-redpanda modified the milestones: v25.3.x-next, v25.3.16 Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build area/rpk kind/backport PRs targeting a stable branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants