Add remote write 2 sender compliance tests#194
Conversation
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
bwplotka
left a comment
There was a problem hiding this comment.
Thanks! Looks great from the high level, so far.
Small question, I will try to run it and check in details in the following days. Perhaps @saswatamcode or Juraj have time too
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
| @@ -26,4 +26,4 @@ for vendors or those who wish to maintain high Prometheus compatibility over tim | |||
|
|
|||
| ## Remote Write: Sender | |||
There was a problem hiding this comment.
TODO(to myself or others): Link receiver while we are at it.
There was a problem hiding this comment.
Nice work!
Some comments, but generally great! I didn't review all tests in details, but some early thoughts:
- This is good. Let's directly base it to main and do changes now, it's good!
- Let's fix index.html (: (receiver mention when I ran sender)
- Let's either update or remove circle CI that expects sender. Ideally we rely only on GH actions.
- Let's move sender/receiver README to a single readme under remotewrite. Those are really similar (share same logic). Also when you run index.html It tries local ./result.json now and it makes no sense UNLESS we write shared docs for both sender/receiver.
- Some of the tests are neither MUST, SHOULD or MAY - they are not in the spec e.g. optimizations like symbols must be deduplicated. Maybe it's obvious but maybe we need "OPTIMIZATION" rfc level?
{"Time":"2025-11-07T15:36:31.437028Z","Action":"pass","Package":"github.com/prometheus/compliance/remotewrite/sender","Elapsed":467.59}
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
|
Hi @bwplotka, thanks for reviewing.
PTAL thanks! |
bwplotka
left a comment
There was a problem hiding this comment.
Looks amazing! I still need to look deeper thought.
Can we change the base to main?
Can we fix CI? (remove circleCI?)
| The test suite automatically downloads and runs Prometheus as the reference sender implementation. For testing custom senders, place the binary in the `bin/` directory. | ||
|
|
||
| ### For Receiver Tests | ||
| A Prometheus server with Remote-Write Receiver enabled, as baseline: |
There was a problem hiding this comment.
This also requires Go 1.23+ no?
There was a problem hiding this comment.
Hmm I dont know, probably not as the receiver readme.md doesn't mention this.
| dir: | ||
| - alert_generator | ||
| - promql | ||
| - remotewrite/sender |
There was a problem hiding this comment.
We could create (copy) linting GH action from other Prometheus repos quickly and fix it.
|
Change base of this PR to main |
bwplotka
left a comment
There was a problem hiding this comment.
Left some comments, so far!
Slowly going through (:
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
| // RW 1.0 format doesn't have created_timestamp field. | ||
| // If sender is truly in RW 1.0 mode, this field should be 0/unset. | ||
| for _, ts := range req.Request.Timeseries { | ||
| should(t, int64(0) == ts.CreatedTimestamp, "RW 1.0 should not use created_timestamp field") |
There was a problem hiding this comment.
To be updated with Prometheus main
There was a problem hiding this comment.
ping (: @pipiland2612
I would love to merge this compliance framework 👍🏽
Signed-off-by: pipiland2612 <[email protected]>
|
Let me know once it's tested against 3.8, I will do that final pass 💪🏽 |
Thanks for reminding me. I will test now! |
Signed-off-by: pipiland2612 <[email protected]>
Hi @bwplotka, everything has passsed!
|
|
I am going to merge this as-is and iterate. It looks good enough! |


What issue is this PR fixing?
Changes
Since this is a very large work, I'd be happy to hear everyone opinions on this. Thanks for your time!