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

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

XMLWordPrintable

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

      None

      Show
      None
    • False
    • subs-swatch-thunder

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

      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 tally migration scripts from swatch-database-migrations to swatch-tally, 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 tally migration scripts from swatch-database-migrations to swatch-tally
      • Configure the liquibase Quarkus extension in swatch-tally to perform the migrations
      • Remove the init-container to perform the migrations in clowder
      • swatch-tally can start independently with proper database initialization
      • swatch-tally ClowdApp YAML updated to remove initContainer migration runner configuration
      • swatch-api continues to work (shares same codebase/migrations as swatch-tally)
      • swatch-db-changelog-cleanup job available for swatch-tally 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

              Unassigned Unassigned
              kflahert@redhat.com Kevin Flaherty
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: