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

Configure unleash in swatch-utilizations service to turn off the customer notifications

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • swatch-utilization
    • None

      Add the unleash dependency to the notifications service:

      <dependency>
            <groupId>io.quarkiverse.unleash</groupId>
            <artifactId>quarkus-unleash</artifactId>
      </dependency>
      

      Add the following properties to the notifications service:

      # Disable the service in the test environment so that we can
      # mock the service.
      %test.quarkus.unleash.active=false
      quarkus.unleash.devservices.enabled=${ENABLE_UNLEASH_DEV_SERVICES:false}
      quarkus.unleash.url=${UNLEASH_URL:http://localhost:4242/api}
      quarkus.unleash.token=${UNLEASH_API_TOKEN:default:development.unleash-insecure-api-token}
      quarkus.unleash.name-prefix=swatch
      %dev.quarkus.unleash.fetch-toggles-interval=1
      %ephemeral.quarkus.unleash.fetch-toggles-interval=1
      

      Create FeatureFlags class in package com.redhat.swatch.notifications.services:

      @Slf4j
      @ApplicationScoped
      public class FeatureFlags {
        public static final String SEND_NOTIFICATIONS = "swatch.swatch-notifications.send-notifications";
      
        private final Unleash unleash;
      
        public FeatureFlags(Unleash unleash) {
          this.unleash = unleash;
        }
      
        public boolean sendNotifications() {
          return unleash.isEnabled(FeatureFlags.SEND_NOTIFICATIONS);
        }
      }
      

      Acceptance Criteria:

      • Unleash feature flag is implemented.
      • Flag name "swatch.swatch-notifications.send-notifications"
      • Update clowdapp as necessary
      • Ensure feature flag is honored in EE as well as stage & prod

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

                Created:
                Updated: