[buildkite] Fix "Prometheus compatibility (:docker:)" test in buildkite pipeline - #4295
Conversation
efbcff3 to
a7f198a
Compare
a7f198a to
0f1b873
Compare
0f1b873 to
31f1846
Compare
|
This lgtm, though I'm not sure it will run on local developer machines after this (tried it a bit, ran into some issues). Since it's better to have regression test than not though, and since I don't think this is a very actively developed code path, I'm okay with sacrificing that here. cc @arnikola since it's your test originally :) @kentzeng12 can you add a followup issue and link it in the README.md just to track the fact that this won't run locally? |
| metrics: map[uint64]labels.Labels{}, | ||
| expected: map[uint64]entry{}, | ||
| m3query: newM3QueryClient("localhost", 7201), | ||
| m3query: newM3QueryClient("host.docker.internal", 7201), |
There was a problem hiding this comment.
@kentzeng12 is this only called from a docker context? (afaict answer is yes, so this is okay).
There was a problem hiding this comment.
Since it's being run in the buildkite, which runs the test in a docker container, yes it's called in a docker context, but like you mentioned if you run this locally we run into issues.
andrewmains12
left a comment
There was a problem hiding this comment.
Stamping on following idea:
This lgtm, though I'm not sure it will run on local developer machines after this (tried it a bit, ran into some issues). Since it's better to have regression test than not though, and since I don't think this is a very actively developed code path, I'm okay with sacrificing that here.
|
…te pipeline (#4295) * comment out other tests * add make to dockerfile * remove make, and add kubernetes plugin * add docker-compose * add docker-compose to dockerfile * update m3query volumes in docker-compose * comment out trap defer EXIT command in run.sh * uncomment previous code * experimenting with commenting out rest of run.sh * comment out everything except for line 51 and 52 at the end of run.sh * uncomment lines 53-69 * uncomment lines 71-75 * comment out lines 71 to 75 and uncomment go test in run.sh * check if prometheus container is running * adding logs to check prometheus container not running * update volume mount for prometheus in docker-compose * modify right hand side of volume mount for prometheus in docker-compose * try another volume mount for prometheus * remove volume mounts to see what happens in docker-compose * add back logs in docker-setup * try adding prometheusURL to run.sh * change localhost to host.docker.internal * check for firewall * add sudo to dockerfile * add ufw to dockerfile * inspect prometheus docker container for network issues * modify docker inspect command * add back volume mount for prometheus * fix typo in volume mount * fix another typo in volume mount for prometheus * find the current directory to fix volume mount * update volume mount for prometheus with new directory * fix typo * rewrite volume mount * list out contents in host machine * move ls, and pwd * use absolute path for volume mount * add volume mount for m3query * update m3query volume mount * update volume mount again for prometheus * another volume mount configuration * another volume mount configuration * try another way to volume mount * add m3query.yml * add external:true * try using quotes * remove volume mount for m3query * add docker inspect for m3query * try adding another app * change to localhost * use external to create volume mounts * add pwd to see why we can't find run.sh * try another volume mount * use host docker internal * add host.docker.internal to queryaddress * did we get here? * add logging for response body * test * update volume mount for m3query * add slash to volume mount * comment out volume mount to see what happens * try deleting random CMD in m3comparator * add m3comparator * add logs to see promResult and queryResult * don't use deprecated readall * add log for querygroups * remove fetch querygroup * add back fetch query group * change comparator_write * add log to find endpoint * only log the promResult * only log the prometheus result actually * log queries * switch to using ioutil, and remove some logs * test revert back to localhost:9000 for m3query-dev-remote * revert back to m3comparator:9000, else we get 500 error * revert back to localhost for comparator in run.sh to test * revert promAddress to 0.0.0.0 to test * add back volume mount to m3query container * update volume mount for m3query * change promAddress to queryAddress * add comparator address * change to m3comparator:9001 * change to host.docker.internal instead of m3comparator * uncomment last command in run.sh * change test to host.docker.internal * change m3query to host.docker.internal * uncomment rest of pipeline tests * comment out documentation tests * add back CMD in m3comparator.dockerfile * add space in dockerfile * remove logs and clean up temp code
What this PR does / why we need it:
This PR fixes "Prometheus compatibility (:docker:)" test in buildkite pipeline.
Note about scripts/comparator/compare.go:
I changed
pPromAddressto have the same url aspQueryAddress. This is because from scripts/comparator/README.md, the prometheus node connects to M3Query instance as a remote_read endpoint.Fixes #4274
Special notes for your reviewer:
Does this PR introduce a user-facing and/or backwards incompatible change?:
No
Does this PR require updating code package or user-facing documentation?:
No