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

Update POM to include micro version

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Story Points:
      1
    • Sprint:
      Winter 4 Feb 8 - Feb 19, Winter 5 Feb 22 - Mar 5, Winter 6 Mar 8 - Mar 19, Spring 1 2021 Mar 22 - Apr 2

      Description

      Modify the quickload app POM to specify micro versions in the MANIFEST.
      Please fork: https://bitbucket.org/lorainelab/quickload-saver.git to work on this.
      The app should be declared to depend on IGB packages versions 9.1.8 or higher, up to but not including version 10.
      I'm not sure how the App Store or the within-IGB App Manager will handle this, but I would like to investigate.

        Attachments

        1. App.PNG
          App.PNG
          205 kB
        2. change in pom.xml file.PNG
          change in pom.xml file.PNG
          28 kB
        3. Logs.PNG
          Logs.PNG
          70 kB
        4. New Manifest.PNG
          New Manifest.PNG
          48 kB
        5. Old Manifest.PNG
          Old Manifest.PNG
          48 kB
        6. Repository.PNG
          Repository.PNG
          102 kB

          Issue Links

            Activity

            ann.loraine Ann Loraine created issue -
            ann.loraine Ann Loraine made changes -
            Field Original Value New Value
            Epic Link IGBF-1765 [ 17855 ]
            ann.loraine Ann Loraine made changes -
            Link This issue relates to IGBF-2738 [ IGBF-2738 ]
            ann.loraine Ann Loraine made changes -
            Labels Advanced
            ann.loraine Ann Loraine made changes -
            Description Modify the quickload app POM to specify micro versions in the MANIFEST. Modify the quickload app POM to specify micro versions in the MANIFEST.
            The app should be declared to depend on IGB packages versions 9.1.8 or higher, up to but not including version 10.
            I'm not sure how the App Store or the within-IGB App Manager will handle this, but I would like to investigate.
            inaylor Irvin Naylor (Inactive) made changes -
            Assignee Irvin Naylor [ inaylor ]
            ann.loraine Ann Loraine made changes -
            Description Modify the quickload app POM to specify micro versions in the MANIFEST.
            The app should be declared to depend on IGB packages versions 9.1.8 or higher, up to but not including version 10.
            I'm not sure how the App Store or the within-IGB App Manager will handle this, but I would like to investigate.
            Modify the quickload app POM to specify micro versions in the MANIFEST.
            Please fork: https://bitbucket.org/lorainelab/quickload-saver.git to work on this.
            The app should be declared to depend on IGB packages versions 9.1.8 or higher, up to but not including version 10.
            I'm not sure how the App Store or the within-IGB App Manager will handle this, but I would like to investigate.
            ann.loraine Ann Loraine made changes -
            Link This issue relates to IGBF-510 [ IGBF-510 ]
            inaylor Irvin Naylor (Inactive) made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            inaylor Irvin Naylor (Inactive) made changes -
            Status In Progress [ 3 ] To-Do [ 10305 ]
            inaylor Irvin Naylor (Inactive) made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            inaylor Irvin Naylor (Inactive) made changes -
            Status In Progress [ 3 ] To-Do [ 10305 ]
            inaylor Irvin Naylor (Inactive) made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            inaylor Irvin Naylor (Inactive) made changes -
            Status In Progress [ 3 ] To-Do [ 10305 ]
            inaylor Irvin Naylor (Inactive) made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            ann.loraine Ann Loraine made changes -
            Sprint Winter 4 Feb 8 - Feb 19 [ 114 ] Winter 4 Feb 8 - Feb 19, Winter 5 Feb 22 - Mar 5 [ 114, 115 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            inaylor Irvin Naylor (Inactive) made changes -
            Status In Progress [ 3 ] To-Do [ 10305 ]
            ann.loraine Ann Loraine made changes -
            Sprint Winter 4 Feb 8 - Feb 19, Winter 5 Feb 22 - Mar 5 [ 114, 115 ] Winter 4 Feb 8 - Feb 19, Winter 5 Feb 22 - Mar 5, Winter 6 Mar 8 - Mar 19 [ 114, 115, 116 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            Hide
            ann.loraine Ann Loraine added a comment -

            To achieve this, you will need to understand how the mvn bundle plugin works, how BND tool works, and how the mvn plugin interprets its configuration in the pom.xml file to add the correct OSGi-specific meta-data to the MANIFEST.mf file bundled with the jar file.

            Omkar Marne - Can you take over working on this for now while Irvin Naylor completes the OSGi on-boarding task?

            Maven bundle plugin is nothing but a wrapper for the BND tool, described here: https://bnd.bndtools.org/. It's main job is to translate the dependencies listed in the pom.xml file and the imports listed in the actual java code into new code that gets added to the MANIFEST.mf file in a jar file. When a jar file is loaded into the OSGi framework, the framework literally reads this MANIFEST.mf file and uses the information there to determine if the bundle can properly load and start, or not.

            Therefore you need to try different configurations in the pom.xml, build the jar, and then look at the manifest file in the jar to make sure it is correct.

            Show
            ann.loraine Ann Loraine added a comment - To achieve this, you will need to understand how the mvn bundle plugin works, how BND tool works, and how the mvn plugin interprets its configuration in the pom.xml file to add the correct OSGi-specific meta-data to the MANIFEST.mf file bundled with the jar file. Omkar Marne - Can you take over working on this for now while Irvin Naylor completes the OSGi on-boarding task? Maven bundle plugin is nothing but a wrapper for the BND tool, described here: https://bnd.bndtools.org/ . It's main job is to translate the dependencies listed in the pom.xml file and the imports listed in the actual java code into new code that gets added to the MANIFEST.mf file in a jar file. When a jar file is loaded into the OSGi framework, the framework literally reads this MANIFEST.mf file and uses the information there to determine if the bundle can properly load and start, or not. Therefore you need to try different configurations in the pom.xml, build the jar, and then look at the manifest file in the jar to make sure it is correct.
            omarne Omkar Marne (Inactive) made changes -
            Assignee Irvin Naylor [ inaylor ] Omkar Marne [ omarne ]
            omarne Omkar Marne (Inactive) made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            Hide
            omarne Omkar Marne (Inactive) added a comment -

            Sure, assigned it to myself.

            Show
            omarne Omkar Marne (Inactive) added a comment - Sure, assigned it to myself.
            Hide
            omarne Omkar Marne (Inactive) added a comment -

            I tried adding the dependencies and modifying the existing dependencies in Pom.xml file with the version 9.1.10 specified in the manifest file but the build failed because there is no 9.1.10 version in the maven repository. I think somehow I need to add the 9.1.10 version in the maven repository first and then build the jar file.

            Show
            omarne Omkar Marne (Inactive) added a comment - I tried adding the dependencies and modifying the existing dependencies in Pom.xml file with the version 9.1.10 specified in the manifest file but the build failed because there is no 9.1.10 version in the maven repository. I think somehow I need to add the 9.1.10 version in the maven repository first and then build the jar file.
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Read this: https://semver.org/ and understand the meaning of "semantic versioning."
            Also review OSGi method for specifying dependencies. This is NOT the same thing as specifying dependencies in a pom.xml file.

            pom.xml: contains instructions for building an artifact, using external libraries, called "dependencies"

            manifest.mf: is a file that is packaged with a jar file that can contain OSGi-specific metadata

            The maven bundle plugins uses pom.xml to accept parameters and add OSGi-specific metadata to the manifest.mf file

            (Behind of the scenes, mvn's "compile" and maybe "package" plugins are creating the manifest.mf. The mvn bundle plugin adds to that process.)

            Show
            ann.loraine Ann Loraine added a comment - - edited Read this: https://semver.org/ and understand the meaning of "semantic versioning." Also review OSGi method for specifying dependencies. This is NOT the same thing as specifying dependencies in a pom.xml file. pom.xml: contains instructions for building an artifact, using external libraries, called "dependencies" manifest.mf: is a file that is packaged with a jar file that can contain OSGi-specific metadata The maven bundle plugins uses pom.xml to accept parameters and add OSGi-specific metadata to the manifest.mf file (Behind of the scenes, mvn's "compile" and maybe "package" plugins are creating the manifest.mf. The mvn bundle plugin adds to that process.)
            Hide
            cdias1 Chester Dias (Inactive) added a comment -

            My findings
            The version of packages needed for import are all generated in the manifest file by the apache felix plugin using the below code of the pom.xml

            <configuration>
                                 <instructions>
                                     <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                                     <Import-Package>*</Import-Package>
                                     <Export-Package/>
                                     <Bundle-Description>${bundleDescription}</Bundle-Description>
                                     <Service-Component>*</Service-Component>
                                 </instructions>
                             </configuration>
            

            The * in the Import packages indicate to use possible version range ditermined by the plugin. This can be overwritten by explicitly mentioning the version. I am currently in the process of finding the most valid macro expression which will pick the version from the dependency version and a hardcoded value as a higher micro version.

            Refrence: https://davidvaleri.wordpress.com/2011/04/07/secrets-of-the-felix-bundle-plug-in-macros-revealed/

            Show
            cdias1 Chester Dias (Inactive) added a comment - My findings The version of packages needed for import are all generated in the manifest file by the apache felix plugin using the below code of the pom.xml <configuration> <instructions> <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> <Import-Package>*</Import-Package> <Export-Package/> <Bundle-Description>${bundleDescription}</Bundle-Description> <Service-Component>*</Service-Component> </instructions> </configuration> The * in the Import packages indicate to use possible version range ditermined by the plugin. This can be overwritten by explicitly mentioning the version. I am currently in the process of finding the most valid macro expression which will pick the version from the dependency version and a hardcoded value as a higher micro version. Refrence: https://davidvaleri.wordpress.com/2011/04/07/secrets-of-the-felix-bundle-plug-in-macros-revealed/
            Hide
            cdias1 Chester Dias (Inactive) added a comment - - edited

            [~aloraine] There are 2 sets of packages listed in the import packages, one with package name org.lorainelab.igb and the other with com.affymetrix.* Do we need to change the versions of both to be [9.1.8, 10) in the manifest file?

            Show
            cdias1 Chester Dias (Inactive) added a comment - - edited [~aloraine] There are 2 sets of packages listed in the import packages, one with package name org.lorainelab.igb and the other with com.affymetrix.* Do we need to change the versions of both to be [9.1.8, 10) in the manifest file?
            Hide
            ann.loraine Ann Loraine added a comment -

            I would recommend changing the POM to specify the same version for all platform bundles. The version used should be the highest version of platform bundles listed.
            However, it would be useful to stick with the versions specified by the developer as this would expose any problems or incorrect assumptions baked in to the App Store or the App Manager component within IGB.

            Please note that "Import-Package" is meant to use a particular syntax for specifying versions and ranges of versions. So in this case, you can use the proper syntax to specify "version 9.1.8 and higher" those bundles that require it.

            You can also specify an upper limit. However, it is unclear if the upper limit can be specified because those higher versions do not exist yet. It is very possible that the App, as written, will work perfectly well with those versions.

            Show
            ann.loraine Ann Loraine added a comment - I would recommend changing the POM to specify the same version for all platform bundles. The version used should be the highest version of platform bundles listed. However, it would be useful to stick with the versions specified by the developer as this would expose any problems or incorrect assumptions baked in to the App Store or the App Manager component within IGB. Please note that "Import-Package" is meant to use a particular syntax for specifying versions and ranges of versions. So in this case, you can use the proper syntax to specify "version 9.1.8 and higher" those bundles that require it. You can also specify an upper limit. However, it is unclear if the upper limit can be specified because those higher versions do not exist yet. It is very possible that the App, as written, will work perfectly well with those versions.
            Hide
            cdias1 Chester Dias (Inactive) added a comment -

            The version of the app with the change now doesn't list as installable in the manager on 9.1.6 but appears in 9.1.8

            Please Review: https://bitbucket.org/chesterdias/quickload-saver-chester-local/branch/IGBF-2785#diff

            Show
            cdias1 Chester Dias (Inactive) added a comment - The version of the app with the change now doesn't list as installable in the manager on 9.1.6 but appears in 9.1.8 Please Review: https://bitbucket.org/chesterdias/quickload-saver-chester-local/branch/IGBF-2785#diff
            cdias1 Chester Dias (Inactive) made changes -
            Assignee Omkar Marne [ omarne ] Chester Dias [ cdias1 ]
            cdias1 Chester Dias (Inactive) made changes -
            Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
            cdias1 Chester Dias (Inactive) made changes -
            Assignee Chester Dias [ cdias1 ] Ann Loraine [ aloraine ]
            Hide
            ann.loraine Ann Loraine added a comment -

            Omkar Marne and Irvin Naylor: Please perform functional and code review.

            For functional review, confirm that the fix is working as follows:

            • Pull the branch from Chester (see above)
            • Push the branch to your fork
            • Build the branch in bitbucket pipelines
            • Confirm that the newly built App can be installed using App Manager GUI and used in 9.1.8
            • Check the functionality and watch the logs for any possible exceptions that may occur
            • Confirm that the App cannot be installed in 9.1.6
            • Download and unpack the jar file; check that MANIFEST file and confirm it contains the proper text in import packages fields

            For each of the above, describe what you observed. State whether the test has passed or failed.

            Please add additional tests as you see fit.

            Show
            ann.loraine Ann Loraine added a comment - Omkar Marne and Irvin Naylor : Please perform functional and code review. For functional review, confirm that the fix is working as follows: Pull the branch from Chester (see above) Push the branch to your fork Build the branch in bitbucket pipelines Confirm that the newly built App can be installed using App Manager GUI and used in 9.1.8 Check the functionality and watch the logs for any possible exceptions that may occur Confirm that the App cannot be installed in 9.1.6 Download and unpack the jar file; check that MANIFEST file and confirm it contains the proper text in import packages fields For each of the above, describe what you observed. State whether the test has passed or failed. Please add additional tests as you see fit.
            ann.loraine Ann Loraine made changes -
            Assignee Ann Loraine [ aloraine ] Omkar Marne [ omarne ]
            omarne Omkar Marne (Inactive) made changes -
            Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
            Hide
            omarne Omkar Marne (Inactive) added a comment -

            New manifest file.

            Show
            omarne Omkar Marne (Inactive) added a comment - New manifest file.
            omarne Omkar Marne (Inactive) made changes -
            Attachment New.PNG [ 15494 ]
            Hide
            omarne Omkar Marne (Inactive) added a comment -

            Old manifest file.

            Show
            omarne Omkar Marne (Inactive) added a comment - Old manifest file.
            omarne Omkar Marne (Inactive) made changes -
            Attachment Old.PNG [ 15495 ]
            Hide
            omarne Omkar Marne (Inactive) added a comment -

            Change in the pom.xml

            Show
            omarne Omkar Marne (Inactive) added a comment - Change in the pom.xml
            omarne Omkar Marne (Inactive) made changes -
            Attachment change in pom.xml file.PNG [ 15496 ]
            omarne Omkar Marne (Inactive) made changes -
            Comment [ Code Review:

            Confirm that the newly built App can be installed using App Manager GUI and used in 9.1.8
            Pass - The app builds and can be installed in IGB 9.1.8 and can be seen from the App Manager GUI with the option in the file menu appearing after installation
            Check the functionality and watch the logs for any possible exceptions that may occur
            Pass - The app functionality is working as expected. No messages of any kind, positive or negative showed up in the log. We did not see any exceptions or errors come up during the process of saving a custom genome.
            Confirm that the App cannot be installed in 9.1.6
            Pass - We confirmed that the app will not install if the user is running 9.1.6 or any version below.
            Download and unpack the jar file; check that MANIFEST file and confirm it contains the proper text in import packages fields
            Pass(?) - The manifest file does contain similar microversion details under import-packages and the only major change was under the bundle description.
            *Ask Dr. Lorraine, the app is working fine and will not install in 9.1.6, but the manifest file itself does not change to reflect the new required versions.
            Could potentially be a problem in future versions such as beyond IGB 10.x.x?
            ]
            Show
            omarne Omkar Marne (Inactive) added a comment - Code review Description. Please refer : https://docs.google.com/document/d/1Jkot1-5W5g6wvYTDhw7NcZIThic_8x47Wo0irX46zcc/edit#heading=h.3fq7y5jrjfrx
            Hide
            ann.loraine Ann Loraine added a comment -

            Google doc above observes that the MANIFESTs from jars built before and after the proposed change are identical, but the proper installation behavior is only observed for the jar build using the new code.

            I do not see how that is possible. Please investigate more carefully. Note that when you install or upgrade an App, the App's bundle is downloaded and saved to the user's local bundle cache. When you un-install an App, the bundle is deleted.

            Also, investigate other meta-data assets provided in the jar.

            Show
            ann.loraine Ann Loraine added a comment - Google doc above observes that the MANIFESTs from jars built before and after the proposed change are identical, but the proper installation behavior is only observed for the jar build using the new code. I do not see how that is possible. Please investigate more carefully. Note that when you install or upgrade an App, the App's bundle is downloaded and saved to the user's local bundle cache. When you un-install an App, the bundle is deleted. Also, investigate other meta-data assets provided in the jar.
            ann.loraine Ann Loraine made changes -
            Status First Level Review in Progress [ 10301 ] To-Do [ 10305 ]
            omarne Omkar Marne (Inactive) made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            omarne Omkar Marne (Inactive) made changes -
            Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
            omarne Omkar Marne (Inactive) made changes -
            Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
            omarne Omkar Marne (Inactive) made changes -
            Attachment New.PNG [ 15494 ]
            omarne Omkar Marne (Inactive) made changes -
            Attachment Old.PNG [ 15495 ]
            omarne Omkar Marne (Inactive) made changes -
            Attachment New Manifest.PNG [ 15497 ]
            omarne Omkar Marne (Inactive) made changes -
            Attachment Old Manifest.PNG [ 15498 ]
            Hide
            omarne Omkar Marne (Inactive) added a comment - - edited

            Dr. Loraine you were right, we were comparing the same manifest files. I have attached the snapshots again. Micro versions in the manifest files have changed. After code change in pom.xml, manifest is taking the micro versions from pom.xml.

            The app bundle is getting added and deleted when we install and uninstall the app. Also the repository.xml file has got updated with the updated micro versions.

            Please check the code review and additional snapshots attached.

            https://docs.google.com/document/d/1Jkot1-5W5g6wvYTDhw7NcZIThic_8x47Wo0irX46zcc/edit#

            Ticket is ready for pull request and assigned to Chester Dias

            Show
            omarne Omkar Marne (Inactive) added a comment - - edited Dr. Loraine you were right, we were comparing the same manifest files. I have attached the snapshots again. Micro versions in the manifest files have changed. After code change in pom.xml, manifest is taking the micro versions from pom.xml. The app bundle is getting added and deleted when we install and uninstall the app. Also the repository.xml file has got updated with the updated micro versions. Please check the code review and additional snapshots attached. https://docs.google.com/document/d/1Jkot1-5W5g6wvYTDhw7NcZIThic_8x47Wo0irX46zcc/edit# Ticket is ready for pull request and assigned to Chester Dias
            omarne Omkar Marne (Inactive) made changes -
            Attachment Logs.PNG [ 15500 ]
            omarne Omkar Marne (Inactive) made changes -
            Attachment Repository.PNG [ 15501 ]
            omarne Omkar Marne (Inactive) made changes -
            Attachment App.PNG [ 15502 ]
            omarne Omkar Marne (Inactive) made changes -
            Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
            omarne Omkar Marne (Inactive) made changes -
            Assignee Omkar Marne [ omarne ] Chester Dias [ cdias1 ]
            Show
            cdias1 Chester Dias (Inactive) added a comment - - edited PR: https://bitbucket.org/lorainelab/quickload-saver/pull-requests/2/igbf-2785-added-manifest-versioning
            cdias1 Chester Dias (Inactive) made changes -
            Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
            cdias1 Chester Dias (Inactive) made changes -
            Assignee Chester Dias [ cdias1 ] Ann Loraine [ aloraine ]
            ann.loraine Ann Loraine made changes -
            Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
            ann.loraine Ann Loraine made changes -
            Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
            ann.loraine Ann Loraine made changes -
            Assignee Ann Loraine [ aloraine ]
            Hide
            ann.loraine Ann Loraine added a comment -

            PR is merged and App is ready for testing from Downloads folder of https://bitbucket.org/lorainelab/quickload-saver/downloads/.

            Show
            ann.loraine Ann Loraine added a comment - PR is merged and App is ready for testing from Downloads folder of https://bitbucket.org/lorainelab/quickload-saver/downloads/ .
            ann.loraine Ann Loraine made changes -
            Sprint Winter 4 Feb 8 - Feb 19, Winter 5 Feb 22 - Mar 5, Winter 6 Mar 8 - Mar 19 [ 114, 115, 116 ] Winter 4 Feb 8 - Feb 19, Winter 5 Feb 22 - Mar 5, Winter 6 Mar 8 - Mar 19, Spring 1 Mar 22 - Apr 2 [ 114, 115, 116, 117 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            inaylor Irvin Naylor (Inactive) made changes -
            Assignee Irvin Naylor [ inaylor ]
            inaylor Irvin Naylor (Inactive) made changes -
            Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
            Hide
            inaylor Irvin Naylor (Inactive) added a comment -

            Can confirm, App does indeed work as intended on 9.1.8 master, output of Homosapeins 2013 is sent to correct contents.txt file

            Show
            inaylor Irvin Naylor (Inactive) added a comment - Can confirm, App does indeed work as intended on 9.1.8 master, output of Homosapeins 2013 is sent to correct contents.txt file
            inaylor Irvin Naylor (Inactive) made changes -
            Resolution Done [ 10000 ]
            Status Post-merge Testing In Progress [ 10003 ] Closed [ 6 ]

              People

              • Assignee:
                inaylor Irvin Naylor (Inactive)
                Reporter:
                ann.loraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: