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

SF rule to ensure that the require-schema-version is always synchronized with the upgrade path

    Details

      Description

      This ticket is intended to cover these use cases for service builder modules:

      1. When we create a new upgrade process but we forget to update require-schema-version field.
      2. When we modify the require-schema-version but we forget to register the new uprade process or we do it incorrectly (see BPR-47769)

      The logic should be something like this:

      For #1:

      • if the pull request fulfills:
        • Modifies an upgrade registration class (implements UpgradeStepRegistrator)
        • That class is in a service builder module (contains Liferay-Service: true in bnd.bnd)
        • The new change is adding a new latest upgrade step (calls registry.register with the higher final schema version number)
      • Then, ensure that:
        • The property Liferay-Require-SchemaVersion in the bnd.bnd file for that module must contain the highest number defined in the upgrade registration class.

      For #2:

      • if the pull request fulfills:
        • Modifies the property Liferay-Require-SchemaVersion in the bnd.bnd file for a service builder module (contains Liferay-Service: true in bnd.bnd)
        • There is an upgrade registration class (implements UpgradeStepRegistrator). This class is not required sometimes so just skip this case when there is no this kind of class in the module.
      • Then, ensure that:
        • The latest (and highest schema version) registry.register in the upgrade registration class  points to the required schema version defined in the bnd.bnd

      For the future, we will remove the require-schema-version field but we need to ensure this for now.

        Attachments

          Activity

            People

            • Assignee:
              brian.chan Brian Chan
              Reporter:
              alberto.chaparro Alberto Chaparro
              Engineering Assignee:
              SE Support
              Recent user:
              Enterprise Release HU
              Participants of an Issue:
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                7.0.X
                7.1.X
                7.2.X
                Master