remote: Add metadata validation to TestSampleDelivery for v2 protocol#16721
Merged
bwplotka merged 5 commits intoprometheus:mainfrom Jul 29, 2025
Merged
Conversation
Update TestSampleDelivery test to check for metadata in remote write 2.0 protocol as requested in issue prometheus#14414. Changes: - Fix v2RequestToWriteRequest to properly convert v2 metadata to v1 format - Add expectMetadata and expectMetadataForBatch methods to TestWriteClient - Update TestSampleDelivery to validate metadata for v2 protocol test cases - Ensure metadata is only expected for series that have data in each batch This addresses the TODO comment about testing metadata in the 2.0 protocol and ensures that all data types (samples, exemplars, histograms, and metadata) are properly validated in the TestSampleDelivery test. Fixes prometheus#14414 Signed-off-by: TYZ <ashaolinking@gmail.com> Signed-off-by: TYZ <tyz666@bu.edu>
- Remove unnecessary type conversion in expectMetadataForBatch - Remove unused expectMetadata function as only expectMetadataForBatch is used Fixes golangci-lint warnings: - unconvert: unnecessary conversion - unused: func expectMetadata is unused Signed-off-by: TYZ <tyz666@bu.edu>
bwplotka
reviewed
Jun 17, 2025
Member
|
Some small nits only. |
Final implementation of metadata validation in TestSampleDelivery for v2 protocol, including proper error handling and assertion logic. Signed-off-by: TYZ <tyz666@bu.edu>
5827bb3 to
89ec07f
Compare
cstyan
reviewed
Jun 18, 2025
Co-authored-by: Callum Styan <callumstyan@gmail.com> Signed-off-by: AxcelXander <72107018+AxcelXander@users.noreply.github.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com> Signed-off-by: Callum Styan <callumstyan@gmail.com>
tcp13equals2
pushed a commit
to tcp13equals2/prometheus
that referenced
this pull request
Aug 18, 2025
…metadata-test remote: Add metadata validation to TestSampleDelivery for v2 protocol Signed-off-by: Andrew Hall <andrew.hall@grafana.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update TestSampleDelivery test to check for metadata in remote write 2.0 protocol as requested in issue #14414.
Changes:
This addresses the TODO comment about testing metadata in the 2.0 protocol and ensures that all data types (samples, exemplars, histograms, and metadata) are properly validated in the TestSampleDelivery test.
Fixes #14414