diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f71eb49ba..0b8a42c8ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## 2.50.0 / 2024-02-22 + +* [CHANGE] Remote Write: Error `storage.ErrTooOldSample` is now generating HTTP error 400 instead of HTTP error 500. #13335 +* [FEATURE] Remote Write: Drop old inmemory samples. Activated using the config entry `sample_age_limit`. #13002 +* [FEATURE] **Experimental**: Add support for ingesting zeros as created timestamps. (enabled under the feature-flag `created-timestamp-zero-ingestion`). #12733 #13279 +* [FEATURE] Promtool: Add `analyze` histograms command. #12331 +* [FEATURE] TSDB/compaction: Add a way to enable overlapping compaction. #13282 #13393 #13398 +* [FEATURE] Add automatic memory limit handling. Activated using the feature flag. `auto-gomemlimit` #13395 +* [ENHANCEMENT] Promtool: allow specifying multiple matchers in `promtool tsdb dump`. #13296 +* [ENHANCEMENT] PromQL: Restore more efficient version of `NewPossibleNonCounterInfo` annotation. #13022 +* [ENHANCEMENT] Kuma SD: Extend configuration to allow users to specify client ID. #13278 +* [ENHANCEMENT] PromQL: Use natural sort in `sort_by_label` and `sort_by_label_desc`. This is **experimental**. #13411 +* [ENHANCEMENT] Native Histograms: support `native_histogram_min_bucket_factor` in scrape_config. #13222 +* [ENHANCEMENT] Native Histograms: Issue warning if histogramRate is applied to the wrong kind of histogram. #13392 +* [ENHANCEMENT] TSDB: Make transaction isolation data structures smaller. #13015 +* [ENHANCEMENT] TSDB/postings: Optimize merge using Loser Tree. #12878 +* [ENHANCEMENT] TSDB: Simplify internal series delete function. #13261 +* [ENHANCEMENT] Agent: Performance improvement by making the global hash lookup table smaller. #13262 +* [ENHANCEMENT] PromQL: faster execution of metric functions, e.g. abs(), rate() #13446 +* [ENHANCEMENT] TSDB: Optimize label values with matchers by taking shortcuts. #13426 +* [ENHANCEMENT] Kubernetes SD: Check preconditions earlier and avoid unnecessary checks or iterations in kube_sd. #13408 +* [ENHANCEMENT] Promtool: Improve visibility for `promtool test rules` with JSON colored formatting. #13342 +* [ENHANCEMENT] Consoles: Exclude iowait and steal from CPU Utilisation. #9593 +* [ENHANCEMENT] Various improvements and optimizations on Native Histograms. #13267, #13215, #13276 #13289, #13340 +* [BUGFIX] Scraping: Fix quality value in HTTP Accept header. #13313 +* [BUGFIX] UI: Fix usage of the function `time()` that was crashing. #13371 +* [BUGFIX] Azure SD: Fix SD crashing when it finds a VM scale set. #13578 + ## 2.49.1 / 2024-01-15 * [BUGFIX] TSDB: Fixed a wrong `q=` value in scrape accept header #13313 diff --git a/VERSION b/VERSION index f5518081bd..9e29315acb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.49.1 +2.50.0 diff --git a/discovery/azure/azure.go b/discovery/azure/azure.go index e5e6109b25..a5d81f4ff6 100644 --- a/discovery/azure/azure.go +++ b/discovery/azure/azure.go @@ -569,7 +569,7 @@ func (client *azureClient) getScaleSetVMs(ctx context.Context, scaleSet armcompu } func mapFromVM(vm armcompute.VirtualMachine) virtualMachine { - osType := string(*vm.Properties.StorageProfile.OSDisk.OSType) + var osType string tags := map[string]*string{} networkInterfaces := []string{} var computerName string @@ -580,6 +580,12 @@ func mapFromVM(vm armcompute.VirtualMachine) virtualMachine { } if vm.Properties != nil { + if vm.Properties.StorageProfile != nil && + vm.Properties.StorageProfile.OSDisk != nil && + vm.Properties.StorageProfile.OSDisk.OSType != nil { + osType = string(*vm.Properties.StorageProfile.OSDisk.OSType) + } + if vm.Properties.NetworkProfile != nil { for _, vmNIC := range vm.Properties.NetworkProfile.NetworkInterfaces { networkInterfaces = append(networkInterfaces, *vmNIC.ID) @@ -608,7 +614,7 @@ func mapFromVM(vm armcompute.VirtualMachine) virtualMachine { } func mapFromVMScaleSetVM(vm armcompute.VirtualMachineScaleSetVM, scaleSetName string) virtualMachine { - osType := string(*vm.Properties.StorageProfile.OSDisk.OSType) + var osType string tags := map[string]*string{} networkInterfaces := []string{} var computerName string @@ -619,6 +625,12 @@ func mapFromVMScaleSetVM(vm armcompute.VirtualMachineScaleSetVM, scaleSetName st } if vm.Properties != nil { + if vm.Properties.StorageProfile != nil && + vm.Properties.StorageProfile.OSDisk != nil && + vm.Properties.StorageProfile.OSDisk.OSType != nil { + osType = string(*vm.Properties.StorageProfile.OSDisk.OSType) + } + if vm.Properties.NetworkProfile != nil { for _, vmNIC := range vm.Properties.NetworkProfile.NetworkInterfaces { networkInterfaces = append(networkInterfaces, *vmNIC.ID) diff --git a/discovery/azure/azure_test.go b/discovery/azure/azure_test.go index 4ff937e0bc..1e437c75f2 100644 --- a/discovery/azure/azure_test.go +++ b/discovery/azure/azure_test.go @@ -79,6 +79,55 @@ func TestMapFromVMWithEmptyTags(t *testing.T) { require.Equal(t, expectedVM, actualVM) } +func TestMapFromVMWithEmptyOSType(t *testing.T) { + id := "test" + name := "name" + size := "size" + vmSize := armcompute.VirtualMachineSizeTypes(size) + vmType := "type" + location := "westeurope" + computerName := "computer_name" + networkProfile := armcompute.NetworkProfile{ + NetworkInterfaces: []*armcompute.NetworkInterfaceReference{}, + } + properties := &armcompute.VirtualMachineProperties{ + OSProfile: &armcompute.OSProfile{ + ComputerName: &computerName, + }, + StorageProfile: &armcompute.StorageProfile{ + OSDisk: &armcompute.OSDisk{}, + }, + NetworkProfile: &networkProfile, + HardwareProfile: &armcompute.HardwareProfile{ + VMSize: &vmSize, + }, + } + + testVM := armcompute.VirtualMachine{ + ID: &id, + Name: &name, + Type: &vmType, + Location: &location, + Tags: nil, + Properties: properties, + } + + expectedVM := virtualMachine{ + ID: id, + Name: name, + ComputerName: computerName, + Type: vmType, + Location: location, + Tags: map[string]*string{}, + NetworkInterfaces: []string{}, + Size: size, + } + + actualVM := mapFromVM(testVM) + + require.Equal(t, expectedVM, actualVM) +} + func TestMapFromVMWithTags(t *testing.T) { id := "test" name := "name" @@ -193,6 +242,58 @@ func TestMapFromVMScaleSetVMWithEmptyTags(t *testing.T) { require.Equal(t, expectedVM, actualVM) } +func TestMapFromVMScaleSetVMWithEmptyOSType(t *testing.T) { + id := "test" + name := "name" + size := "size" + vmSize := armcompute.VirtualMachineSizeTypes(size) + vmType := "type" + instanceID := "123" + location := "westeurope" + computerName := "computer_name" + networkProfile := armcompute.NetworkProfile{ + NetworkInterfaces: []*armcompute.NetworkInterfaceReference{}, + } + properties := &armcompute.VirtualMachineScaleSetVMProperties{ + OSProfile: &armcompute.OSProfile{ + ComputerName: &computerName, + }, + StorageProfile: &armcompute.StorageProfile{}, + NetworkProfile: &networkProfile, + HardwareProfile: &armcompute.HardwareProfile{ + VMSize: &vmSize, + }, + } + + testVM := armcompute.VirtualMachineScaleSetVM{ + ID: &id, + Name: &name, + Type: &vmType, + InstanceID: &instanceID, + Location: &location, + Tags: nil, + Properties: properties, + } + + scaleSet := "testSet" + expectedVM := virtualMachine{ + ID: id, + Name: name, + ComputerName: computerName, + Type: vmType, + Location: location, + Tags: map[string]*string{}, + NetworkInterfaces: []string{}, + ScaleSet: scaleSet, + InstanceID: instanceID, + Size: size, + } + + actualVM := mapFromVMScaleSetVM(testVM, scaleSet) + + require.Equal(t, expectedVM, actualVM) +} + func TestMapFromVMScaleSetVMWithTags(t *testing.T) { id := "test" name := "name" diff --git a/web/ui/module/codemirror-promql/package.json b/web/ui/module/codemirror-promql/package.json index fb13605825..fb199ff5db 100644 --- a/web/ui/module/codemirror-promql/package.json +++ b/web/ui/module/codemirror-promql/package.json @@ -1,6 +1,6 @@ { "name": "@prometheus-io/codemirror-promql", - "version": "0.49.1", + "version": "0.50.0", "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.49.1", + "@prometheus-io/lezer-promql": "0.50.0", "lru-cache": "^7.18.3" }, "devDependencies": { diff --git a/web/ui/module/lezer-promql/package.json b/web/ui/module/lezer-promql/package.json index a6bb3f3eb8..8490a37208 100644 --- a/web/ui/module/lezer-promql/package.json +++ b/web/ui/module/lezer-promql/package.json @@ -1,6 +1,6 @@ { "name": "@prometheus-io/lezer-promql", - "version": "0.49.1", + "version": "0.50.0", "description": "lezer-based PromQL grammar", "main": "dist/index.cjs", "type": "module", diff --git a/web/ui/package-lock.json b/web/ui/package-lock.json index 5f1db6ce0a..62aad79727 100644 --- a/web/ui/package-lock.json +++ b/web/ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "prometheus-io", - "version": "0.49.1", + "version": "0.50.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "prometheus-io", - "version": "0.49.1", + "version": "0.50.0", "workspaces": [ "react-app", "module/*" @@ -30,10 +30,10 @@ }, "module/codemirror-promql": { "name": "@prometheus-io/codemirror-promql", - "version": "0.49.1", + "version": "0.50.0", "license": "Apache-2.0", "dependencies": { - "@prometheus-io/lezer-promql": "0.49.1", + "@prometheus-io/lezer-promql": "0.50.0", "lru-cache": "^7.18.3" }, "devDependencies": { @@ -69,7 +69,7 @@ }, "module/lezer-promql": { "name": "@prometheus-io/lezer-promql", - "version": "0.49.1", + "version": "0.50.0", "license": "Apache-2.0", "devDependencies": { "@lezer/generator": "^1.5.1", @@ -19233,7 +19233,7 @@ }, "react-app": { "name": "@prometheus-io/app", - "version": "0.49.1", + "version": "0.50.0", "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.49.1", + "@prometheus-io/codemirror-promql": "0.50.0", "bootstrap": "^4.6.2", "css.escape": "^1.5.1", "downshift": "^7.6.2", diff --git a/web/ui/package.json b/web/ui/package.json index 026c1663b3..af6bc6ddd0 100644 --- a/web/ui/package.json +++ b/web/ui/package.json @@ -28,5 +28,5 @@ "ts-jest": "^29.1.1", "typescript": "^4.9.5" }, - "version": "0.49.1" + "version": "0.50.0" } diff --git a/web/ui/react-app/package.json b/web/ui/react-app/package.json index 33fccf5c7c..1164b0f774 100644 --- a/web/ui/react-app/package.json +++ b/web/ui/react-app/package.json @@ -1,6 +1,6 @@ { "name": "@prometheus-io/app", - "version": "0.49.1", + "version": "0.50.0", "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.49.1", + "@prometheus-io/codemirror-promql": "0.50.0", "bootstrap": "^4.6.2", "css.escape": "^1.5.1", "downshift": "^7.6.2",