Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-108461

UpgradeStepRegistry schema versioning doesn't honour osgi Version grammar

    Details

      Description

      When creating a step registry we are using this syntax: 1.0.0-step1, but 0-step1 isn't a valid micro number identifier, neither a qualifier. See: https://osgi.org/javadoc/osgi.core/7.0.0/org/osgi/framework/Version.html

      With this syntax if an upgrade process fails and gets restarted afterwards we can get exceptions like the following one:

      java.lang.IllegalArgumentException: invalid version "1.0.0-step-1": non-numeric "0-step-1"
              at org.osgi.framework.Version.parseInt(Version.java:169)
              at org.osgi.framework.Version.<init>(Version.java:134)
              at com.liferay.portal.upgrade.internal.release.ReleasePublisher.publish(ReleasePublisher.java:63)
              at com.liferay.portal.upgrade.internal.release.ReleasePublisher.publishInProgress(ReleasePublisher.java:85)
              at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.executeUpgradeInfos(UpgradeExecutor.java:93)
              at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.execute(UpgradeExecutor.java:84)
              at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands.executeAll(ReleaseManagerOSGiCommands.java:319)
              at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands.executeAll(ReleaseManagerOSGiCommands.java:179)
      

        Attachments

          Activity

            People

            Assignee:
            summer.zhang Summer Zhang
            Reporter:
            mariano.alvaro Mariano Álvaro
            Participants of an Issue:
            Recent user:
            Marta Elicegui
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 32 weeks, 2 days ago

                Packages

                Version Package
                7.1.10 DXP FP17
                7.1.10.4 SP4
                7.1.X
                7.2.10 DXP FP5
                7.2.10.2 DXP SP2
                7.2.X
                7.3.1 CE GA2
                7.3.2 CE GA3
                7.3.10 DXP GA1
                Master