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

Fix variable referenced before assignment in the RemoteWatcher

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0.4
    • Fix Version/s: 4.1.1
    • Component/s: Remote watcher
    • Epic Link:
    • Tags:
    • Sprint:
      nxDrive 11.1.5, nxDrive 11.1.6
    • Story Points:
      1

      Description

      The test_collection_synchronization test has shown this issue:

      UnboundLocalError: local variable 'child_pair' referenced before assignment
        File "nxdrive/engine/watcher/remote_watcher.py", line 587, in _handle_changes
          self._partial_full_scan(remote_ref)
        File "nxdrive/engine/watcher/remote_watcher.py", line 551, in _partial_full_scan
          self._scan_pair(path)
        File "nxdrive/engine/watcher/remote_watcher.py", line 138, in _scan_pair
          self._do_scan_remote(doc_pair, child_info)
        File "nxdrive/engine/watcher/remote_watcher.py", line 199, in _do_scan_remote
          doc_pair, remote_info, force_recursion=force_recursion
        File "nxdrive/engine/watcher/remote_watcher.py", line 382, in _scan_remote_recursive
          to_scan.append((child_pair, child_info))
      

      We should fix it and, possibily, add a test case to trigger the error.

      See https://sentry.io/organizations/nuxeo/issues/910538345/

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 5 hours
                5h