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

Investigate and fix errors in functionality of Get Average Score App

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Story Points:
      2
    • Sprint:
      Fall 4 : 30 Sep to 11 Oct, Fall 5 : 14 Oct to 25 Oct, Fall 6 : 28 Oct to 8 Nov

      Description

      Recently, the Get Average Score app was updated to include .gitignore and repository.xml in the jar and .gitignore. When installed on IGB, the menu entry for Get Average Score is not appearing under the Tools menu, thus hampering the functionality of the App. Prior to these changes, the app was working fine. So, we need to investigate the reason and fix this issue. I am attaching screenshots for reference to understand the bug.

        Attachments

          Issue Links

            Activity

            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment -

            I have created the following two forks of the IGP App Get Average Score repository. Fork A does not include obr file in the jar, while Fork B includes it. Also, Fork A works as per required, but Fork B has the issue mentioned in the description.
            Fork A:
            https://bitbucket.org/skulka2710/get-average-score-fork-a/src/master/
            Fork B:
            https://bitbucket.org/skulka2710/get-average-score-fork-b/src/master/

            To reproduce the issue:
            1) Start IGB. Add the downloads URL for each of the above forks as a new repository in App manager.
            2) Install the app.
            3) Observe that the app installed using Fork A downloads URL has a menu entry for "Get Average Score" under the "Tools" menu, while the one installed using Fork B downloads URL does not.

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - I have created the following two forks of the IGP App Get Average Score repository. Fork A does not include obr file in the jar, while Fork B includes it. Also, Fork A works as per required, but Fork B has the issue mentioned in the description. Fork A: https://bitbucket.org/skulka2710/get-average-score-fork-a/src/master/ Fork B: https://bitbucket.org/skulka2710/get-average-score-fork-b/src/master/ To reproduce the issue: 1) Start IGB. Add the downloads URL for each of the above forks as a new repository in App manager. 2) Install the app. 3) Observe that the app installed using Fork A downloads URL has a menu entry for "Get Average Score" under the "Tools" menu, while the one installed using Fork B downloads URL does not.
            Hide
            ann.loraine Ann Loraine added a comment -

            Notes:

            • Downloaded repository.xml from a and b above. They are identical, except for "size" tag (refers to jar file). The "b" jar is larger. This makes sense because the "b" jar contains repository.xml.
            • Confirmed: Get Average Score menu item appears in IGB Tools menu when you install from "a" but does not appear when you install from "b"
            Show
            ann.loraine Ann Loraine added a comment - Notes: Downloaded repository.xml from a and b above. They are identical, except for "size" tag (refers to jar file). The "b" jar is larger. This makes sense because the "b" jar contains repository.xml. Confirmed: Get Average Score menu item appears in IGB Tools menu when you install from "a" but does not appear when you install from "b"
            Hide
            ann.loraine Ann Loraine added a comment -
            • Unpacked jars - "a" contained images and "b" did not. This might be causing an error in the menu provider service somehow.
            Show
            ann.loraine Ann Loraine added a comment - Unpacked jars - "a" contained images and "b" did not. This might be causing an error in the menu provider service somehow.
            Hide
            ann.loraine Ann Loraine added a comment -

            The problem may be with maven-bundle-plugin failing to include all the resource files - the menu icons as well as the repository.xml icons. I had a similar problem with super-simple-igb-app and solved it by including a comma-separated list of all the resources I wanted to add. See the POM for super-simple-igb-app: https://bitbucket.org/lorainelab/super-simple-igb-app/src/master/pom.xml

            Show
            ann.loraine Ann Loraine added a comment - The problem may be with maven-bundle-plugin failing to include all the resource files - the menu icons as well as the repository.xml icons. I had a similar problem with super-simple-igb-app and solved it by including a comma-separated list of all the resources I wanted to add. See the POM for super-simple-igb-app: https://bitbucket.org/lorainelab/super-simple-igb-app/src/master/pom.xml
            Hide
            ann.loraine Ann Loraine added a comment -

            Suggestion: Try modifying the mvn-bundle-plugin configuration to include each file we want individually, using "include" tag under "includes" tag under "configuration" tag.

            Show
            ann.loraine Ann Loraine added a comment - Suggestion: Try modifying the mvn-bundle-plugin configuration to include each file we want individually, using "include" tag under "includes" tag under "configuration" tag.
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - - edited

            The "maven-bundle-plugin" has a tag <Include-Resource> in "Instructions" under <execution> tags. The <Include-Resource> instruction is a LIST of resources that need to be copied into the JAR. By default, the bundle plugin converts the project's Maven resource directories (src/main/resources/) into a single instruction. But when we specify our own <Include-Resource> instruction, this replaces the generated one. To include the existing resources too, we need to add the PATH (src/main/resources/) or

            {maven-resources} to the list. This will include the existing resources along with the specified resource in the root of the JAR file.

            Please refer: https://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html

            So, as Prof. Loraine suspected, the default behavior of Maven is overridden by adding our specified <Include-Resource> tag. Also, adding two resource names separated by a comma includes both the resources in the JAR, the reason being <Include-Resource> is a list of resources.

            The 23andMe SNP Converter app saves the repository.xml file to src/main/resources in the local and the <Include-Resource> tag has only the path to the resources folder mentioned. As a result, all the resources along with the repository.xml file are included in the JAR.

            Please let me know if i can go ahead and add {maven-resources}

            to the <Include-Resource> tag.

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - - edited The "maven-bundle-plugin" has a tag <Include-Resource> in "Instructions" under <execution> tags. The <Include-Resource> instruction is a LIST of resources that need to be copied into the JAR. By default, the bundle plugin converts the project's Maven resource directories (src/main/resources/) into a single instruction. But when we specify our own <Include-Resource> instruction, this replaces the generated one. To include the existing resources too, we need to add the PATH (src/main/resources/) or {maven-resources} to the list. This will include the existing resources along with the specified resource in the root of the JAR file. Please refer: https://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html So, as Prof. Loraine suspected, the default behavior of Maven is overridden by adding our specified <Include-Resource> tag. Also, adding two resource names separated by a comma includes both the resources in the JAR, the reason being <Include-Resource> is a list of resources. The 23andMe SNP Converter app saves the repository.xml file to src/main/resources in the local and the <Include-Resource> tag has only the path to the resources folder mentioned. As a result, all the resources along with the repository.xml file are included in the JAR. Please let me know if i can go ahead and add {maven-resources} to the <Include-Resource> tag.
            Hide
            ann.loraine Ann Loraine added a comment -

            Mystery solved - thank you!

            Show
            ann.loraine Ann Loraine added a comment - Mystery solved - thank you!
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment -

            The changes are present in the link below. I am now able to run the app successfully.
            Also, I have removed the <include> tag for git-commit-id-plugin.
            The
            " <includes>
            <include>*/.properties</include>
            </includes> "
            has been removed as it is an extra bit of code. The git.properties file is being created and included without this tag also.
            https://bitbucket.org/skulka2710/get-average-score-shamika/branch/IGBF-2041#diff

            Kindly review.

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - The changes are present in the link below. I am now able to run the app successfully. Also, I have removed the <include> tag for git-commit-id-plugin. The " <includes> <include>* / .properties</include> </includes> " has been removed as it is an extra bit of code. The git.properties file is being created and included without this tag also. https://bitbucket.org/skulka2710/get-average-score-shamika/branch/IGBF-2041#diff Kindly review.
            Hide
            prutha Prutha Kulkarni (Inactive) added a comment - - edited

            Shamika Gajanan Kulkarni, sorry but I am not able to see the app under tools menu. I have checked it on two machines and it still is not appearing under the tools menu. Could you please have a look at it?
            Also, one more request. Could you please mention testing instructions specifically as mentioned by Dr. Loraine yesterday for 9.1.0 release, so that it would be easier for other people who haven't worked on IGB to test it.

            Show
            prutha Prutha Kulkarni (Inactive) added a comment - - edited Shamika Gajanan Kulkarni , sorry but I am not able to see the app under tools menu. I have checked it on two machines and it still is not appearing under the tools menu. Could you please have a look at it? Also, one more request. Could you please mention testing instructions specifically as mentioned by Dr. Loraine yesterday for 9.1.0 release, so that it would be easier for other people who haven't worked on IGB to test it.
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment -

            Could you please check again now? I have run the build for the branch again. It should work since it is working on my system. Please let me know if it doesn't. And yes, I will comment on the ticket with the steps to test.

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - Could you please check again now? I have run the build for the branch again. It should work since it is working on my system. Please let me know if it doesn't. And yes, I will comment on the ticket with the steps to test.
            Hide
            prutha Prutha Kulkarni (Inactive) added a comment -

            Shamika Gajanan Kulkarni, yes. It is working fine now. Tested it on IGB. Moving it forward and you can submit a PR for the same.
            Thanks.

            Show
            prutha Prutha Kulkarni (Inactive) added a comment - Shamika Gajanan Kulkarni , yes. It is working fine now. Tested it on IGB. Moving it forward and you can submit a PR for the same. Thanks.
            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - Pull request Submitted: https://bitbucket.org/lorainelab/get-average-score/pull-requests/6/igbf-2041-add-resources-along-with/diff
            Hide
            ann.loraine Ann Loraine added a comment -

            Merged and ready for testing.
            To test, add https://bitbucket.org/lorainelab/get-average-score/downloads/ as an App repository in IGB.

            Show
            ann.loraine Ann Loraine added a comment - Merged and ready for testing. To test, add https://bitbucket.org/lorainelab/get-average-score/downloads/ as an App repository in IGB.
            Hide
            prutha Prutha Kulkarni (Inactive) added a comment -

            Shamika Gajanan Kulkarni, I followed the instructions mentioned in the app description to test the avg score app and it is working perfectly fine.
            Calculated the avg score for syms selection of A Thaliana genome.
            Moving it to done.

            Show
            prutha Prutha Kulkarni (Inactive) added a comment - Shamika Gajanan Kulkarni , I followed the instructions mentioned in the app description to test the avg score app and it is working perfectly fine. Calculated the avg score for syms selection of A Thaliana genome. Moving it to done.

              People

              • Assignee:
                shamika Shamika Gajanan Kulkarni (Inactive)
                Reporter:
                shamika Shamika Gajanan Kulkarni (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: