Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1296

Handle date based server version in the auto-update framework

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 4.0.0
    • Component/s: Application update

      Description

      The error is not important and the behavior will not change, but it is better to correctly handle date based versions to prevent logs filled with:

      2018-08-06 11:19:48 16441 139733623109440 ERROR    nxdrive.manager    Engine error
      Traceback (most recent call last):
        File "/opt/nuxeo-drive/nxdrive/utils.py", line 243, in version_compare_client
          return cmp(StrictVersion(x), StrictVersion(y))
        File "/usr/lib/python3.6/distutils/version.py", line 40, in __init__
          self.parse(vstring)
        File "/usr/lib/python3.6/distutils/version.py", line 137, in parse
          raise ValueError("invalid version number '%s'" % vstring)
      ValueError: invalid version number '10.3-I20180803_0125'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/opt/nuxeo-drive/nxdrive/manager.py", line 615, in bind_engine
          self, engine_def, binder=binder
        File "/opt/nuxeo-drive/nxdrive/engine/engine.py", line 123, in __init__
          self.bind(binder)
        File "/opt/nuxeo-drive/nxdrive/engine/engine.py", line 741, in bind
          self.init_remote()
        File "/opt/nuxeo-drive/nxdrive/engine/engine.py", line 730, in init_remote
          self.remote = self.filtered_remote_cls(*args, **kwargs)
        File "/opt/nuxeo-drive/nxdrive/client/remote_client.py", line 89, in __init__
          self._has_new_trash_service = not version_le(self.client.server_version, "10.1")
        File "/opt/nuxeo-drive/nxdrive/utils.py", line 255, in version_le
          return version_compare_client(x, y) <= 0
        File "/opt/nuxeo-drive/nxdrive/utils.py", line 245, in version_compare_client
          return version_compare(x, y)
        File "/opt/nuxeo-drive/nxdrive/utils.py", line 224, in version_compare
          x_number = int(x_number.replace("-SNAPSHOT", ""))
      ValueError: invalid literal for int() with base 10: '3-I20180803_0125'
      2018-08-06 11:19:48 16441 139733623109440 ERROR    nxdrive.gui.api    Unexpected error
      Traceback (most recent call last):
        File "/opt/nuxeo-drive/nxdrive/utils.py", line 243, in version_compare_client
          return cmp(StrictVersion(x), StrictVersion(y))
        File "/usr/lib/python3.6/distutils/version.py", line 40, in __init__
          self.parse(vstring)
        File "/usr/lib/python3.6/distutils/version.py", line 137, in parse
          raise ValueError("invalid version number '%s'" % vstring)
      ValueError: invalid version number '10.3-I20180803_0125'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/opt/nuxeo-drive/nxdrive/gui/api.py", line 553, in bind_server
          local_folder, url, username, password, name, **kwargs
        File "/opt/nuxeo-drive/nxdrive/gui/api.py", line 529, in _bind_server
          starts=False,
        File "/opt/nuxeo-drive/nxdrive/manager.py", line 622, in bind_engine
          raise exc
        File "/opt/nuxeo-drive/nxdrive/manager.py", line 615, in bind_engine
          self, engine_def, binder=binder
        File "/opt/nuxeo-drive/nxdrive/engine/engine.py", line 123, in __init__
          self.bind(binder)
        File "/opt/nuxeo-drive/nxdrive/engine/engine.py", line 741, in bind
          self.init_remote()
        File "/opt/nuxeo-drive/nxdrive/engine/engine.py", line 730, in init_remote
          self.remote = self.filtered_remote_cls(*args, **kwargs)
        File "/opt/nuxeo-drive/nxdrive/client/remote_client.py", line 89, in __init__
          self._has_new_trash_service = not version_le(self.client.server_version, "10.1")
        File "/opt/nuxeo-drive/nxdrive/utils.py", line 255, in version_le
          return version_compare_client(x, y) <= 0
        File "/opt/nuxeo-drive/nxdrive/utils.py", line 245, in version_compare_client
          return version_compare(x, y)
        File "/opt/nuxeo-drive/nxdrive/utils.py", line 224, in version_compare
          x_number = int(x_number.replace("-SNAPSHOT", ""))
      ValueError: invalid literal for int() with base 10: '3-I20180803_0125'
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h