Uploaded image for project: 'Managed Service - Streams'
  1. Managed Service - Streams
  2. MGDSTRM-10247

Refactor KafkaRequest presenter to take expires_at value from the database

XMLWordPrintable

    • 3
    • False
    • None
    • False
    • No
    • MGDSRVS-341 - Enable customers to evaluate OpenShift Application Services
    • ---
    • ---

      WHAT

      Currently the expires_at value is dynamically calculated in the KafkaRequest presenter as it wasn't originally stored in the database (seeĀ here)

      Refactor this so that the expires_at value is retrieved from the database

      WHY

      If the lifespanSeconds or grace_period_days configuration changes, KafkaRequests with expires_at set are not recalculated. Because of this we need to ensure we don't dynamically calculate it any longer in the presenter.

      HOW

      The kafkaRequest (*dbapi.KafkaRequest) object passed as a parameter to the Presenter should have the expires_at value already.

      • Remove any existing code that is used to calculate the expires_at value in the presenter
      • Set ExpiresAt to kafkaRequest.ExpiresAt.

      DONE

      • KafkaRequest ExpiresAt value in the presenter is retrieved from the database
      • Unit/integration tests updated if necessary

            msorianod Miguel Soriano
            jbriones@redhat.com Jameel Briones
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: