Browse Source

Merge pull request #14171 from prometheus/resolveconflicts-2.52.1

Merge release-2.52 back to main
pull/14197/head
Arthur Silva Sens 6 months ago committed by GitHub
parent
commit
efbd6e41c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      CHANGELOG.md
  2. 2
      VERSION
  3. 23
      discovery/linode/linode.go
  4. 4
      web/ui/module/codemirror-promql/package.json
  5. 2
      web/ui/module/lezer-promql/package.json
  6. 14
      web/ui/package-lock.json
  7. 2
      web/ui/package.json
  8. 4
      web/ui/react-app/package.json

6
CHANGELOG.md

@ -10,11 +10,11 @@
* [BUGFIX] OTLP: Don't generate target_info unless at least one identifying label is defined. #13991
* [BUGFIX] OTLP: Don't generate target_info unless there are metrics. #13991
## 2.52.0-rc.1 / 2024-05-03
## 2.52.1 / 2024-05-29
* [BUGFIX] API: Fix missing comma during JSON encoding of API results. #14047
* [BUGFIX] Linode SD: Fix partial fetch when discovery would return more than 500 elements. #14141
## 2.52.0-rc.0 / 2024-04-22
## 2.52.0 / 2024-05-07
* [CHANGE] TSDB: Fix the predicate checking for blocks which are beyond the retention period to include the ones right at the retention boundary. #9633
* [FEATURE] Kubernetes SD: Add a new metric `prometheus_sd_kubernetes_failures_total` to track failed requests to Kubernetes API. #13554

2
VERSION

@ -1 +1 @@
2.52.0-rc.1
2.52.1

23
discovery/linode/linode.go

@ -186,12 +186,12 @@ func (d *Discovery) refresh(ctx context.Context) ([]*targetgroup.Group, error) {
if d.lastResults != nil && d.eventPollingEnabled {
// Check to see if there have been any events. If so, refresh our data.
opts := linodego.ListOptions{
eventsOpts := linodego.ListOptions{
PageOptions: &linodego.PageOptions{Page: 1},
PageSize: 25,
Filter: fmt.Sprintf(filterTemplate, d.lastRefreshTimestamp.Format("2006-01-02T15:04:05")),
}
events, err := d.client.ListEvents(ctx, &opts)
events, err := d.client.ListEvents(ctx, &eventsOpts)
if err != nil {
var e *linodego.Error
if errors.As(err, &e) && e.Code == http.StatusUnauthorized {
@ -232,31 +232,40 @@ func (d *Discovery) refreshData(ctx context.Context) ([]*targetgroup.Group, erro
tg := &targetgroup.Group{
Source: "Linode",
}
opts := linodego.ListOptions{
// We need 3 of these because Linodego writes into the structure during pagination
listInstancesOpts := linodego.ListOptions{
PageSize: 500,
}
listIPAddressesOpts := linodego.ListOptions{
PageSize: 500,
}
listIPv6RangesOpts := linodego.ListOptions{
PageSize: 500,
}
// If region filter provided, use it to constrain results.
if d.region != "" {
opts.Filter = fmt.Sprintf(regionFilterTemplate, d.region)
listInstancesOpts.Filter = fmt.Sprintf(regionFilterTemplate, d.region)
listIPAddressesOpts.Filter = fmt.Sprintf(regionFilterTemplate, d.region)
listIPv6RangesOpts.Filter = fmt.Sprintf(regionFilterTemplate, d.region)
}
// Gather all linode instances.
instances, err := d.client.ListInstances(ctx, &opts)
instances, err := d.client.ListInstances(ctx, &listInstancesOpts)
if err != nil {
d.metrics.failuresCount.Inc()
return nil, err
}
// Gather detailed IP address info for all IPs on all linode instances.
detailedIPs, err := d.client.ListIPAddresses(ctx, &opts)
detailedIPs, err := d.client.ListIPAddresses(ctx, &listIPAddressesOpts)
if err != nil {
d.metrics.failuresCount.Inc()
return nil, err
}
// Gather detailed IPv6 Range info for all linode instances.
ipv6RangeList, err := d.client.ListIPv6Ranges(ctx, &opts)
ipv6RangeList, err := d.client.ListIPv6Ranges(ctx, &listIPv6RangesOpts)
if err != nil {
d.metrics.failuresCount.Inc()
return nil, err

4
web/ui/module/codemirror-promql/package.json

@ -1,6 +1,6 @@
{
"name": "@prometheus-io/codemirror-promql",
"version": "0.52.0-rc.1",
"version": "0.52.1",
"description": "a CodeMirror mode for the PromQL language",
"types": "dist/esm/index.d.ts",
"module": "dist/esm/index.js",
@ -29,7 +29,7 @@
},
"homepage": "https://github.com/prometheus/prometheus/blob/main/web/ui/module/codemirror-promql/README.md",
"dependencies": {
"@prometheus-io/lezer-promql": "0.52.0-rc.1",
"@prometheus-io/lezer-promql": "0.52.1",
"lru-cache": "^7.18.3"
},
"devDependencies": {

2
web/ui/module/lezer-promql/package.json

@ -1,6 +1,6 @@
{
"name": "@prometheus-io/lezer-promql",
"version": "0.52.0-rc.1",
"version": "0.52.1",
"description": "lezer-based PromQL grammar",
"main": "dist/index.cjs",
"type": "module",

14
web/ui/package-lock.json generated

@ -1,12 +1,12 @@
{
"name": "prometheus-io",
"version": "0.52.0-rc.1",
"version": "0.52.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "prometheus-io",
"version": "0.52.0-rc.1",
"version": "0.52.1",
"workspaces": [
"react-app",
"module/*"
@ -30,10 +30,10 @@
},
"module/codemirror-promql": {
"name": "@prometheus-io/codemirror-promql",
"version": "0.52.0-rc.1",
"version": "0.52.1",
"license": "Apache-2.0",
"dependencies": {
"@prometheus-io/lezer-promql": "0.52.0-rc.1",
"@prometheus-io/lezer-promql": "0.52.1",
"lru-cache": "^7.18.3"
},
"devDependencies": {
@ -69,7 +69,7 @@
},
"module/lezer-promql": {
"name": "@prometheus-io/lezer-promql",
"version": "0.52.0-rc.1",
"version": "0.52.1",
"license": "Apache-2.0",
"devDependencies": {
"@lezer/generator": "^1.5.1",
@ -19233,7 +19233,7 @@
},
"react-app": {
"name": "@prometheus-io/app",
"version": "0.52.0-rc.1",
"version": "0.52.1",
"dependencies": {
"@codemirror/autocomplete": "^6.11.1",
"@codemirror/commands": "^6.3.2",
@ -19251,7 +19251,7 @@
"@lezer/lr": "^1.3.14",
"@nexucis/fuzzy": "^0.4.1",
"@nexucis/kvsearch": "^0.8.1",
"@prometheus-io/codemirror-promql": "0.52.0-rc.1",
"@prometheus-io/codemirror-promql": "0.52.1",
"bootstrap": "^4.6.2",
"css.escape": "^1.5.1",
"downshift": "^7.6.2",

2
web/ui/package.json

@ -28,5 +28,5 @@
"ts-jest": "^29.1.1",
"typescript": "^4.9.5"
},
"version": "0.52.0-rc.1"
"version": "0.52.1"
}

4
web/ui/react-app/package.json

@ -1,6 +1,6 @@
{
"name": "@prometheus-io/app",
"version": "0.52.0-rc.1",
"version": "0.52.1",
"private": true,
"dependencies": {
"@codemirror/autocomplete": "^6.11.1",
@ -19,7 +19,7 @@
"@lezer/lr": "^1.3.14",
"@nexucis/fuzzy": "^0.4.1",
"@nexucis/kvsearch": "^0.8.1",
"@prometheus-io/codemirror-promql": "0.52.0-rc.1",
"@prometheus-io/codemirror-promql": "0.52.1",
"bootstrap": "^4.6.2",
"css.escape": "^1.5.1",
"downshift": "^7.6.2",

Loading…
Cancel
Save