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

Investigate and fix errors in delivering repository.xml to IGB App Manager

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:

      Description

      On changing the AppDescription.md file for different versions of a single app, the repository.xml gets updated. However, the description displayed in App Manager does not reflect these changes for each versions. Kindly refer to the issue linked to this ticket and review the comments and screenshots for more clarification.

        Attachments

          Issue Links

            Activity

            Hide
            noor91zahara Noor Zahara (Inactive) added a comment - - edited

            Observations made :

            As per the below functions in BundleInfoManager.java, the app is updated only if the version is same. So might have to change the logic here.

            public boolean isUpdateable(Bundle bundle) {
            if (Arrays.asList(bundleContext.getBundles()).stream()
            .anyMatch(installedBundle -> installedBundle.getSymbolicName().equals(bundle.getSymbolicName()))) {
            Bundle installedBundle = Arrays.asList(bundleContext.getBundles()).stream()
            .filter(b -> b.getSymbolicName().equals(bundle.getSymbolicName())).findFirst().get();
            return repositoryManagedBundles.stream()
            .filter(repoBundle -> repoBundle.getSymbolicName().equals(bundle.getSymbolicName()))
            .anyMatch(repoBundle ->

            { return repoBundle.getVersion().compareTo(installedBundle.getVersion()) == 1; }

            );
            } else

            { return false; }

            }

            public Bundle getLatestBundle(Bundle bundle) {
            if (isUpdateable(bundle)) {
            List<Bundle> updateableVersions = repositoryManagedBundles.stream()
            .filter(b -> b.getSymbolicName().equals(bundle.getSymbolicName()))
            .collect(Collectors.toList());
            Collections.sort(updateableVersions, (Bundle o1, Bundle o2) ->

            { return o1.getVersion().compareTo(o2.getVersion()); }

            );
            if (!updateableVersions.isEmpty())

            { return updateableVersions.get(updateableVersions.size() - 1); }

            }
            return bundle;
            }

            [~aloraine]

            Show
            noor91zahara Noor Zahara (Inactive) added a comment - - edited Observations made : As per the below functions in BundleInfoManager.java, the app is updated only if the version is same. So might have to change the logic here. public boolean isUpdateable(Bundle bundle) { if (Arrays.asList(bundleContext.getBundles()).stream() .anyMatch(installedBundle -> installedBundle.getSymbolicName().equals(bundle.getSymbolicName()))) { Bundle installedBundle = Arrays.asList(bundleContext.getBundles()).stream() .filter(b -> b.getSymbolicName().equals(bundle.getSymbolicName())).findFirst().get(); return repositoryManagedBundles.stream() .filter(repoBundle -> repoBundle.getSymbolicName().equals(bundle.getSymbolicName())) .anyMatch(repoBundle -> { return repoBundle.getVersion().compareTo(installedBundle.getVersion()) == 1; } ); } else { return false; } } public Bundle getLatestBundle(Bundle bundle) { if (isUpdateable(bundle)) { List<Bundle> updateableVersions = repositoryManagedBundles.stream() .filter(b -> b.getSymbolicName().equals(bundle.getSymbolicName())) .collect(Collectors.toList()); Collections.sort(updateableVersions, (Bundle o1, Bundle o2) -> { return o1.getVersion().compareTo(o2.getVersion()); } ); if (!updateableVersions.isEmpty()) { return updateableVersions.get(updateableVersions.size() - 1); } } return bundle; } [~aloraine]
            Hide
            ann.loraine Ann Loraine added a comment -

            Could you point out the bug ? I do not see it. Noor Zahara

            Show
            ann.loraine Ann Loraine added a comment - Could you point out the bug ? I do not see it. Noor Zahara
            Hide
            noor91zahara Noor Zahara (Inactive) added a comment -

            The check in the below function (i.e. isUpdateable) is the place where I think the logic should be changed. As per me this check needs to be removed.

            public Bundle getLatestBundle(Bundle bundle) {
            if (isUpdateable(bundle)) {....}}

            And also isUpdateable returns true only if the app with same bundle symbolic name and version is installed. This also needs to be checked.

            Show
            noor91zahara Noor Zahara (Inactive) added a comment - The check in the below function (i.e. isUpdateable) is the place where I think the logic should be changed. As per me this check needs to be removed. public Bundle getLatestBundle(Bundle bundle) { if (isUpdateable(bundle)) {....}} And also isUpdateable returns true only if the app with same bundle symbolic name and version is installed. This also needs to be checked.
            Hide
            noor91zahara Noor Zahara (Inactive) added a comment - - edited

            It is working as expected with the new appstore changes. I am not sure what was causing this issue earlier.

            Shamika Gajanan Kulkarni - Could you test and confirm the same.

            Show
            noor91zahara Noor Zahara (Inactive) added a comment - - edited It is working as expected with the new appstore changes. I am not sure what was causing this issue earlier. Shamika Gajanan Kulkarni - Could you test and confirm the same.
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment -

            Noor Zahara The issue is not seen anymore. I checked again. Thanks for letting me know. Any ideas on what might have caused it earlier?
            Prof. [~aloraine] Can we close the ticket?

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - Noor Zahara The issue is not seen anymore. I checked again. Thanks for letting me know. Any ideas on what might have caused it earlier? Prof. [~aloraine] Can we close the ticket?
            Hide
            ann.loraine Ann Loraine added a comment -

            Yes, please close.

            Show
            ann.loraine Ann Loraine added a comment - Yes, please close.

              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: