-
Notifications
You must be signed in to change notification settings - Fork 548
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
Remove remote read proto definitions from Mimir #8424
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
befd715
Remove remote read proto definitions from Mimir
pracucci 6a62882
Removed reserved field from QueryRequest
pracucci ba9ea69
Rebuilt protobuf
pracucci 83ff708
Removed TestRemoteReadRequestIgnoresHints
pracucci b38545c
Addressed TODOs
pracucci b9e5dbe
Improved unit tests to asserts on queried time range too
pracucci bc34f7f
Configure Prometheus remote read in read-write local dev env
pracucci 3dca14e
Fix linter issue
pracucci 9d92319
Added remote read to backward compatibility integration test
pracucci 688bd93
Replace copy-pasted function with upstream one
pracucci File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Configure Prometheus to read from Mimir, so that we can test Mimir remote read endpoint | ||
# sending queries from Prometheus. | ||
remote_read: | ||
- name: Mimir | ||
url: http://mimir-read-1:8080/prometheus/api/v1/read | ||
remote_timeout: 10s | ||
read_recent: true | ||
headers: | ||
X-Scope-OrgID: anonymous |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -758,7 +758,7 @@ func testMetadataQueriesWithBlocksStorage( | |
require.NoError(t, err) | ||
if st.ok { | ||
require.Equal(t, 1, len(seriesRes), st) | ||
require.Equal(t, model.LabelSet(prompbLabelsToModelMetric(st.resp)), seriesRes[0], st) | ||
require.Equal(t, model.LabelSet(prompbLabelsToMetric(st.resp)), seriesRes[0], st) | ||
} else { | ||
require.Equal(t, 0, len(seriesRes), st) | ||
} | ||
|
@@ -1025,7 +1025,7 @@ func TestHashCollisionHandling(t *testing.T) { | |
}, | ||
}) | ||
expectedVector = append(expectedVector, &model.Sample{ | ||
Metric: prompbLabelsToModelMetric(metric1), | ||
Metric: prompbLabelsToMetric(metric1), | ||
Value: model.SampleValue(float64(0)), | ||
Timestamp: model.Time(tsMillis), | ||
}) | ||
|
@@ -1036,7 +1036,7 @@ func TestHashCollisionHandling(t *testing.T) { | |
}, | ||
}) | ||
expectedVector = append(expectedVector, &model.Sample{ | ||
Metric: prompbLabelsToModelMetric(metric2), | ||
Metric: prompbLabelsToMetric(metric2), | ||
Value: model.SampleValue(float64(1)), | ||
Timestamp: model.Time(tsMillis), | ||
}) | ||
|
@@ -1070,13 +1070,3 @@ func getMetricName(lbls []prompb.Label) string { | |
|
||
panic(fmt.Sprintf("series %v has no metric name", lbls)) | ||
} | ||
|
||
func prompbLabelsToModelMetric(pbLabels []prompb.Label) model.Metric { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note to reviewers: moved to |
||
metric := model.Metric{} | ||
|
||
for _, l := range pbLabels { | ||
metric[model.LabelName(l.Name)] = model.LabelValue(l.Value) | ||
} | ||
|
||
return metric | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Note to reviewers: this change is not a fix. It just makes it easier to look at the diff in case the assertion fails, otherwise it could be misleading seeing
series_1
both as metric name, and as additional key-value label pair.