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

Fix the order of the data providers being initialized

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 10.1.0
    • Labels:
      None

      Description

      Fix the order of the data providers being initialized, right now the data providers are not being initialized based on the load priority but based on the order in the igbDefaultPrefs.json file. Change this behavior by sorting the dataProviders list after retrieving them from the json based on the load priority. This ordering is important to implement Ensembl.

        Attachments

          Issue Links

            Activity

            Hide
            ann.loraine Ann Loraine added a comment -

            Note: I am moving this back to "To Do" with hopes that Jaya Sravani Sirigineedi and Nowlan Freese can take a look.

            Show
            ann.loraine Ann Loraine added a comment - Note: I am moving this back to "To Do" with hopes that Jaya Sravani Sirigineedi and Nowlan Freese can take a look.
            Hide
            nfreese Nowlan Freese added a comment - - edited

            Ann Loraine - Sravani's code change should only affect the order in which the data providers are initialized. She added a sort based on load priority to the IgbPreferencesLoadingOrchestrator class.

            OLD: dataProviders.stream().distinct().forEach(dataProvider
            NEW: dataProviders.stream().distinct().sorted(Comparator.comparing(DataProviderConfig::getLoadPriority)).forEach(dataProvider

            The other code changes in the ticket fix an issue where the UCSC REST data provider was being initialized more than once.

            While I did not specifically test the data loading order, based on comments in IGBF-1220, the loading of data by IGB is also done based on a sorting of the load priority, so I don't foresee the code changes in this ticket affecting it. The order of the Quickload folders is also unaffected, both Sravani and I saw that they continue to follow the load priority.

            Note that we need the order of data provider initialization to be sorted so that we can initialize the Ensembl data provider last. This is important as some of the genomes provided by Ensembl are already included in IGB, and we did not want to have the same genome appearing twice.

            Show
            nfreese Nowlan Freese added a comment - - edited Ann Loraine - Sravani's code change should only affect the order in which the data providers are initialized. She added a sort based on load priority to the IgbPreferencesLoadingOrchestrator class. OLD: dataProviders.stream().distinct().forEach(dataProvider NEW: dataProviders.stream().distinct(). sorted(Comparator.comparing(DataProviderConfig::getLoadPriority)) .forEach(dataProvider The other code changes in the ticket fix an issue where the UCSC REST data provider was being initialized more than once. While I did not specifically test the data loading order, based on comments in IGBF-1220 , the loading of data by IGB is also done based on a sorting of the load priority, so I don't foresee the code changes in this ticket affecting it. The order of the Quickload folders is also unaffected, both Sravani and I saw that they continue to follow the load priority. Note that we need the order of data provider initialization to be sorted so that we can initialize the Ensembl data provider last. This is important as some of the genomes provided by Ensembl are already included in IGB, and we did not want to have the same genome appearing twice.
            Hide
            ann.loraine Ann Loraine added a comment -

            Thanks for the explanation Nowlan Freese! I am proceeding to merge the PR.

            Show
            ann.loraine Ann Loraine added a comment - Thanks for the explanation Nowlan Freese ! I am proceeding to merge the PR.
            Hide
            ann.loraine Ann Loraine added a comment -

            PR is merged and new installers built and deployed to bioviz.org early access section.

            Show
            ann.loraine Ann Loraine added a comment - PR is merged and new installers built and deployed to bioviz.org early access section.
            Hide
            nfreese Nowlan Freese added a comment -

            Tested on Linux with main branch installer.

            Data providers are initialized based on their load priority.

            Closing ticket.

            Show
            nfreese Nowlan Freese added a comment - Tested on Linux with main branch installer. Data providers are initialized based on their load priority. Closing ticket.

              People

              • Assignee:
                jsirigin Jaya Sravani Sirigineedi
                Reporter:
                jsirigin Jaya Sravani Sirigineedi
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: