Skip to content
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

Merge upstream prometheus/prometheus at 4ac7806 #613

Closed
wants to merge 54 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
94d1309
build(deps): bump actions/cache from 4.0.1 to 4.0.2
dependabot[bot] Mar 21, 2024
0c58987
build(deps): bump actions/setup-node from 4.0.1 to 4.0.2
dependabot[bot] Mar 21, 2024
191c467
build(deps): bump github.com/Azure/azure-sdk-for-go/sdk/resourcemanag…
dependabot[bot] Mar 21, 2024
44f385f
Support expansion of native histogram values in alert templates
suntala Mar 12, 2024
9a7c6a5
Support native histogram values in template functions
suntala Mar 26, 2024
8bd6ae1
Notifier: fix deadlock when zero alerts
simonpasquier Mar 29, 2024
c97a066
Merge pull request #13861 from simonpasquier/fix-sendall-deadlock
bboreham Mar 29, 2024
a1d4fc7
build(deps): bump actions/checkout from 4.1.1 to 4.1.2
dependabot[bot] Apr 1, 2024
1eb88a8
build(deps): bump github.com/prometheus/prometheus
dependabot[bot] Apr 1, 2024
785f761
build(deps): bump bufbuild/buf-breaking-action from 1.1.2 to 1.1.4
dependabot[bot] Apr 1, 2024
b9453ff
build(deps): bump bufbuild/buf-lint-action from 1.1.0 to 1.1.1
dependabot[bot] Apr 1, 2024
c14a158
Signed-off-by: hanghuge <cmoman@outlook.com>
hanghuge Apr 6, 2024
d496687
golangci-lint: enable usestdlibvars linter
mmorel-35 Apr 8, 2024
f07f4f2
List Prometheus v3 coordinators in MAINTAINERS.md
beorn7 Apr 4, 2024
b4c0ab5
Cut release 2.51.2
bboreham Apr 9, 2024
adf9939
Merge pull request #13906 from mmorel-35/usestdlibvars
bboreham Apr 10, 2024
594b317
Merge pull request #13898 from hanghuge/main
bboreham Apr 10, 2024
e1dd8e7
Merge branch 'main' into merge-2.51.2-into-main
bboreham Apr 10, 2024
6f595c6
golangci-lint: enable whitespace linter (#13905)
mmorel-35 Apr 11, 2024
3b8fe00
tsdb/wlog: unregister metrics on WL close
GiedriusS Apr 11, 2024
2a43026
Merge pull request #13913 from prometheus/merge-2.51.2-into-main
bboreham Apr 11, 2024
612de02
Adds Inf and NaN as Numbers to Histogram in Promql Testing Framework …
NeerajGartia21 Apr 11, 2024
4ec5c25
Merge pull request #13731 from suntala/suntala/native-histogram-template
beorn7 Apr 11, 2024
4a6f870
parser: remake generated_parser output (#13923)
ywwg Apr 13, 2024
b938bbc
Merge pull request #13891 from prometheus/beorn7/maintainers
beorn7 Apr 16, 2024
7704cde
discovery(k8s): add metadata labels to endpointslices
simonpasquier Apr 12, 2024
bdf4907
tsdb/wlog: add test for metrics unregistering
GiedriusS Apr 18, 2024
dff4c06
Merge pull request #13817 from prometheus/dependabot/go_modules/githu…
ArthurSens Apr 18, 2024
1030205
Merge pull request #13867 from prometheus/dependabot/go_modules/docum…
ArthurSens Apr 18, 2024
ee42e63
Merge pull request #13810 from prometheus/dependabot/github_actions/a…
ArthurSens Apr 18, 2024
4557da8
Merge pull request #13811 from prometheus/dependabot/github_actions/a…
ArthurSens Apr 18, 2024
1bab595
Merge pull request #13812 from prometheus/dependabot/github_actions/a…
ArthurSens Apr 18, 2024
4aca4e2
build(deps): bump github.com/prometheus/common
dependabot[bot] Apr 18, 2024
9faf105
Merge pull request #13952 from prometheus/dependabot/go_modules/docum…
ArthurSens Apr 18, 2024
c152b02
Update Go dependencies before 2.52
Apr 18, 2024
8543f48
Downgrade k8s apis back to v0.29.3
Apr 18, 2024
bcb3e2c
Downgrade github.com/ovh/go-ovh back to v1.4.3
Apr 18, 2024
b5b5e1e
Merge pull request #13919 from GiedriusS/dont_forget_to_unregister
ArthurSens Apr 18, 2024
f36915b
Merge pull request #13935 from simonpasquier/more-endpointslices-meta…
simonpasquier Apr 19, 2024
0f222ed
Merge pull request #13954 from prometheus/update-go-modules
ArthurSens Apr 20, 2024
cd078b0
build(deps): bump github.com/hetznercloud/hcloud-go/v2
dependabot[bot] Apr 20, 2024
f65e94b
build(deps): bump github.com/aws/aws-sdk-go from 1.51.24 to 1.51.25
dependabot[bot] Apr 20, 2024
97eab68
Merge pull request #13873 from prometheus/dependabot/github_actions/b…
SuperQ Apr 20, 2024
8cd7e04
Merge pull request #13874 from prometheus/dependabot/github_actions/b…
SuperQ Apr 20, 2024
a903ef8
Merge pull request #13961 from prometheus/dependabot/go_modules/githu…
ArthurSens Apr 22, 2024
76b0318
Merge pull request #13962 from prometheus/dependabot/go_modules/githu…
ArthurSens Apr 22, 2024
e7219e3
Rule Manager: Add `rule_group_last_restore_duration_seconds` to measu…
gotjosh Apr 23, 2024
bd18787
promtool: Fix panic on extended tsdb analyze (#13976)
wbh1 Apr 24, 2024
381a77a
Change variable name to `restoreStartTime` from `now` and introduce a…
gotjosh Apr 24, 2024
d672eda
Add a changelog entry
gotjosh Apr 24, 2024
5beb2fe
Improve the metric description
gotjosh Apr 24, 2024
d15869a
Avoid creating new slices for labels values on postings for matchers …
alanprot Apr 24, 2024
4ac7806
Merge pull request #13974 from prometheus/measure-restore-time-rules
gotjosh Apr 24, 2024
0ebe215
Merge remote-tracking branch 'upstream/main' into gotjosh/merge-upstream
gotjosh Apr 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/container_description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
steps:
- name: git checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Set docker hub repo name
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
- name: Push README to Dockerhub
Expand All @@ -37,7 +37,7 @@ jobs:
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
steps:
- name: git checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Set quay.io org name
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV
- name: Set quay.io repo name
Expand Down
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ linters:
- testifylint
- unconvert
- unused
- usestdlibvars
- whitespace

issues:
max-same-issues: 0
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
## unreleased

* [CHANGE] TSDB: Fix the predicate checking for blocks which are beyond the retention period to include the ones right at the retention boundary. #9633
* [ENHANCEMENT] Rules: Add `rule_group_last_restore_duration_seconds` to measure the time it takes to restore a rule group. #13974

## 2.51.2 / 2024-04-09

Bugfix release.

[BUGFIX] Notifier: could hang when using relabeling on alerts #13861

## 2.51.1 / 2024-03-27

Expand Down
10 changes: 10 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,13 @@ size of this repository, the natural changes in focus of maintainers over time,
and nuances of where particular features live, this list will always be
incomplete and out of date. However the listed maintainer(s) should be able to
direct a PR/question to the right person.

v3 release coordinators:
* Alex Greenbank (<alex.greenbank@grafana.com> / @alexgreenbank)
* Carrie Edwards (<carrie.edwards@grafana.com> / @carrieedwards)
* Fiona Liao (<fiona.liao@grafana.com> / @fionaliao)
* Jan Fajerski (<github@fajerski.name> / @jan--f)
* Jesús Vázquez (<jesus.vazquez@grafana.com> / @jesusvazquez)
* Nico Pazos (<nicolas.pazos-mendez@grafana.com> / @npazosmendez)
* Owen Williams (<owen.williams@grafana.com> / @ywwg)
* Tom Braack (<me@shorez.de> / @sh0rez)
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ ifeq (, $(shell command -v goyacc 2> /dev/null))
@echo "goyacc not installed so skipping"
@echo "To install: go install golang.org/x/tools/cmd/goyacc@v0.6.0"
else
goyacc -o promql/parser/generated_parser.y.go promql/parser/generated_parser.y
goyacc -l -o promql/parser/generated_parser.y.go promql/parser/generated_parser.y
endif

.PHONY: test
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.51.1
2.51.2
2 changes: 1 addition & 1 deletion cmd/promtool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ func CheckServerStatus(serverURL *url.URL, checkEndpoint string, roundTripper ht
return err
}

request, err := http.NewRequest("GET", config.Address, nil)
request, err := http.NewRequest(http.MethodGet, config.Address, nil)
if err != nil {
return err
}
Expand Down
1 change: 0 additions & 1 deletion cmd/promtool/rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func TestBackfillRuleIntegration(t *testing.T) {
// Execute the test more than once to simulate running the rule importer twice with the same data.
// We expect duplicate blocks with the same series are created when run more than once.
for i := 0; i < tt.runcount; i++ {

ruleImporter, err := newTestRuleImporter(ctx, start, tmpDir, tt.samples, tt.maxBlockDuration)
require.NoError(t, err)
path1 := filepath.Join(tmpDir, "test.file")
Expand Down
4 changes: 4 additions & 0 deletions cmd/promtool/tsdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,10 @@ func backfillOpenMetrics(path, outputDir string, humanReadable, quiet bool, maxB
}

func displayHistogram(dataType string, datas []int, total int) {
if len(datas) == 0 {
fmt.Printf("%s: N/A\n\n", dataType)
return
}
slices.Sort(datas)
start, end, step := generateBucket(datas[0], datas[len(datas)-1])
sum := 0
Expand Down
2 changes: 1 addition & 1 deletion discovery/eureka/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const appListPath string = "/apps"
func fetchApps(ctx context.Context, server string, client *http.Client) (*Applications, error) {
url := fmt.Sprintf("%s%s", server, appListPath)

request, err := http.NewRequest("GET", url, nil)
request, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
return nil, err
}
Expand Down
1 change: 0 additions & 1 deletion discovery/eureka/eureka.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ func targetsForApp(app *Application) []model.LabelSet {
}

targets = append(targets, target)

}
return targets
}
Expand Down
3 changes: 1 addition & 2 deletions discovery/hetzner/robot.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func newRobotDiscovery(conf *SDConfig, _ log.Logger) (*robotDiscovery, error) {
}

func (d *robotDiscovery) refresh(context.Context) ([]*targetgroup.Group, error) {
req, err := http.NewRequest("GET", d.endpoint+"/server", nil)
req, err := http.NewRequest(http.MethodGet, d.endpoint+"/server", nil)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -122,7 +122,6 @@ func (d *robotDiscovery) refresh(context.Context) ([]*targetgroup.Group, error)
labels[hetznerLabelPublicIPv6Network] = model.LabelValue(fmt.Sprintf("%s/%s", subnet.IP, subnet.Mask))
break
}

}
targets[i] = labels
}
Expand Down
2 changes: 1 addition & 1 deletion discovery/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func NewDiscovery(conf *SDConfig, logger log.Logger, clientOpts []config.HTTPCli
}

func (d *Discovery) Refresh(ctx context.Context) ([]*targetgroup.Group, error) {
req, err := http.NewRequest("GET", d.url, nil)
req, err := http.NewRequest(http.MethodGet, d.url, nil)
if err != nil {
return nil, err
}
Expand Down
10 changes: 10 additions & 0 deletions discovery/kubernetes/endpointslice.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ const (
endpointSliceEndpointConditionsReadyLabel = metaLabelPrefix + "endpointslice_endpoint_conditions_ready"
endpointSliceEndpointConditionsServingLabel = metaLabelPrefix + "endpointslice_endpoint_conditions_serving"
endpointSliceEndpointConditionsTerminatingLabel = metaLabelPrefix + "endpointslice_endpoint_conditions_terminating"
endpointSliceEndpointZoneLabel = metaLabelPrefix + "endpointslice_endpoint_zone"
endpointSliceEndpointHostnameLabel = metaLabelPrefix + "endpointslice_endpoint_hostname"
endpointSliceEndpointNodenameLabel = metaLabelPrefix + "endpointslice_endpoint_node_name"
endpointSliceAddressTargetKindLabel = metaLabelPrefix + "endpointslice_address_target_kind"
endpointSliceAddressTargetNameLabel = metaLabelPrefix + "endpointslice_address_target_name"
endpointSliceEndpointTopologyLabelPrefix = metaLabelPrefix + "endpointslice_endpoint_topology_"
Expand Down Expand Up @@ -338,6 +340,14 @@ func (e *EndpointSlice) buildEndpointSlice(eps endpointSliceAdaptor) *targetgrou
target[model.LabelName(endpointSliceAddressTargetNameLabel)] = lv(ep.targetRef().Name)
}

if ep.nodename() != nil {
target[endpointSliceEndpointNodenameLabel] = lv(*ep.nodename())
}

if ep.zone() != nil {
target[model.LabelName(endpointSliceEndpointZoneLabel)] = lv(*ep.zone())
}

for k, v := range ep.topology() {
ln := strutil.SanitizeLabelName(k)
target[model.LabelName(endpointSliceEndpointTopologyLabelPrefix+ln)] = lv(v)
Expand Down
9 changes: 9 additions & 0 deletions discovery/kubernetes/endpointslice_adaptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ type endpointSliceEndpointAdaptor interface {
addresses() []string
hostname() *string
nodename() *string
zone() *string
conditions() endpointSliceEndpointConditionsAdaptor
targetRef() *corev1.ObjectReference
topology() map[string]string
Expand Down Expand Up @@ -181,6 +182,10 @@ func (e *endpointSliceEndpointAdaptorV1) nodename() *string {
return e.endpoint.NodeName
}

func (e *endpointSliceEndpointAdaptorV1) zone() *string {
return e.endpoint.Zone
}

func (e *endpointSliceEndpointAdaptorV1) conditions() endpointSliceEndpointConditionsAdaptor {
return newEndpointSliceEndpointConditionsAdaptorFromV1(e.endpoint.Conditions)
}
Expand Down Expand Up @@ -233,6 +238,10 @@ func (e *endpointSliceEndpointAdaptorV1beta1) nodename() *string {
return e.endpoint.NodeName
}

func (e *endpointSliceEndpointAdaptorV1beta1) zone() *string {
return nil
}

func (e *endpointSliceEndpointAdaptorV1beta1) conditions() endpointSliceEndpointConditionsAdaptor {
return newEndpointSliceEndpointConditionsAdaptorFromV1beta1(e.endpoint.Conditions)
}
Expand Down
Loading
Loading