Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-4032

Move contracts migration scripts from swatch-database-migrations to swatch-contracts

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • None
    • swatch-contracts
    • None
    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • subs-swatch-lightning

      Initially, the contracts migration scripts were located already in swatch-contracts. Then, these were moved out of swatch-contracts to swatch-database-migrations, so we could run these scripts by other services without needing to deploy swatch-contracts. Technically, the scripts are now performed using init-container in swatch-contracts.

      However, the solution brought more problems than solutions:

      • the init-container image was using a property MIGRATION_TAG to "latest", and this property was not being properly updated when deploying to production. We fixed this by using IMAGE_TAG which worked.
      • the consequencies of the above workaround is that now we can't deploy different images for the service and the init container. This is a blocker for running the component tests in Konflux which provides different images per component: SWATCH-3994

      We should move again the contracts migration scripts from swatch-database-migrations to swatch-contracts, configure liquibase to run the migrations after starting the service and remove the init-container to run the migrations in this service.

      Acceptance Criteria

      • Move again the contracts migration scripts from swatch-database-migrations to swatch-contracts
      • Configure the liquibase Quarkus extension in swatch-contracts to perform the migrations
      • swatch-contracts can start independently with proper database initialization
      • swatch-contracts ClowdApp YAML updated to remove initContainer migration runner configuration
      • Konflux pipelines unblocked for swatch-contracts (verify component tests work) Part of SWATCH-3994
      • swatch-db-changelog-cleanup job available for swatch-contracts to release stuck Liquibase locks
      • Confirm that after running the migrations from the swatch-database-migrations, after these changes, liquibase does not try to perform the same migrations

              rh-ee-gmantzou Georgios Mantzounis
              jcarvaja@redhat.com Jose Carvajal Hilario
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: