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

Make swatch-contracts-bonfire-tekton work with database dependencies

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    • None

      Context
      The Konflux IntegrationTestScenario for swatch-contracts-bonfire-tekton is currently failing to successfully deploy because it cannot properly handle the swatch-database dependency. The bonfire-tekton integration needs to be enhanced to override the MIGRATION_IMAGE tag in addition to the IMAGE tag that it already handles.

      Current State

      • bonfire-tekton (https://github.com/RedHatInsights/bonfire-tekton) successfully overrides IMAGE tags
      • MIGRATION_IMAGE tags are not being overridden, causing deployment failures for swatch components with database dependencies
      • swatch-contracts requires swatch-database component with proper migration image handling

      Technical Details
      The MIGRATION_IMAGE tag needs to be overridden similar to how the IMAGE tag is currently handled in the bonfire-tekton repository. This is required for swatch components that have database migration dependencies.

      Update from jcarvaja@redhat.com

      There were the following issues in the existing integration test definition:

      • we can't set "--remove-dependencies swatch-contracts", because the swatch-database won't be deployed and hence clowder will fail to find this dependency (even when we deploy it using the COMPONENTS param and swatch-database is up and ready).
      • we were missing some components like artemis.

      Apart from the above issues that have been already fixed:

      • since we can't use --remote-dependencies, we need to deploy swatch-tally because at the moment, swatch-contracts depends on swatch-tally. We'll be fixed by SWATCH-3895.

      And then, the final remaining issues are:

      • Konflux is running the integration test before verifying that all the components have the same IMAGE_TAG. So, we can't use the same IMAGE_TAG for swatch-contracts and swatch-database.
      • Related to above, we can't workaround the Konflux issue by adding an additional parameter MIGRATION_IMAGE_TAG because OpenShift does not support inheriting this parameter with a fallback of the "IMAGE_TAG" property, which is the only one that is used when promoting the services to stage and production.

      Therefore, the only solution I see is to get rid of the init-container that run the migrations which is giving more problems than solutions. This is up to discussion. Reported by SWATCH-4032.

      Acceptance Criteria

      • swatch-contracts-bonfire-tekton IntegrationTestScenario deploys successfully
      • Database migrations run correctly in ephemeral environments
      • Solution follows the same pattern as existing IMAGE tag override mechanism

              Unassigned Unassigned
              lburnett0 Lindsey Burnett
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h