-
Notifications
You must be signed in to change notification settings - Fork 51
Add remote write 2 sender compliance tests #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]>
| compliance tests for PromQL correctness. It's designed for smaller in-place quick unit tests, e.g. on per-PR basis, using docker based test framework. Useful as an acceptance tests | ||
| for vendors or those who wish to maintain high Prometheus compatibility over time. | ||
|
|
||
| ## Remote Write: Sender |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO(to myself or others): Link receiver while we are at it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also requires Go 1.23+ no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I dont know, probably not as the receiver readme.md doesn't mention this.
bwplotka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
| dir: | ||
| - alert_generator | ||
| - promql | ||
| - remotewrite/sender |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be updated with Prometheus main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping (: @pipiland2612
I would love to merge this compliance framework 👍🏽
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: pipiland2612 <[email protected]>

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!