-
Task
-
Resolution: Done
-
Critical
-
None
-
None
-
None
-
3
-
False
-
-
False
-
subs-swatch-lightning
-
-
-
Swatch Lightning Sprint 4
Fix the Unleash feature flag service component tests by updating them to dynamically look up the correct service name and token in ephemeral environments and ensure they can automatically create required feature flags to pass reliably.
The existing implementation of the Unleash service (see implementation in here) only works when running the component test locally.
The problem are:
1. the service name does not match with the one from an ephemeral environment. Proposed fix: https://github.com/RedHatInsights/rhsm-subscriptions/pull/5078
2. after fixing the above service name lookup issue, then it will fail with 401 unauthorized error. This is because the admin token is hard coded: https://github.com/RedHatInsights/rhsm-subscriptions/blob/434fdfe9db45b457540cfcb104b2f953106b917c/swatch-test-framework/src/main/java/com/redhat/swatch/component/tests/api/UnleashService.java#L25.
3. Then, If the feature flag does not exist, it will fail with 404 not found. In an ephemeral environment, the unleash service is always empty.
Proposed solution is https://github.com/RedHatInsights/rhsm-subscriptions/pull/5189 which will get the admin token from the correct secret within the ephemeral project. Moreover, it will create the feature flags if it does not exist.
Acceptance Criteria
- Fix all the above issues, and confirm that the solution works locally and using an ephemeral environment.
- Use the changes in an existing component test, like in swatch-utilization (see the above PR).
- Confirm that the service will watch for the feature flag changes (on/off) even though the feature flag does not exist at first.
- blocks
-
SWATCH-3795 Send notifications to “platform.notifications.ingress”
-
- To Do
-