Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-1206

Duplicate QL sites appear in new versions of IGB with changed default QL sites

    Details

    • Story Points:
      4
    • Sprint:
      B - Summer 2018

      Description

      IGB 9.0.1 contains updates to Quickload sites added by default to each session.
      However, if you start 9.0.1 after running 9.0.0, you will see what appear to be duplicate QL sites.

      To repeat:
      1) Start IGB 9.0.0
      2) Select File > Preferences > Data Sources
      3) Observe Quickload data sources loaded from IGB igb_preferences.json:

      • IGB Quickload
      • Pollen
      • Cytokinin
      • Blueberry

      4) Quit
      5) Start IGB 9.0.1
      6) Select File > Preferences > Data Sources
      7) Observe too many QL Data Sources

        Attachments

        1. NotesFromSolving.jpg
          NotesFromSolving.jpg
          2.57 MB
        2. IGB9.0.0.PNG
          IGB9.0.0.PNG
          99 kB
        3. IGB9.0.1.PNG
          IGB9.0.1.PNG
          142 kB
        4. isEditable.docx
          482 kB

          Issue Links

            Activity

            Hide
            mason Mason Meyer (Inactive) added a comment -

            My testing confirms that this story is now resolved. I am not able to reproduce duplication of QL sites when opening 9.0.1 after opening 9.0.0. However, I am able to see duplicate QL sites when running 9.0.0 after 9.0.1, but I am thinking that this is expected, although not ideal. I will run this question by the team to verify that this is expected, but for now, I am marking as closed.

            Show
            mason Mason Meyer (Inactive) added a comment - My testing confirms that this story is now resolved. I am not able to reproduce duplication of QL sites when opening 9.0.1 after opening 9.0.0. However, I am able to see duplicate QL sites when running 9.0.0 after 9.0.1, but I am thinking that this is expected, although not ideal. I will run this question by the team to verify that this is expected, but for now, I am marking as closed.
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment - - edited

            The attached document "isEditable.docx" provides some details about how the isEditable tag is/was used for the Data Sources table, and how the Data Sources table was able to correctly allow editing for user-provided data providers but not allow it for default ones.

            The document can serve as an example of investigating and trouble-shooting code. However, the document says nothing of all the many dead-ends that were ruled out to get to this point.

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - - edited The attached document "isEditable.docx" provides some details about how the isEditable tag is/was used for the Data Sources table, and how the Data Sources table was able to correctly allow editing for user-provided data providers but not allow it for default ones. The document can serve as an example of investigating and trouble-shooting code. However, the document says nothing of all the many dead-ends that were ruled out to get to this point.
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment -

            The migrateOldDataProviders() method was introduced in May 2015 immediately after substantial refactoring about the DataProvider class. It was intended to migrate old dataProviders ("servers") from IGB 8.3 to IGB 8.4.

            This method includes a set of fixed urls that it prevents from transfering.

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - The migrateOldDataProviders() method was introduced in May 2015 immediately after substantial refactoring about the DataProvider class. It was intended to migrate old dataProviders ("servers") from IGB 8.3 to IGB 8.4. This method includes a set of fixed urls that it prevents from transfering.
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment -

            Somehow--some magical how--The table of data providers knows which data providers should be editable, and which should not.

            The table's class assumes that editable is true. So if editable is not set in a data provider, then its assumed to be editable. If it has editable set to false, then it is not editable.
            All data providers were read from the json file have 'false' in the editable field.
            This is the case if the json node has isEditable="false", or isEditable="true", or isEditable is missing. Somehow the DataProviderConfig always gets editable=false, even if the json file says true. I can't find what makes the DataProviderConfig object, or how those objects get put into the ArrayList called dataProviders as a field in the IgbPreferences object.
            I just know that somehow, by the time we call IgbPreferences.getDataProviders(), they all have editable=false, regardless of the isEditable tag in the json file.

            Somehow, the process that reads in default IGB prefs always sets editable to false for the dataProvider, and the data provider table (the gui) assumes things should be editable=true, unless they are false. The user-provided dataProviders have no way to set editable, so ... we get the ideal functionality, so its not broken. So I think its ok to give up on this.

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - Somehow-- some magical how --The table of data providers knows which data providers should be editable, and which should not. The table's class assumes that editable is true. So if editable is not set in a data provider, then its assumed to be editable. If it has editable set to false, then it is not editable. All data providers were read from the json file have 'false' in the editable field. This is the case if the json node has isEditable="false", or isEditable="true", or isEditable is missing. Somehow the DataProviderConfig always gets editable=false, even if the json file says true. I can't find what makes the DataProviderConfig object, or how those objects get put into the ArrayList called dataProviders as a field in the IgbPreferences object. I just know that somehow, by the time we call IgbPreferences.getDataProviders(), they all have editable=false, regardless of the isEditable tag in the json file. Somehow, the process that reads in default IGB prefs always sets editable to false for the dataProvider, and the data provider table (the gui) assumes things should be editable=true, unless they are false. The user-provided dataProviders have no way to set editable, so ... we get the ideal functionality, so its not broken. So I think its ok to give up on this.
            Hide
            djoshi4 Deepti Joshi (Inactive) added a comment -

            Modified the return type of "getDataProviderById" method to BaseDataProvider.

            Fix can be found at:
            https://bitbucket.org/djoshi4/deepti-fork-igb/branch/IGBF-1206_Duplicate_Sites_Issue

            Tested the solution for all cases except the quickloads with username and password. The fix passes all tests.

            Show
            djoshi4 Deepti Joshi (Inactive) added a comment - Modified the return type of "getDataProviderById" method to BaseDataProvider. Fix can be found at: https://bitbucket.org/djoshi4/deepti-fork-igb/branch/IGBF-1206_Duplicate_Sites_Issue Tested the solution for all cases except the quickloads with username and password. The fix passes all tests.
            Hide
            djoshi4 Deepti Joshi (Inactive) added a comment -

            Issue passed first level review.

            Issue was tested with all test cases except testing the quickloads that need username and password.

            Show
            djoshi4 Deepti Joshi (Inactive) added a comment - Issue passed first level review. Issue was tested with all test cases except testing the quickloads that need username and password.
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment -

            We are working on a new fix.
            This branch is one draft of the fix using an id.
            IGBF-1206_draft2
            https://bitbucket.org/IvoryBlak/integrated-genome-browser/branch/IGBF-1206_draft2

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - We are working on a new fix. This branch is one draft of the fix using an id. IGBF-1206 _draft2 https://bitbucket.org/IvoryBlak/integrated-genome-browser/branch/IGBF-1206_draft2
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment -

            After review this fix with Ann, we discovered that it was incomplete. We actually do need to integrate an id component into the default data providers.

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - After review this fix with Ann, we discovered that it was incomplete. We actually do need to integrate an id component into the default data providers.
            Hide
            djoshi4 Deepti Joshi (Inactive) added a comment -

            After Testing: IGB 9.0.1 works as expected (Compare with IGB 9.0.0 image to see changes)

            Show
            djoshi4 Deepti Joshi (Inactive) added a comment - After Testing: IGB 9.0.1 works as expected (Compare with IGB 9.0.0 image to see changes)
            Hide
            djoshi4 Deepti Joshi (Inactive) added a comment -

            After Testing: IGB 9.0.0

            Show
            djoshi4 Deepti Joshi (Inactive) added a comment - After Testing: IGB 9.0.0
            Hide
            djoshi4 Deepti Joshi (Inactive) added a comment -

            First Level Review:

            The issue passes the first level review. IGB 9.0.1 behaves as expected, it removes the duplicates and keeps the user entered URLs having same names as default URLs.

            Show
            djoshi4 Deepti Joshi (Inactive) added a comment - First Level Review: The issue passes the first level review. IGB 9.0.1 behaves as expected, it removes the duplicates and keeps the user entered URLs having same names as default URLs.
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment -

            To see the problem:
            reset prefs > open IGB 9.0.0 > open IGB 9.0.1 > see duplicates

            To test the fix:
            reset prefs > open IGB 9.0.0 > add custom quickload sites > close 9.0.0 > open IGB 9.0.1

            You should see the SoySeq site, but no Pollen or Cytokinin.
            Blueberry should appear exactly once.
            Any custom sites you added should be preserved.

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - To see the problem: reset prefs > open IGB 9.0.0 > open IGB 9.0.1 > see duplicates To test the fix: reset prefs > open IGB 9.0.0 > add custom quickload sites > close 9.0.0 > open IGB 9.0.1 You should see the SoySeq site, but no Pollen or Cytokinin. Blueberry should appear exactly once. Any custom sites you added should be preserved.
            Show
            ieclabau Ivory Blakley (Inactive) added a comment - Please see this branch: https://bitbucket.org/IvoryBlak/integrated-genome-browser/branch/IGBF-1206
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment - - edited

            Resetting preferences removes duplicates.

            reset prefs > open IGB 9.0.0 > no duplicates
            reset prefs > open IGB 9.0.1 > no duplicates

            reset prefs > open IGB 9.0.0 > open IGB 9.0.1 > see duplicates

            Users may notice the duplicates and choose to reset prefs, but that's not ideal AND reseting prefs also looses any non-default quickload sites.

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - - edited Resetting preferences removes duplicates. reset prefs > open IGB 9.0.0 > no duplicates reset prefs > open IGB 9.0.1 > no duplicates reset prefs > open IGB 9.0.0 > open IGB 9.0.1 > see duplicates Users may notice the duplicates and choose to reset prefs, but that's not ideal AND reseting prefs also looses any non-default quickload sites.

              People

              • Assignee:
                mason Mason Meyer (Inactive)
                Reporter:
                ann.loraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: