Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 30, 2025

m --stable was returning 8.0.15 when 8.2.1 was available. The implementation incorrectly limited "stable" to X.0 LTS series, ignoring MongoDB's rapid release versions (8.1.x, 8.2.x) which are also production-ready.

Changes

Version detection logic (display_latest_stable_version, display_latest_version):

  • Changed stable to mean "latest without RC/alpha/beta suffix" instead of "latest X.0.z"
  • Extract versions from JSON "version": field only (prevents false matches from URLs)
  • Support MongoDB 10+ with multi-digit major version regex patterns
  • Replace non-portable \d with [0-9] for POSIX compliance

Code cleanup:

  • Remove redundant uniq after sort -u

Results

# Before
$ m --stable
8.0.15

# After  
$ m --stable
8.2.1

$ m --latest
8.2.2-rc0

Series-specific queries unchanged:

$ m --stable 8.0
8.0.15  # Correctly excludes 8.0.16-rc1

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:

  • downloads.mongodb.com
    • Triggering command: curl -sSLf REDACTED -o /tmp/m-test-1761868523457/m/mongosh-2.5.6.tgz (dns block)
    • Triggering command: curl -sSLf REDACTED -o /tmp/m-test-1761868957375/m/mongosh-2.5.9.tgz (dns block)
    • Triggering command: curl -sSLf REDACTED -o /tmp/m-test-1761868957375/m/mongosh-2.5.6.tgz (dns block)

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

Original prompt

This section details on the original issue you should resolve

<issue_title>Incorrect versions identified for m latest and m stable</issue_title>
<issue_description>> By the way, m latest didn't say MongoDB 8.2.2 doesn't exist for Linux x64, and m stable installed MongoDB version 8.0.15, even though version 8.2.1 is available. I would assume that it will install the latest available version, in this case 8.2.1

Originally posted by @sfn101 in #160</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits October 31, 2025 00:03
Co-authored-by: aheckmann <166834+aheckmann@users.noreply.github.com>
Co-authored-by: aheckmann <166834+aheckmann@users.noreply.github.com>
Co-authored-by: aheckmann <166834+aheckmann@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix incorrect versions identified for m latest and m stable Fix: m stable returns latest production version, not just X.0 series Oct 31, 2025
Copilot AI requested a review from aheckmann October 31, 2025 00:19
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.

Incorrect versions identified for m latest and m stable

2 participants