Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-5265

Rethink ThreeScale::DevDomain and request.host monkey patching

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Major
    • None
    • None
    • System
    • None

    Description

      Issue

      The heavy use of monkey patching is hindering development and introduces complexity, errors and bugs when testing in preview (OCP or VM)

      Context

      We use an obfuscated database of production for staging/preview.
      However customer domains are not obfuscated and we would like it to stay like that for testing. investigation and bug fixing purpose.

      In order to run the application in preview or locally, we modify request host on the fly:
      https://github.com/3scale/porta/blob/ec3962a0b7de9357afa280bde39c90965a19e93b/app/lib/three_scale/dev_domain.rb

      Any feature that relies on request.host should also know about this usage. Thus adding unrelated complexity to the feature:

      Examples:

      And many more ....

      Also, it forbids some external library to work well in staging/preview preventing us to debug or test. sidekiq-web is not working well because of that.

      Attachments

        Activity

          People

            Unassigned Unassigned
            hramihaj Hery Ramihajamalala (Inactive)
            Hery Ramihajamalala Hery Ramihajamalala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: