Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 27, 2025

String-based version comparison is unreliable for semantic versions. For example, "v8.5.10" <= "v8.5.3" incorrectly returns true because "1" < "3" lexicographically.

Changes

  • Import @std/semver (already used elsewhere in this repo)
  • Add normalizeVersion() to strip v prefix and -enterprise suffix
  • Add versionGreaterOrEqual() and versionLessThanOrEqual() helper functions
  • Replace all three string comparisons with semver-based comparisons

Example

// Before (buggy)
if (version <= "v8.5.3" && gitRepo === "pingcap/ticdc") { ... }

// After (correct)
if (versionLessThanOrEqual(version, "v8.5.3") && gitRepo === "pingcap/ticdc") { ... }

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

wuhuizuo and others added 4 commits November 27, 2025 15:34
Bump previous/current release to v8.5.3 and v8.5.4 Make
collect-info-for-release-issue.sh executable
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@ti-chi-bot
Copy link

ti-chi-bot bot commented Nov 27, 2025

Hi @Copilot. Thanks for your PR.

I'm waiting for a PingCAP-QE member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Co-authored-by: wuhuizuo <2574558+wuhuizuo@users.noreply.github.com>
@ti-chi-bot
Copy link

ti-chi-bot bot commented Nov 27, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from wuhuizuo. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added size/M and removed size/XS labels Nov 27, 2025
Copy link
Contributor Author

Copilot AI commented Nov 27, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.deno.land
    • Triggering command: /usr/bin/curl curl -s REDACTED (dns block)
  • esm.sh
    • Triggering command: /usr/local/lib/node_modules/deno/deno /usr/local/lib/node_modules/deno/deno check check-images-internal.ts (dns block)
  • jsr.io
    • Triggering command: /usr/local/lib/node_modules/deno/deno /usr/local/lib/node_modules/deno/deno check check-images-internal.ts (dns block)
    • Triggering command: /usr/local/lib/node_modules/deno/deno /usr/local/lib/node_modules/deno/deno run /tmp/semver-test.ts (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update ticdc publishing threshold to v8.5.4 fix: use semantic versioning for version comparisons in check-images-internal.ts Nov 27, 2025
Copilot AI requested a review from wuhuizuo November 27, 2025 07:47
Base automatically changed from fix/update-cdc-release-controlling to main November 27, 2025 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants