Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-58294

[CLI] Versions are compared as strings

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Morpheus
    • master
    • tools
    • None
    • Untriaged
    • 0
    • Unknown

    Description

      Problem

      Node versions are compared as strings (e.g.https://github.com/couchbase/couchbase-cli/blob/32eaa392a47eea421719240432455fa81b1dd7b2/cbmgr.py#L4417C39-L4417C60). This will break when server versions >10 are released e.g. when compared as strings "10.0.0" < "7.6.0". This will lead to the version checks not working.

      Fix

      Don't compare versions as strings. Either convert the version string to a new custom type with custom comparators as soon as the endpoint is called, or create a function that takes 2 version strings and parses out the ints and compares them properly. Or something else.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Nour.Elmenyawi Nour Elmenyawi
              safian.ali Safian Ali
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty