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

Refetch local configuration on nxdrive_home change

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: NoFixVersionApplicable
    • Fix Version/s: 5.2.0
    • Component/s: Configuration

      Description

      Problem

      Content of $HOME/.nuxeo-drive/config.ini (1):

      [DEFAULT]
      env = oauth
      [oauth]
      nxdrive_home = /users/tiger-222/desktop/alternate-home
      

      Content of /users/tiger-222/desktop/alternate-home/config.ini (2):

      [DEFAULT]
      env = features
      
      [features]
      feature_synchronization = True
      

      When Drive starts, it will check the (1) config file and see that another nxdrive_home folder should be used. The change is applied directly.

      Then the user will be surprised because the synchronization will not be enabled. One will try to re-enable the feature and restart Drive. Same results.

      Analysis

      When saving features states, save_config() will use the path returned by get_config_path() and it is Options.nxdrive_home / "config.ini". So the config file is written to (2), and this is the exected behavior.

      Fix

      When nxdrive_home is changed, we should also fecth the eventual config.ini from the new folder to update options.

      To prevent circular issues (when the new config file also set nxdrive_home, which would be crazy though) we will only fetch config file when nxdrive_home changes 1 time.

        Attachments

          Issue Links

            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, 30 minutes
                  1h 30m

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.