--time | Query evaluation time (RFC3339 or Unix timestamp). |
+| --header | Extra headers to send to server. |
diff --git a/rules/alerting_test.go b/rules/alerting_test.go
index e2586ee959..cb16a84daf 100644
--- a/rules/alerting_test.go
+++ b/rules/alerting_test.go
@@ -16,6 +16,7 @@ package rules
import (
"context"
"errors"
+ "runtime"
"testing"
"time"
@@ -538,8 +539,11 @@ instance: {{ $v.Labels.instance }}, value: {{ printf "%.0f" $v.Value }};
close(startQueryCh)
select {
case <-getDoneCh:
- case <-time.After(time.Millisecond * 10):
+ case <-time.After(20 * time.Millisecond):
// Assert no blocking when template expanding.
+ buf := make([]byte, 1<<20)
+ n := runtime.Stack(buf, true)
+ t.Logf("goroutine dump:\n%s", buf[:n])
require.Fail(t, "unexpected blocking when template expanding.")
}
}
diff --git a/web/api/v1/api.go b/web/api/v1/api.go
index 6e61fd19c6..c236f402d3 100644
--- a/web/api/v1/api.go
+++ b/web/api/v1/api.go
@@ -443,7 +443,6 @@ func (api *API) Register(r *route.Router) {
r.Get("/series", wrapAgent(api.series))
r.Post("/series", wrapAgent(api.series))
- r.Del("/series", wrapAgent(api.dropSeries))
r.Get("/scrape_pools", wrap(api.scrapePools))
r.Get("/targets", wrap(api.targets))
@@ -1047,10 +1046,6 @@ func (api *API) series(r *http.Request) (result apiFuncResult) {
return apiFuncResult{metrics, nil, warnings, closer}
}
-func (*API) dropSeries(*http.Request) apiFuncResult {
- return apiFuncResult{nil, &apiError{errorInternal, errors.New("not implemented")}, nil, nil}
-}
-
// Target has the information for one target.
type Target struct {
// Labels before any processing.
diff --git a/web/api/v1/api_test.go b/web/api/v1/api_test.go
index 48fb3b57c1..9b5b0af37f 100644
--- a/web/api/v1/api_test.go
+++ b/web/api/v1/api_test.go
@@ -61,6 +61,7 @@ import (
"github.com/prometheus/prometheus/util/stats"
"github.com/prometheus/prometheus/util/teststorage"
"github.com/prometheus/prometheus/util/testutil"
+ "github.com/prometheus/prometheus/web/api/testhelpers"
)
var testParser = parser.NewParser(parser.Options{})
@@ -1768,10 +1769,6 @@ func testEndpoints(t *testing.T, api *API, tr *testTargetRetriever, testLabelAPI
endpoint: api.series,
errType: errorBadData,
},
- {
- endpoint: api.dropSeries,
- errType: errorInternal,
- },
{
endpoint: api.targets,
response: &TargetDiscovery{
@@ -4931,3 +4928,19 @@ func (*fakeQuery) Cancel() {}
func (q *fakeQuery) String() string {
return q.query
}
+
+// TestDeleteSeriesEndpointRemoved verifies that the deprecated DELETE /api/v1/series
+// endpoint is no longer registered and does not return HTTP 500 "not implemented".
+func TestDeleteSeriesEndpointRemoved(t *testing.T) {
+ api := newTestAPI(t, testhelpers.APIConfig{})
+
+ req := httptest.NewRequest(http.MethodDelete, "/api/v1/series", http.NoBody)
+ recorder := httptest.NewRecorder()
+ api.Handler.ServeHTTP(recorder, req)
+
+ // The endpoint previously returned HTTP 500 with "not implemented".
+ // After removal, the router should no longer match DELETE on /series,
+ // so we must not get the old 500 error.
+ require.NotEqual(t, http.StatusInternalServerError, recorder.Code,
+ "DELETE /api/v1/series should no longer return 500; the endpoint has been removed")
+}
diff --git a/web/api/v1/openapi_examples.go b/web/api/v1/openapi_examples.go
index 50e155b184..a1db5d5f3b 100644
--- a/web/api/v1/openapi_examples.go
+++ b/web/api/v1/openapi_examples.go
@@ -914,20 +914,6 @@ func cleanTombstonesResponseExamples() *orderedmap.Map[string, *base.Example] {
return examples
}
-// seriesDeleteResponseExamples returns examples for DELETE /series response.
-func seriesDeleteResponseExamples() *orderedmap.Map[string, *base.Example] {
- examples := orderedmap.New[string, *base.Example]()
-
- examples.Set("seriesDeleted", &base.Example{
- Summary: "Series marked for deletion",
- Value: createYAMLNode(map[string]any{
- "status": "success",
- }),
- })
-
- return examples
-}
-
// snapshotResponseExamples returns examples for /admin/tsdb/snapshot response.
func snapshotResponseExamples() *orderedmap.Map[string, *base.Example] {
examples := orderedmap.New[string, *base.Example]()
diff --git a/web/api/v1/openapi_paths.go b/web/api/v1/openapi_paths.go
index 2f5ab592f7..b2622f4ff0 100644
--- a/web/api/v1/openapi_paths.go
+++ b/web/api/v1/openapi_paths.go
@@ -224,13 +224,6 @@ func (*OpenAPIBuilder) seriesPath() *v3.PathItem {
RequestBody: formRequestBodyWithExamples("SeriesPostInputBody", seriesPostExamples(), "Submit a series query. This endpoint accepts the same parameters as the GET version."),
Responses: responsesWithErrorExamples("SeriesOutputBody", seriesResponseExamples(), errorResponseExamples(), "Series returned matching the provided label matchers via POST.", "Error retrieving series via POST."),
},
- Delete: &v3.Operation{
- OperationId: "delete-series",
- Summary: "Delete series",
- Description: "Delete series matching selectors. Note: This is deprecated, use POST /admin/tsdb/delete_series instead.",
- Tags: []string{"series"},
- Responses: responsesWithErrorExamples("SeriesDeleteOutputBody", seriesDeleteResponseExamples(), errorResponseExamples(), "Series marked for deletion.", "Error deleting series."),
- },
}
}
diff --git a/web/api/v1/openapi_schemas.go b/web/api/v1/openapi_schemas.go
index de39b43e37..ac298ac0bd 100644
--- a/web/api/v1/openapi_schemas.go
+++ b/web/api/v1/openapi_schemas.go
@@ -58,7 +58,6 @@ func (b *OpenAPIBuilder) buildComponents() *v3.Components {
// Series schemas.
schemas.Set("SeriesOutputBody", b.labelsArrayResponseBodySchema())
schemas.Set("SeriesPostInputBody", b.seriesPostInputBodySchema())
- schemas.Set("SeriesDeleteOutputBody", b.simpleResponseBodySchema())
// Metadata schemas.
schemas.Set("Metadata", b.metadataSchema())
diff --git a/web/api/v1/testdata/openapi_3.1_golden.yaml b/web/api/v1/testdata/openapi_3.1_golden.yaml
index b1514f209d..47f3d06621 100644
--- a/web/api/v1/testdata/openapi_3.1_golden.yaml
+++ b/web/api/v1/testdata/openapi_3.1_golden.yaml
@@ -1182,37 +1182,6 @@ paths:
error: TSDB not ready
errorType: internal
status: error
- delete:
- tags:
- - series
- summary: Delete series
- description: 'Delete series matching selectors. Note: This is deprecated, use POST /admin/tsdb/delete_series instead.'
- operationId: delete-series
- responses:
- "200":
- description: Series marked for deletion.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SeriesDeleteOutputBody'
- examples:
- seriesDeleted:
- summary: Series marked for deletion
- value:
- status: success
- default:
- description: Error deleting series.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- tsdbNotReady:
- summary: TSDB not ready
- value:
- error: TSDB not ready
- errorType: internal
- status: error
/metadata:
get:
tags:
@@ -3224,35 +3193,6 @@ components:
- match[]
additionalProperties: false
description: POST request body for series query.
- SeriesDeleteOutputBody:
- type: object
- properties:
- status:
- type: string
- enum:
- - success
- - error
- description: Response status.
- example: success
- data:
- description: Response data (structure varies by endpoint).
- example:
- result: ok
- warnings:
- type: array
- items:
- type: string
- description: Only set if there were warnings while executing the request. There will still be data in the data field.
- infos:
- type: array
- items:
- type: string
- description: Only set if there were info-level annotations while executing the request.
- required:
- - status
- - data
- additionalProperties: false
- description: Generic response body.
Metadata:
type: object
properties:
diff --git a/web/api/v1/testdata/openapi_3.2_golden.yaml b/web/api/v1/testdata/openapi_3.2_golden.yaml
index fa79fffecc..7766f86f39 100644
--- a/web/api/v1/testdata/openapi_3.2_golden.yaml
+++ b/web/api/v1/testdata/openapi_3.2_golden.yaml
@@ -1182,37 +1182,6 @@ paths:
error: TSDB not ready
errorType: internal
status: error
- delete:
- tags:
- - series
- summary: Delete series
- description: 'Delete series matching selectors. Note: This is deprecated, use POST /admin/tsdb/delete_series instead.'
- operationId: delete-series
- responses:
- "200":
- description: Series marked for deletion.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SeriesDeleteOutputBody'
- examples:
- seriesDeleted:
- summary: Series marked for deletion
- value:
- status: success
- default:
- description: Error deleting series.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- tsdbNotReady:
- summary: TSDB not ready
- value:
- error: TSDB not ready
- errorType: internal
- status: error
/metadata:
get:
tags:
@@ -3262,35 +3231,6 @@ components:
- match[]
additionalProperties: false
description: POST request body for series query.
- SeriesDeleteOutputBody:
- type: object
- properties:
- status:
- type: string
- enum:
- - success
- - error
- description: Response status.
- example: success
- data:
- description: Response data (structure varies by endpoint).
- example:
- result: ok
- warnings:
- type: array
- items:
- type: string
- description: Only set if there were warnings while executing the request. There will still be data in the data field.
- infos:
- type: array
- items:
- type: string
- description: Only set if there were info-level annotations while executing the request.
- required:
- - status
- - data
- additionalProperties: false
- description: Generic response body.
Metadata:
type: object
properties:
diff --git a/web/ui/mantine-ui/package.json b/web/ui/mantine-ui/package.json
index 03820cbc0f..e347bf9c9d 100644
--- a/web/ui/mantine-ui/package.json
+++ b/web/ui/mantine-ui/package.json
@@ -20,11 +20,11 @@
"@floating-ui/dom": "^1.7.6",
"@lezer/common": "^1.5.1",
"@lezer/highlight": "^1.2.3",
- "@mantine/code-highlight": "^8.3.18",
- "@mantine/core": "^8.3.18",
- "@mantine/dates": "^8.3.18",
- "@mantine/hooks": "^8.3.18",
- "@mantine/notifications": "^8.3.18",
+ "@mantine/code-highlight": "^9.0.1",
+ "@mantine/core": "^9.0.1",
+ "@mantine/dates": "^9.0.1",
+ "@mantine/hooks": "^9.0.1",
+ "@mantine/notifications": "^9.0.1",
"@microsoft/fetch-event-source": "^2.0.1",
"@nexucis/fuzzy": "^0.5.1",
"@nexucis/kvsearch": "^0.9.1",
diff --git a/web/ui/mantine-ui/src/App.tsx b/web/ui/mantine-ui/src/App.tsx
index 44e4224d10..8b3f2e6e07 100644
--- a/web/ui/mantine-ui/src/App.tsx
+++ b/web/ui/mantine-ui/src/App.tsx
@@ -167,6 +167,8 @@ const serverStatusPages = [
const allStatusPages = [...monitoringStatusPages, ...serverStatusPages];
const theme = createTheme({
+ // Preserve v8 default border-radius for now (was 'sm' in v8, changed to 'md' in v9).
+ defaultRadius: "sm",
colors: {
"codebox-bg": [
"#f5f5f5",
diff --git a/web/ui/mantine-ui/src/components/Accordion/Accordion.context.ts b/web/ui/mantine-ui/src/components/Accordion/Accordion.context.ts
deleted file mode 100644
index 63844ab80b..0000000000
--- a/web/ui/mantine-ui/src/components/Accordion/Accordion.context.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Some parts of this file are derived from Mantine UI (https://github.com/mantinedev/mantine)
- * which is distributed under the MIT license:
- *
- * MIT License
- *
- * Copyright (c) 2021 Vitaly Rtishchev
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Modifications to this file are licensed under the Apache License, Version 2.0.
- */
-
-import { createSafeContext, GetStylesApi } from "@mantine/core";
-import type { AccordionFactory } from "./Accordion";
-import {
- AccordionChevronPosition,
- AccordionHeadingOrder,
-} from "./Accordion.types";
-
-interface AccordionContext {
- loop: boolean | undefined;
- transitionDuration: number | undefined;
- disableChevronRotation: boolean | undefined;
- chevronPosition: AccordionChevronPosition | undefined;
- order: AccordionHeadingOrder | undefined;
- chevron: React.ReactNode;
- onChange: (value: string) => void;
- isItemActive: (value: string) => boolean;
- getControlId: (value: string) => string;
- getRegionId: (value: string) => string;
- getStyles: GetStylesApi