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

Fix app origin displayed in app manager

    Details

    • Type: Bug
    • Status: To-Do (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Story Points:
      2
    • Sprint:
      Fall 9 : 9 Dec to 20 Dec, Spring 2 : 20 Jan to 31 Jan, Spring 3 : 3 Feb to 14 Feb, Spring 3 : 17 Feb to 28 Feb, Spring 4 : 2 Mar to 13 Mar, Spring 5 : 16 Mar to 27 Mar, Spring 6 : 30 Mar to Apr 10, Spring 7 : 13 Apr to 24 Apr, Spring 8 : 24 Apr to 8 May

      Description

      In App Manager, Apps from https://apps.bioviz.org are being shown as coming from repository named 'local' in the IGB App Manager UI.
      What should happen is that an App Store's name from the Manage Repositories screen should appear in App Manager.
      Investigate why this is happening and propose a fix.

        Attachments

          Activity

          Hide
          ann.loraine Ann Loraine added a comment - - edited

          App Store URL is being hard-coded. Need to find a better solution. Investigate ways we could configure the App Stores and what they are called using the IGB preferences file.

          This will enable organizations to release their own IGB and IGB App Store versions.

          Show
          ann.loraine Ann Loraine added a comment - - edited App Store URL is being hard-coded. Need to find a better solution. Investigate ways we could configure the App Stores and what they are called using the IGB preferences file. This will enable organizations to release their own IGB and IGB App Store versions.
          Show
          noor91zahara Noor Zahara (Inactive) added a comment - Submitted a new PR - https://bitbucket.org/lorainelab/integrated-genome-browser/pull-requests/770/igbf-2208/diff
          Hide
          ann.loraine Ann Loraine added a comment -

          Please submit a new PR.

          Show
          ann.loraine Ann Loraine added a comment - Please submit a new PR.
          Hide
          noor91zahara Noor Zahara (Inactive) added a comment -

          I have squashed the commits into a single one and rebased it with master.

          Show
          noor91zahara Noor Zahara (Inactive) added a comment - I have squashed the commits into a single one and rebased it with master.
          Show
          noor91zahara Noor Zahara (Inactive) added a comment - PR - https://bitbucket.org/lorainelab/integrated-genome-browser/pull-requests/769/igbf-2208/diff
          Hide
          shamika Shamika Gajanan Kulkarni (Inactive) added a comment -

          Reviewed the code and functionality of the ticket. Checked for repository names, even when the domain names are same. Working as expected.
          Kindly submit a PR for the same Noor Zahara

          Show
          shamika Shamika Gajanan Kulkarni (Inactive) added a comment - Reviewed the code and functionality of the ticket. Checked for repository names, even when the domain names are same. Working as expected. Kindly submit a PR for the same Noor Zahara
          Hide
          ann.loraine Ann Loraine added a comment - - edited

          Shamika Gajanan Kulkarni - please do functional review following steps above using installer for topic branch.

          Show
          ann.loraine Ann Loraine added a comment - - edited Shamika Gajanan Kulkarni - please do functional review following steps above using installer for topic branch.
          Hide
          noor91zahara Noor Zahara (Inactive) added a comment - - edited

          Steps to Test -

          1. open Tools -> App Manager -> Manage Repositories
          2. Add a repository url eg - https://dev-appstore-2.bioviz.org/obr/pending_releases/ and click on Done.
          3. View the apps under App Manager.
          4. Observe the Repository Name of each App. It should match the one specified under Manage Repositories - >App Repositories.
          5. Verify the app names when the domain names are the same for instance - https://dev-appstore-2.bioviz.org/obr/pending_releases/ and https://dev-appstore-2.bioviz.org/obr/releases/.

          Note - Can download the installer from downloads section and test the above

          Show
          noor91zahara Noor Zahara (Inactive) added a comment - - edited Steps to Test - 1. open Tools -> App Manager -> Manage Repositories 2. Add a repository url eg - https://dev-appstore-2.bioviz.org/obr/pending_releases/ and click on Done. 3. View the apps under App Manager. 4. Observe the Repository Name of each App. It should match the one specified under Manage Repositories - >App Repositories. 5. Verify the app names when the domain names are the same for instance - https://dev-appstore-2.bioviz.org/obr/pending_releases/ and https://dev-appstore-2.bioviz.org/obr/releases/ . Note - Can download the installer from downloads section and test the above
          Hide
          noor91zahara Noor Zahara (Inactive) added a comment -

          I have handled the edge case pointed out.
          Kindly review.

          Code change = https://bitbucket.org/noorzahara/integrated-genome-browser-local1/branch/IGBF-2208#diff

          Show
          noor91zahara Noor Zahara (Inactive) added a comment - I have handled the edge case pointed out. Kindly review. Code change = https://bitbucket.org/noorzahara/integrated-genome-browser-local1/branch/IGBF-2208#diff
          Hide
          ann.loraine Ann Loraine added a comment -

          Note: I removed the second request from above because you had already answered that question in your code. Sorry for the distraction.

          Show
          ann.loraine Ann Loraine added a comment - Note: I removed the second request from above because you had already answered that question in your code. Sorry for the distraction.
          Hide
          ann.loraine Ann Loraine added a comment - - edited

          A request:

          • Check what happens when two repositories have the same domain, for example: the pending apps endpoint and the released apps endpoint on App Store. I'm not sure if the proposed fix will handle that.
          Show
          ann.loraine Ann Loraine added a comment - - edited A request: Check what happens when two repositories have the same domain, for example: the pending apps endpoint and the released apps endpoint on App Store. I'm not sure if the proposed fix will handle that.
          Hide
          ann.loraine Ann Loraine added a comment -

          Download installer for the topic branch from your fork and check that the names of the repositories are being reported correctly.

          Show
          ann.loraine Ann Loraine added a comment - Download installer for the topic branch from your fork and check that the names of the repositories are being reported correctly.
          Hide
          noor91zahara Noor Zahara (Inactive) added a comment - - edited

          In case the URI domain is different from the OBR index file, then we will have to validate it separately since there is no connection between the two.

          Code change - https://bitbucket.org/noorzahara/integrated-genome-browser-local1/branch/IGBF-2208#diff

          Show
          noor91zahara Noor Zahara (Inactive) added a comment - - edited In case the URI domain is different from the OBR index file, then we will have to validate it separately since there is no connection between the two. Code change - https://bitbucket.org/noorzahara/integrated-genome-browser-local1/branch/IGBF-2208#diff
          Hide
          ann.loraine Ann Loraine added a comment -

          Good work tracking down the root cause.

          I think your proposed solution is fine.

          Question: It will work for all cases where the resource (bundle) URI is a relative URL. However, will it fail when the URI is an absolute URL and points to a different domain from the repository OBR index file? Note that this case does not exist yet. So even if your fix does not correct this potential problem, I don't think it much matters. But it would be worth looking a little deeper to see if there could be an elegant way to handle this other case, as well. Can you investigate further and see what you find?

          Two implementation requests (when you get to this stage):

          • Within the code itself, include the Jira number and title in a comment so that we can easily find this again.
          • In your commit message, also include the Jira number so that we can easily find the commit that fixed the problem.
          Show
          ann.loraine Ann Loraine added a comment - Good work tracking down the root cause. I think your proposed solution is fine. Question: It will work for all cases where the resource (bundle) URI is a relative URL. However, will it fail when the URI is an absolute URL and points to a different domain from the repository OBR index file? Note that this case does not exist yet. So even if your fix does not correct this potential problem, I don't think it much matters. But it would be worth looking a little deeper to see if there could be an elegant way to handle this other case, as well. Can you investigate further and see what you find? Two implementation requests (when you get to this stage): Within the code itself, include the Jira number and title in a comment so that we can easily find this again. In your commit message, also include the Jira number so that we can easily find the commit that fixed the problem.
          Hide
          noor91zahara Noor Zahara (Inactive) added a comment - - edited

          Investigating Results -

          1. It is working fine for bioviz since the repo url https://bioviz.org/igbserver/repository.xml and https://bioviz.org/igbserver/optional/jar_name are matching unlike
          appstore https://dev-appstore-2.bioviz.org/obr/releases and https://dev-appstore-2.bioviz.org/installapp/app_name/releases/version_name/jarname

          The code present in RepositoryInfoManager class -

          getBundlesRepositoryName (...) {
          ......
          if (location.startsWith(repo.getUrl()))

          {....}

          }

          Solution - Instead of comparing location to repo.getUrl(), we can match just the domain names.

          [~aloraine]

          Show
          noor91zahara Noor Zahara (Inactive) added a comment - - edited Investigating Results - 1. It is working fine for bioviz since the repo url https://bioviz.org/igbserver/repository.xml and https://bioviz.org/igbserver/optional/jar_name are matching unlike appstore https://dev-appstore-2.bioviz.org/obr/releases and https://dev-appstore-2.bioviz.org/installapp/app_name/releases/version_name/jarname The code present in RepositoryInfoManager class - getBundlesRepositoryName (...) { ...... if (location.startsWith(repo.getUrl())) {....} } Solution - Instead of comparing location to repo.getUrl(), we can match just the domain names. [~aloraine]
          Hide
          ann.loraine Ann Loraine added a comment -

          Background Info on OBR - read this before starting work:

          Important thing to understand about how all this is working - quoted from above link:

          "For the most part, OBR is quite simple. An OBR "repository server" is not necessary, since all functionality may reside on the client side. OBR is able to provide its functionality by reading an XML-based meta-data file that describes the bundles available to it. The meta-data file essentially contains an XML encoding of the bundles' manifest information. From the meta-data, OBR is able to construct dependency information for deploying (i.e., installing and updating) bundles."

          Show
          ann.loraine Ann Loraine added a comment - Background Info on OBR - read this before starting work: https://felix.apache.org/documentation/subprojects/apache-felix-osgi-bundle-repository.html Important thing to understand about how all this is working - quoted from above link: "For the most part, OBR is quite simple. An OBR "repository server" is not necessary, since all functionality may reside on the client side. OBR is able to provide its functionality by reading an XML-based meta-data file that describes the bundles available to it. The meta-data file essentially contains an XML encoding of the bundles' manifest information. From the meta-data, OBR is able to construct dependency information for deploying (i.e., installing and updating) bundles."
          Hide
          ann.loraine Ann Loraine added a comment -

          What is supposed to happen is that the IGB preferences JSON file determines the name. IGB preferences JSON is under "resources" directory in Preferences module.

          Suggestion:
          Examine repository.xml endpoints https://apps.bioviz.org/obr/releases/ and https://apps.bioviz.org/obr/pending_releases/ and compare to repository.xml in http://bioviz.org/igbserver/
          Maybe there is something about this that is blocking the JSON-assigned name from being shown?

          Show
          ann.loraine Ann Loraine added a comment - What is supposed to happen is that the IGB preferences JSON file determines the name. IGB preferences JSON is under "resources" directory in Preferences module. Suggestion: Examine repository.xml endpoints https://apps.bioviz.org/obr/releases/ and https://apps.bioviz.org/obr/pending_releases/ and compare to repository.xml in http://bioviz.org/igbserver/ Maybe there is something about this that is blocking the JSON-assigned name from being shown?

            People

            • Assignee:
              Unassigned
              Reporter:
              pbadzuh Philip Badzuh (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: