jaeger-operator icon indicating copy to clipboard operation
jaeger-operator copied to clipboard

fixes #2207 by adding server-url to JaegerMetricsStorageSpec

Open antoniomerlin opened this issue 1 year ago • 4 comments

ServerUrl is for providing external prometheus service url. Added test for verifying env variable PROMETHEUS_SERVER_URL is not empty when specifying metric storage type as prometheus for both AllInOne and Query.

Which problem is this PR solving?

  • Resolves #2207

Description of the changes

  • ServerUrl is for providing external prometheus service url for Jaeger SPM. And associated tests.

How was this change tested?

  • on k8s multinode cluster

Checklist

  • [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
  • [x] I have signed all commits
  • [x] I have added unit tests for the new functionality
  • [x] I have run lint and test steps successfully
    • for jaeger: make lint test
    • for jaeger-ui: yarn lint and yarn test

antoniomerlin avatar Feb 22 '24 13:02 antoniomerlin

Hi @antoniomerlin. Thanks for your PR.

I'm waiting for a jaegertracing member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

openshift-ci[bot] avatar Feb 22 '24 13:02 openshift-ci[bot]

thanks!

question: is this example file wrong then? (so we should deprecate) https://github.com/jaegertracing/jaeger-operator/blob/bbd5b1a2c147911a95c37018dd9929a12df6a75b/examples/all-in-one-with-metrics-query.yaml#L14

note the "server-url" under a different level, although I cannot find references in code

cimitan avatar Feb 28 '24 19:02 cimitan

thanks!

question: is this example file wrong then? (so we should deprecate)

https://github.com/jaegertracing/jaeger-operator/blob/bbd5b1a2c147911a95c37018dd9929a12df6a75b/examples/all-in-one-with-metrics-query.yaml#L14

note the "server-url" under a different level, although I cannot find references in code

https://github.com/jaegertracing/jaeger-operator/blob/bbd5b1a2c147911a95c37018dd9929a12df6a75b/pkg/deployment/all_in_one.go#L66

iblancasa avatar Feb 29 '24 16:02 iblancasa

@rubenvp8510 can you take a look to this PR?

iblancasa avatar Mar 05 '24 11:03 iblancasa

This looks good, just run make api-docs to regenerate the docs, I think is the reason CI is complaining

rubenvp8510 avatar Mar 07 '24 05:03 rubenvp8510

Hi, @iblancasa do i need to add anything in this PR ?

antoniomerlin avatar Mar 12 '24 13:03 antoniomerlin

The CI is still failing. As @rubenvp8510 pointed:

Build failed: the api.md file has been changed but the generated api.md file isn't up to date. Run 'make api-docs' and update your PR.
diff --git a/docs/api.md b/docs/api.md
index ba9781d..349e734 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -9556,6 +9556,13 @@ Resource Types:
         </tr>
     </thead>
     <tbody><tr>
+        <td><b>server-url</b></td>
+        <td>string</td>
+        <td>
+          <br/>
+        </td>
+        <td>false</td>
+      </tr><tr>
         <td><b>type</b></td>
         <td>string</td>
         <td>
@@ -33[32](https://github.com/jaegertracing/jaeger-operator/actions/runs/8234186857/job/22515377833?pr=2481#step:6:33)1,6 +[33](https://github.com/jaegertracing/jaeger-operator/actions/runs/8234186857/job/22515377833?pr=2481#step:6:34)328,13 @@ Resource Types:
         </tr>
     </thead>
     <tbody><tr>
+        <td><b>server-url</b></td>
+        <td>string</td>
+        <td>
+          <br/>
+        </td>
+        <td>false</td>
+      </tr><tr>
         <td><b>type</b></td>
         <td>string</td>
         <td>
make: *** [Makefile:130: ensure-generate-is-noop] Error 1

iblancasa avatar Mar 13 '24 15:03 iblancasa

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.71%. Comparing base (411b758) to head (58fddb1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2481      +/-   ##
==========================================
+ Coverage   87.69%   87.71%   +0.01%     
==========================================
  Files         102      102              
  Lines        7298     7308      +10     
==========================================
+ Hits         6400     6410      +10     
  Misses        701      701              
  Partials      197      197              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 18 '24 08:03 codecov[bot]

/retest

iblancasa avatar Mar 18 '24 13:03 iblancasa