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

Investigate: Why is pending apps plug-in repository failing

    Details

    • Type: Task
    • Status: Merged Needs Testing (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Story Points:
      2
    • Sprint:
      Fall 1, Summer 3, Summer 4, Summer 5, Summer 6, Fall 2, Fall 3, Fall 4, Fall 5, Fall 6, Fall 7, Fall 8, Fall 9, Spring 4

      Description

      The IGB App Store is meant to allow app developers to upload and their submit their IGB app for review by the site maintainers.

      When a user submits an app for review, the site maintainers receive an email notification. This part works great.

      Next, the reviewer of a new app is supposed to test the new app by installing it and running it in the version of IGB that the developer has written their app for.

      To do this, the reviewer opens IGB and does the following steps:

      • Select Tools > App Manager
      • Click Manage Repositories button (top right) to open the Plugin Repositories screen of the Preferences window
      • Checks "Enabled" for the Pending Aps Plugin Repository (It has URL https://apps.bioviz.org/obr/pending_releases)

      One kind of cool thing is that if you visit this URL in your Web browser, the App Store will display a nice page that lets you download and view the "repository.xml" file for the App Store's pending apps end point.

      If you do this, you will observe that there is (as of today) one pending app, an app submitted by Karthik Raveendran - the "Downsampler App" which is currently at version 0.0.0 and is not yet released on the App Store. (That is, it's not available for wider use in the IGB user community.)

      However, the pending apps endpoint is not working as expected! What is supposed to happen is that when the reviewer enables the Pending Apps Plugin Repository, they should see that the App Manager now shows the Pending Apps repository's apps as options for installation. Then, the reviewer should be able to install the App and test it.

      What is happening instead is that if you try to install the app in the usual way, it will appear to be installed in the App Manager but the App will not actually be installed. Instead, an error appears in the IGB Log:

      12:40:23.649 INFO o.l.i.p.manager.AppManagerFxPanel - Installing plugin: Downsampler Filter
      ERROR: Resolver: Install error - Downsampler-Filter
      java.io.IOException: Error accessing https://apps.bioviz.org/installapp/pending_releases/pending_releases/Downsampler-Filter-0.0.0.jar
      at org.apache.felix.bundlerepository.impl.FileUtil.openURL(FileUtil.java:217)
      at org.apache.felix.bundlerepository.impl.FileUtil.openURL(FileUtil.java:199)
      at org.apache.felix.bundlerepository.impl.ResolverImpl.deploy(ResolverImpl.java:575)
      at org.lorainelab.igb.plugin.manager.BundleActionManager.installBundle(BundleActionManager.java:173)
      at org.lorainelab.igb.plugin.manager.BundleActionManager$1.get(BundleActionManager.java:149)
      at org.lorainelab.igb.plugin.manager.BundleActionManager$1.get(BundleActionManager.java:139)
      at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
      at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
      at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
      at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
      at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
      at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
      at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
      Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: https://apps.bioviz.org/installapp/pending_releases/pending_releases/Downsampler-Filter-0.0.0.jar
      at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:2011)
      at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1602)
      at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:223)
      at org.apache.felix.bundlerepository.impl.FileUtil.openURL(FileUtil.java:209)
      ... 12 more

      I logged into the App Store and also looked at the S3 bucket the App Store uses to store pending and released apps. Everything looked fine and correct, so I am not sure what the problem is here.

      For this task, please investigate what is occurring. To start, I would create a simple App that is not already released on App store to submit and use for testing, just to check to see if there was a problem with Karthik Raveendran's app – which I don't think is the case, but this would be a good place to start.

      Just be aware that if you submit a new version of an existing released app, it will not enter a pending status but instead will be released right away. So, to test this issue, you really need an entirely new, unreleased app to use for testing.

        Attachments

          Issue Links

            Activity

            Hide
            ann.loraine Ann Loraine added a comment -

            I have made this new ticket for investigating the App Store problem I mentioned today during the scrum.

            attn: saideepthi jagarapu

            Show
            ann.loraine Ann Loraine added a comment - I have made this new ticket for investigating the App Store problem I mentioned today during the scrum. attn: saideepthi jagarapu
            Hide
            sjagarap saideepthi jagarapu (Inactive) added a comment -

            Noted! Ann Loraine

            Show
            sjagarap saideepthi jagarapu (Inactive) added a comment - Noted! Ann Loraine
            Hide
            ann.loraine Ann Loraine added a comment -

            To accept or "release" a submitted App, an admin user for the App Store (or your local developer instance of app store) must log in.

            To log in as "admin" user, visit your local app store path localhost:8000/admin and log in.

            Then, to view a listing of pending apps, click the person icon (top right) and you should see an option to view pending apps uploaded and submitted by a regular user.

            Show
            ann.loraine Ann Loraine added a comment - To accept or "release" a submitted App, an admin user for the App Store (or your local developer instance of app store) must log in. To log in as "admin" user, visit your local app store path localhost:8000/admin and log in. Then, to view a listing of pending apps, click the person icon (top right) and you should see an option to view pending apps uploaded and submitted by a regular user.
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Hi saideepthi jagarapu! I found another Google Drive page with useful info:

            "End-to-end testing IGB App deployment on IGB App Store"
            https://docs.google.com/document/d/1j_jya5mccXPjSsKiF9OXvojSX3pXcJt_ymhDQ8mVWN0/edit?usp=sharing

            This page gives detailed instructions on how to test an App Store instance. It explains a lot of what you need to know about the app submission and app acceptance process.

            Show
            ann.loraine Ann Loraine added a comment - - edited Hi saideepthi jagarapu ! I found another Google Drive page with useful info: "End-to-end testing IGB App deployment on IGB App Store" https://docs.google.com/document/d/1j_jya5mccXPjSsKiF9OXvojSX3pXcJt_ymhDQ8mVWN0/edit?usp=sharing This page gives detailed instructions on how to test an App Store instance. It explains a lot of what you need to know about the app submission and app acceptance process.
            Hide
            sjagarap saideepthi jagarapu (Inactive) added a comment -

            Thanks Ann Loraine Looking into it !

            Show
            sjagarap saideepthi jagarapu (Inactive) added a comment - Thanks Ann Loraine Looking into it !
            Show
            sjagarap saideepthi jagarapu (Inactive) added a comment - Branch changes: https://bitbucket.org/lorainelab-deepthi/appstore/branch/IGBF-4254 App store local set-up guide: https://docs.google.com/document/d/1_9C03q6TD5wjLqfVLKsuDsIEQ4-qrS0JhONO5VBOwaA
            Hide
            sjagarap saideepthi jagarapu (Inactive) added a comment - - edited

            Ignore above branch changes - Those are resolved before upgrading the python and django versions of appstore.

            Main Issues at code-level

            1. Incorrect URL construction for pending apps:
              To brief:
              The file path for pending apps is being incorrectly constructed with a duplicated "pending_releases" segment.
              correct url should be /media/pending_releases/reads-without-large-gaps-0.0.1.jar
              current url in code /media/pending_releases/pending_releases/reads-without-large-gaps-0.0.1.jar
            2. Same logic for pending and released apps
              To brief:
              While installing Pending and released apps have same logic. However only released apps need and have few methods like download count (ReleaseDownloadsByDate) to display in UI which pending apps do not have causing null pointer exceptions since the related data doesn’t exist when same logic is used.

            Branch changes:
            Currently it has both python upgrade and bug changes.
            https://bitbucket.org/lorainelab-deepthi/appstore/branch/IGBF-4254-upgrade

            Branch changes for this bug are done on top of upgradation changes in my local, once appstore python upgradation PR is completely tested and merged, I can update this branch accordingly with only these changes with single commit on top of them.

            attn: Ann Loraine

            Show
            sjagarap saideepthi jagarapu (Inactive) added a comment - - edited Ignore above branch changes - Those are resolved before upgrading the python and django versions of appstore. Main Issues at code-level Incorrect URL construction for pending apps: To brief: The file path for pending apps is being incorrectly constructed with a duplicated "pending_releases" segment. correct url should be /media/pending_releases/reads-without-large-gaps-0.0.1.jar current url in code /media/pending_releases/pending_releases/reads-without-large-gaps-0.0.1.jar Same logic for pending and released apps To brief: While installing Pending and released apps have same logic. However only released apps need and have few methods like download count (ReleaseDownloadsByDate) to display in UI which pending apps do not have causing null pointer exceptions since the related data doesn’t exist when same logic is used. Branch changes: Currently it has both python upgrade and bug changes. https://bitbucket.org/lorainelab-deepthi/appstore/branch/IGBF-4254-upgrade Branch changes for this bug are done on top of upgradation changes in my local, once appstore python upgradation PR is completely tested and merged, I can update this branch accordingly with only these changes with single commit on top of them. attn: Ann Loraine
            Hide
            ann.loraine Ann Loraine added a comment -

            The upgradation commits are merged into the master branch. Please proceed with the next steps to add the commits that fix the pending apps endpoint to the master branch. Use whatever process seems the best to you saideepthi jagarapu and submit a PR to the team repository accordingly.

            Show
            ann.loraine Ann Loraine added a comment - The upgradation commits are merged into the master branch. Please proceed with the next steps to add the commits that fix the pending apps endpoint to the master branch. Use whatever process seems the best to you saideepthi jagarapu and submit a PR to the team repository accordingly.
            Hide
            sjagarap saideepthi jagarapu (Inactive) added a comment -

            Ann Loraine I have done the bug fix on top of upgradation,
            https://bitbucket.org/lorainelab-deepthi/appstore/branch/IGBF-4254-upgrade?dest=lorainelab%2Fappstore%3Amaster Changes can be found here.
            It is ready for review now.

            Show
            sjagarap saideepthi jagarapu (Inactive) added a comment - Ann Loraine I have done the bug fix on top of upgradation, https://bitbucket.org/lorainelab-deepthi/appstore/branch/IGBF-4254-upgrade?dest=lorainelab%2Fappstore%3Amaster Changes can be found here. It is ready for review now.
            Hide
            ann.loraine Ann Loraine added a comment -

            I have reviewed the code. I don't quite understand the logic, but I do not see any problems. I think it is fine to proceed with a PR and merging the changes into the codebase.

            Please submit PR when ready saideepthi jagarapu.

            Show
            ann.loraine Ann Loraine added a comment - I have reviewed the code. I don't quite understand the logic, but I do not see any problems. I think it is fine to proceed with a PR and merging the changes into the codebase. Please submit PR when ready saideepthi jagarapu .
            Show
            sjagarap saideepthi jagarapu (Inactive) added a comment - PR Changes: https://bitbucket.org/lorainelab-deepthi/appstore/pull-requests/1 Ann Loraine
            Hide
            ann.loraine Ann Loraine added a comment -

            Please check the PR. The current target is "master branch" in your fork, not the team repository. Thus, I cannot merge it.

            Show
            ann.loraine Ann Loraine added a comment - Please check the PR. The current target is "master branch" in your fork, not the team repository. Thus, I cannot merge it.
            Show
            sjagarap saideepthi jagarapu (Inactive) added a comment - Sorry for that, Please review this Ann Loraine https://bitbucket.org/lorainelab/appstore/pull-requests/286
            Hide
            ann.loraine Ann Loraine added a comment -

            PR is merged. Ready for testing.

            Show
            ann.loraine Ann Loraine added a comment - PR is merged. Ready for testing.
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Additional PR is merged. Note this deletes the following code block from obr/repogen.py:

                if state == 'pending':
                    current_resource.set('uri', '/installapp/pending_releases/' + dict_ver.release_file.name)
                else:
            

            Request for saideepthi jagarapu: Please confirm this is what you wanted?

            Show
            ann.loraine Ann Loraine added a comment - - edited Additional PR is merged. Note this deletes the following code block from obr/repogen.py: if state == 'pending': current_resource.set('uri', '/installapp/pending_releases/' + dict_ver.release_file.name) else : Request for saideepthi jagarapu : Please confirm this is what you wanted?
            Hide
            sjagarap saideepthi jagarapu (Inactive) added a comment -

            Yes Ann Loraine, you are right!

            Show
            sjagarap saideepthi jagarapu (Inactive) added a comment - Yes Ann Loraine , you are right!

              People

              • Assignee:
                Unassigned
                Reporter:
                ann.loraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: