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

Create a REST service to manage the app lifecycle

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Story Points:
      3
    • Sprint:
      Spring 2019 Sprint 3, Spring 2019 Sprint 4, Spring 2019 Sprint 5, Spring 2019 Sprint 6, Summer 2019 Sprint 7

      Description

      The format of the request should be as follows:-
      Request type : POST
      Request URL : http://<host:port>/manageApp
      Request body :

      { "symbolicName" : "ProtAnnot", "action" : "install / update / uninstall / getInfo" }

      Response body :

      { "status" : "installed / updated / uninstalled / not found", "version" : "<app version>", "symbolicName" : "<one in request param>", "igbVersion" : "<Current version of IGB>" }

        Attachments

        1. getInfo.PNG
          getInfo.PNG
          41 kB
        2. IGBF-1624_Test_document.xlsx
          11 kB
        3. Install_success.PNG
          Install_success.PNG
          86 kB
        4. no_app_found.PNG
          no_app_found.PNG
          38 kB
        5. uninstall_success.PNG
          uninstall_success.PNG
          245 kB
        6. unknown_action.PNG
          unknown_action.PNG
          37 kB
        7. update_success.PNG
          update_success.PNG
          110 kB

          Issue Links

            Activity

            rpatil14 Riddhi Jagdish Patil (Inactive) created issue -
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Field Original Value New Value
            Description The format of the request should be as follows:-
            Request type : POST
            Request URL : http://&lt;host:port&gt;/manageApp
            Request body :
            {
            "symbolicName" : "ProtAnnot",
            "obrURL" : " < Repository url >" ,
            "action" : "install / update / uninstall / getInfo"
            }
            Response body :
            {
            "status" : "installed / updated / uninstalled / not found",
            "version" : "<app version>",
            "symbolicName" : "<one in request param>",
            "obrURL" : "<one in request param>"
            }


            The format of the request should be as follows:-
            Request type : POST
            Request URL : http://&lt;host:port&gt;/manageApp
            Request body :
            {
            "symbolicName" : "ProtAnnot", \n
            "obrURL" : " < Repository url >" ,
            "action" : "install / update / uninstall / getInfo"
            }
            Response body :
            {
            "status" : "installed / updated / uninstalled / not found",
            "version" : "<app version>",
            "symbolicName" : "<one in request param>",
            "obrURL" : "<one in request param>"
            }


            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Description The format of the request should be as follows:-
            Request type : POST
            Request URL : http://&lt;host:port&gt;/manageApp
            Request body :
            {
            "symbolicName" : "ProtAnnot", \n
            "obrURL" : " < Repository url >" ,
            "action" : "install / update / uninstall / getInfo"
            }
            Response body :
            {
            "status" : "installed / updated / uninstalled / not found",
            "version" : "<app version>",
            "symbolicName" : "<one in request param>",
            "obrURL" : "<one in request param>"
            }


            The format of the request should be as follows:-
            Request type : POST
            Request URL : http://&lt;host:port&gt;/manageApp
            Request body :
            {
            "symbolicName" : "ProtAnnot",
            "obrURL" : " < Repository url >" ,
            "action" : "install / update / uninstall / getInfo"
            }
            Response body :
            {
            "status" : "installed / updated / uninstalled / not found",
            "version" : "<app version>",
            "symbolicName" : "<one in request param>",
            "obrURL" : "<one in request param>"
            }


            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Sprint Spring 2019 Sprint 3 [ 61 ]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Link This issue relates to IGBF-1607 [ IGBF-1607 ]
            Hide
            rpatil14 Riddhi Jagdish Patil (Inactive) added a comment -

            Committed first draft of code on my fork.
            https://bitbucket.org/rpatil14/riddhifork-igb/commits/d428f322450564d1e4a85457bf7ddc250b1c33da
            I will be now testing the entire flow and fix issues if any
            [~aloraine]

            Show
            rpatil14 Riddhi Jagdish Patil (Inactive) added a comment - Committed first draft of code on my fork. https://bitbucket.org/rpatil14/riddhifork-igb/commits/d428f322450564d1e4a85457bf7ddc250b1c33da I will be now testing the entire flow and fix issues if any [~aloraine]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Description The format of the request should be as follows:-
            Request type : POST
            Request URL : http://&lt;host:port&gt;/manageApp
            Request body :
            {
            "symbolicName" : "ProtAnnot",
            "obrURL" : " < Repository url >" ,
            "action" : "install / update / uninstall / getInfo"
            }
            Response body :
            {
            "status" : "installed / updated / uninstalled / not found",
            "version" : "<app version>",
            "symbolicName" : "<one in request param>",
            "obrURL" : "<one in request param>"
            }


            The format of the request should be as follows:-
            Request type : POST
            Request URL : http://&lt;host:port&gt;/manageApp
            Request body :
            {
            "symbolicName" : "ProtAnnot",
            "action" : "install / update / uninstall / getInfo"
            }
            Response body :
            {
            "status" : "installed / updated / uninstalled / not found",
            "version" : "<app version>",
            "symbolicName" : "<one in request param>"
            }


            Hide
            rpatil14 Riddhi Jagdish Patil (Inactive) added a comment -

            Issue:- To create a REST service to manage the app lifecycle.

            Files changed:-
            main/pom.xml
            plugins/AppStore/pom.xml
            plugins/plugin-manager/pom.xml
            plugins/AppStore/src/main/java/org/lorainelab/igb/appstore/IgbAppServer.java
            plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/BundleActionManager.java
            plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/service/PluginManagerService.java
            plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/service/impl/PluginManagerServiceImpl.java

            Testing scenarios:-
            Please find the attached IGBF-1624_Test_document.xlsx

            Code changes:-
            https://bitbucket.org/rpatil14/riddhifork-igb/branch/IGBF-1624-rest#diff
            cc. [~aloraine]

            Show
            rpatil14 Riddhi Jagdish Patil (Inactive) added a comment - Issue:- To create a REST service to manage the app lifecycle. Files changed:- main/pom.xml plugins/AppStore/pom.xml plugins/plugin-manager/pom.xml plugins/AppStore/src/main/java/org/lorainelab/igb/appstore/IgbAppServer.java plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/BundleActionManager.java plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/service/PluginManagerService.java plugins/plugin-manager/src/main/java/org/lorainelab/igb/plugin/manager/service/impl/PluginManagerServiceImpl.java Testing scenarios:- Please find the attached IGBF-1624 _Test_document.xlsx Code changes:- https://bitbucket.org/rpatil14/riddhifork-igb/branch/IGBF-1624-rest#diff cc. [~aloraine]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Attachment IGBF-1624_Test_document.xlsx [ 14288 ]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Attachment Install_success.PNG [ 14289 ]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Attachment update_success.PNG [ 14290 ]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Attachment uninstall_success.PNG [ 14291 ]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Attachment getInfo.PNG [ 14292 ]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Attachment unknown_action.PNG [ 14293 ]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Attachment no_app_found.PNG [ 14294 ]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Assignee Riddhi Jagdish Patil [ rpatil14 ]
            ann.loraine Ann Loraine made changes -
            Sprint Spring 2019 Sprint 3 [ 61 ] Spring 2019 Sprint 3, Spring 2019 Sprint 4 [ 61, 62 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            ann.loraine Ann Loraine made changes -
            Story Points 3
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Link This issue relates to IGBF-1609 [ IGBF-1609 ]
            Hide
            rpatil14 Riddhi Jagdish Patil (Inactive) added a comment -

            Added code changes to add IGB version to response for Manage App request from App Store.
            cc.[~aloraine]

            Show
            rpatil14 Riddhi Jagdish Patil (Inactive) added a comment - Added code changes to add IGB version to response for Manage App request from App Store. cc. [~aloraine]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Description The format of the request should be as follows:-
            Request type : POST
            Request URL : http://&lt;host:port&gt;/manageApp
            Request body :
            {
            "symbolicName" : "ProtAnnot",
            "action" : "install / update / uninstall / getInfo"
            }
            Response body :
            {
            "status" : "installed / updated / uninstalled / not found",
            "version" : "<app version>",
            "symbolicName" : "<one in request param>"
            }


            The format of the request should be as follows:-
            Request type : POST
            Request URL : http://&lt;host:port&gt;/manageApp
            Request body :
            {
            "symbolicName" : "ProtAnnot",
            "action" : "install / update / uninstall / getInfo"
            }
            Response body :
            {
            "status" : "installed / updated / uninstalled / not found",
            "version" : "<app version>",
            "symbolicName" : "<one in request param>",
            "igbVersion" : "<Current version of IGB>"
            }


            ann.loraine Ann Loraine made changes -
            Sprint Spring 2019 Sprint 3, Spring 2019 Sprint 4 [ 61, 62 ] Spring 2019 Sprint 3, Spring 2019 Sprint 4, Spring 2019 Sprint 5 [ 61, 62, 63 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            ann.loraine Ann Loraine made changes -
            Status Needs 1st Level Review [ 10005 ] Reviewing [ 10301 ]
            ann.loraine Ann Loraine made changes -
            Assignee Ann Loraine [ aloraine ]
            Hide
            ann.loraine Ann Loraine added a comment -

            I'm not sure why, but it looks like the build is failing both for this branch and master branch. I suspect the problem is just a configuration issue. But I'd like to get an installer built for your branch so that we can test it before merging into master.

            Show
            ann.loraine Ann Loraine added a comment - I'm not sure why, but it looks like the build is failing both for this branch and master branch. I suspect the problem is just a configuration issue. But I'd like to get an installer built for your branch so that we can test it before merging into master.
            Hide
            ann.loraine Ann Loraine added a comment -

            Build is failing because nexus repository is off-line. Nothing is wrong with your code.

            Show
            ann.loraine Ann Loraine added a comment - Build is failing because nexus repository is off-line. Nothing is wrong with your code.
            Hide
            ann.loraine Ann Loraine added a comment -

            https://nexus.bioviz.org is back on-line. Your branch should now build.

            Show
            ann.loraine Ann Loraine added a comment - https://nexus.bioviz.org is back on-line. Your branch should now build.
            Hide
            ann.loraine Ann Loraine added a comment -

            Riddhi and I discussed (in person) some requested improvements.

            Main request:

            • please Implement different way for PluginManagerServiceImpl to obtain IGB version string, instead of reading a file in "core" bundle in the constructor. We need a service that reports IGB's version.

            To-Do: Look at how "About IGB" menu is working. Is it reading this same file? If yes, probably this is a good time to implement a "getIgbVersion" service of some type.

            Suggestion: Do Bundles have a getVersion method? The OSGi runtime needs access to bundle version strings. Maybe what we need is already impelmented.

            Next steps:

            Riddhi mentioned she would like to work on this branch further before merging it into master. Moving this back to To-Do and re-assigning to RP.

            Show
            ann.loraine Ann Loraine added a comment - Riddhi and I discussed (in person) some requested improvements. Main request: please Implement different way for PluginManagerServiceImpl to obtain IGB version string, instead of reading a file in "core" bundle in the constructor. We need a service that reports IGB's version. To-Do: Look at how "About IGB" menu is working. Is it reading this same file? If yes, probably this is a good time to implement a "getIgbVersion" service of some type. Suggestion: Do Bundles have a getVersion method? The OSGi runtime needs access to bundle version strings. Maybe what we need is already impelmented. Next steps: Riddhi mentioned she would like to work on this branch further before merging it into master. Moving this back to To-Do and re-assigning to RP.
            ann.loraine Ann Loraine made changes -
            Status Reviewing [ 10301 ] Open [ 1 ]
            ann.loraine Ann Loraine made changes -
            Assignee Ann Loraine [ aloraine ] Riddhi Jagdish Patil [ rpatil14 ]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            ann.loraine Ann Loraine made changes -
            Sprint Spring 2019 Sprint 3, Spring 2019 Sprint 4, Spring 2019 Sprint 5 [ 61, 62, 63 ] Spring 2019 Sprint 3, Spring 2019 Sprint 4, Spring 2019 Sprint 5, Spring 2019 Sprint 6 [ 61, 62, 63, 64 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            Hide
            ann.loraine Ann Loraine added a comment -

            Working on resolving OSGi wiring problem:

            13:07:30.359 INFO o.l.igb.appstore.IgbAppServer - contextRoot: manageApp
            Exception in thread "NanoHttpd Request Processor (#1)" 13:07:30.379 INFO o.l.igb.appstore.IgbAppServer - contextRoot: manageApp
            java.lang.LinkageError: loader constraint violation: when resolving interface method "org.lorainelab.igb.plugin.manager.service.PluginManagerService.manageApp(Lcom/google/gson/JsonObject;)Lfi/iki/elonen/NanoHTTPD$Response;" the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) of the current class, org/lorainelab/igb/appstore/IgbAppServer, and the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) for the method's defining class, org/lorainelab/igb/plugin/manager/service/PluginManagerService, have different Class objects for the type com/google/gson/JsonObject used in the signature
            at org.lorainelab.igb.appstore.IgbAppServer.manageApp(IgbAppServer.java:123)
            at org.lorainelab.igb.appstore.IgbAppServer.processRequest(IgbAppServer.java:94)
            at org.lorainelab.igb.appstore.IgbAppServer.serve(IgbAppServer.java:64)
            at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:904)
            at fi.iki.elonen.NanoHTTPD$1$1.run(NanoHTTPD.java:188)
            at java.lang.Thread.run(Thread.java:748)
            Exception in thread "NanoHttpd Request Processor (#2)" java.lang.LinkageError: loader constraint violation: when resolving interface method "org.lorainelab.igb.plugin.manager.service.PluginManagerService.manageApp(Lcom/google/gson/JsonObject;)Lfi/iki/elonen/NanoHTTPD$Response;" the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) of the current class, org/lorainelab/igb/appstore/IgbAppServer, and the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) for the method's defining class, org/lorainelab/igb/plugin/manager/service/PluginManagerService, have different Class objects for the type com/google/gson/JsonObject used in the signature
            at org.lorainelab.igb.appstore.IgbAppServer.manageApp(IgbAppServer.java:123)
            at org.lorainelab.igb.appstore.IgbAppServer.processRequest(IgbAppServer.java:94)
            at org.lorainelab.igb.appstore.IgbAppServer.serve(IgbAppServer.java:64)
            at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:904)
            at fi.iki.elonen.NanoHTTPD$1$1.run(NanoHTTPD.java:188)
            at java.lang.Thread.run(Thread.java:748)

            Show
            ann.loraine Ann Loraine added a comment - Working on resolving OSGi wiring problem: 13:07:30.359 INFO o.l.igb.appstore.IgbAppServer - contextRoot: manageApp Exception in thread "NanoHttpd Request Processor (#1)" 13:07:30.379 INFO o.l.igb.appstore.IgbAppServer - contextRoot: manageApp java.lang.LinkageError: loader constraint violation: when resolving interface method "org.lorainelab.igb.plugin.manager.service.PluginManagerService.manageApp(Lcom/google/gson/JsonObject;)Lfi/iki/elonen/NanoHTTPD$Response;" the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) of the current class, org/lorainelab/igb/appstore/IgbAppServer, and the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) for the method's defining class, org/lorainelab/igb/plugin/manager/service/PluginManagerService, have different Class objects for the type com/google/gson/JsonObject used in the signature at org.lorainelab.igb.appstore.IgbAppServer.manageApp(IgbAppServer.java:123) at org.lorainelab.igb.appstore.IgbAppServer.processRequest(IgbAppServer.java:94) at org.lorainelab.igb.appstore.IgbAppServer.serve(IgbAppServer.java:64) at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:904) at fi.iki.elonen.NanoHTTPD$1$1.run(NanoHTTPD.java:188) at java.lang.Thread.run(Thread.java:748) Exception in thread "NanoHttpd Request Processor (#2)" java.lang.LinkageError: loader constraint violation: when resolving interface method "org.lorainelab.igb.plugin.manager.service.PluginManagerService.manageApp(Lcom/google/gson/JsonObject;)Lfi/iki/elonen/NanoHTTPD$Response;" the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) of the current class, org/lorainelab/igb/appstore/IgbAppServer, and the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) for the method's defining class, org/lorainelab/igb/plugin/manager/service/PluginManagerService, have different Class objects for the type com/google/gson/JsonObject used in the signature at org.lorainelab.igb.appstore.IgbAppServer.manageApp(IgbAppServer.java:123) at org.lorainelab.igb.appstore.IgbAppServer.processRequest(IgbAppServer.java:94) at org.lorainelab.igb.appstore.IgbAppServer.serve(IgbAppServer.java:64) at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:904) at fi.iki.elonen.NanoHTTPD$1$1.run(NanoHTTPD.java:188) at java.lang.Thread.run(Thread.java:748)
            ann.loraine Ann Loraine made changes -
            Status In Progress [ 3 ] Needs Testing [ 10002 ]
            Hide
            ann.loraine Ann Loraine added a comment -

            Made changes to pom.xml files to obtain gson and NanoHTTPD libraries from shared-lib-wrapper.
            Re-based Riddhi's branch onto latest master, pushed Riddhi's re-based branch to alorainefork, and merged pull request from there into lorainelab/master.
            Installers are now available for testing at https://bitbucket.org/lorainelab/integrated-genome-browser/downloads/.

            To test:

            • Download and install master branch IGB
            • Launch master branch IGB version
            • Visit testappstore.bioviz.org
            • Click on an App page
            • Observe "install" button
            • Click "install" to install the App
            • Observe that the App is now installed into IGB
            Show
            ann.loraine Ann Loraine added a comment - Made changes to pom.xml files to obtain gson and NanoHTTPD libraries from shared-lib-wrapper. Re-based Riddhi's branch onto latest master, pushed Riddhi's re-based branch to alorainefork, and merged pull request from there into lorainelab/master. Installers are now available for testing at https://bitbucket.org/lorainelab/integrated-genome-browser/downloads/ . To test: Download and install master branch IGB Launch master branch IGB version Visit testappstore.bioviz.org Click on an App page Observe "install" button Click "install" to install the App Observe that the App is now installed into IGB
            ann.loraine Ann Loraine made changes -
            Assignee Riddhi Jagdish Patil [ rpatil14 ]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Link This issue relates to IGBF-1711 [ IGBF-1711 ]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Assignee Riddhi Jagdish Patil [ rpatil14 ]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Story Points 3 1
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Story Points 1 3
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Assignee Riddhi Jagdish Patil [ rpatil14 ]
            rpatil14 Riddhi Jagdish Patil (Inactive) made changes -
            Link This issue relates to IGBF-1704 [ IGBF-1704 ]
            ann.loraine Ann Loraine made changes -
            Epic Link IGBF-1388 [ 17463 ]
            ann.loraine Ann Loraine made changes -
            Sprint Spring 2019 Sprint 3, Spring 2019 Sprint 4, Spring 2019 Sprint 5, Spring 2019 Sprint 6 [ 61, 62, 63, 64 ] Spring 2019 Sprint 3, Spring 2019 Sprint 4, Spring 2019 Sprint 5, Spring 2019 Sprint 6, Summer 2019 Sprint 7 [ 61, 62, 63, 64, 66 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            sameer Sameer Shanbhag (Inactive) made changes -
            Assignee Sameer Shanbhag [ sameer ]
            Hide
            sameer Sameer Shanbhag (Inactive) added a comment -

            Downloaded the Latest Build.

            Case:
            install the App from Biowiz (Test App Store).

            Observation:
            It is perfectly getting installed and is showing up on the IGB Desktop application.

            Will mark this as Complete.

            Show
            sameer Sameer Shanbhag (Inactive) added a comment - Downloaded the Latest Build. Case: install the App from Biowiz (Test App Store). Observation: It is perfectly getting installed and is showing up on the IGB Desktop application. Will mark this as Complete.
            sameer Sameer Shanbhag (Inactive) made changes -
            Assignee Sameer Shanbhag [ sameer ] Riddhi Jagdish Patil [ rpatil14 ]
            sameer Sameer Shanbhag (Inactive) made changes -
            Resolution Done [ 10000 ]
            Status Needs Testing [ 10002 ] Closed [ 6 ]
            ann.loraine Ann Loraine made changes -
            Workflow Loraine Lab Workflow [ 18345 ] Fall 2019 Workflow Update [ 20075 ]
            ann.loraine Ann Loraine made changes -
            Workflow Fall 2019 Workflow Update [ 20075 ] Revised Fall 2019 Workflow Update [ 22209 ]

              People

              • Assignee:
                rpatil14 Riddhi Jagdish Patil (Inactive)
                Reporter:
                rpatil14 Riddhi Jagdish Patil (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: