-
Task
-
Resolution: Done
-
Undefined
-
None
-
None
-
None
-
5
-
False
-
-
False
-
subs-swatch
-
-
When running IQE component tests for SWATCH metrics which depends on a running Prometheus instance, what we do is:
- create a prometheus file with the metrics
- import this file directly to the Prometheus instance
- wait for the swatch metrics to watch the metrics from the file we imported
However, depending on the environment where we run the test, how we do the above is different.
- For an ephemeral environment:
We use the OpenShift client tool to get the prometheus pod
Then, copy the file with the metrics directly to the pod
And finally, we execute an internal tool called promtool directly into the prometheus pod
- For a local environment:
We use the Podman client tool to copy the file with the metrics using "podman cp"
And finally, we execute the same internal tool called promtool directly into the container
These two different implementations has the following drawbacks:
- We depend on internal client tools like the OpenShift client binary and the Podman client binary
- The logic is different for ephemeral and for local environments, so we need to maintain two logics that serve the same purpose
- For local testing, If we intend to run this IQE test inside another container, the local logic won't work since we can't connect to a container from another container.
In order to address all the above limitations:
- Let's write a simple API inside our Prometheus image in https://github.com/RedHatInsights/prometheus-consoledot
This API will listen for new files and internally it will call the promtool internal tool.
- And then, we can now use the same logic that calls this new API to do this import.
- is related to
-
SWATCH-3628 Enable wiremock profile for swatch-metrics for local component testing
-
- Release Pending
-