diff --git a/.circleci/config.yml b/.circleci/config.yml index 9005e352..42d16ae0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ executors: # also be updated. golang: docker: - - image: quay.io/prometheus/golang-builder:1.21-base + - image: quay.io/prometheus/golang-builder:1.22-base jobs: test: executor: golang diff --git a/.github/workflows/container_description.yml b/.github/workflows/container_description.yml new file mode 100644 index 00000000..14e0f084 --- /dev/null +++ b/.github/workflows/container_description.yml @@ -0,0 +1,52 @@ +--- +name: Push README to Docker Hub +on: + push: + paths: + - "README.md" + - ".github/workflows/container_description.yml" + branches: [ main, master ] + +permissions: + contents: read + +jobs: + PushDockerHubReadme: + runs-on: ubuntu-latest + name: Push README to Docker Hub + if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks. + steps: + - name: git checkout + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + - name: Set docker hub repo name + run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV + - name: Push README to Dockerhub + uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1 + env: + DOCKER_USER: ${{ secrets.DOCKER_HUB_LOGIN }} + DOCKER_PASS: ${{ secrets.DOCKER_HUB_PASSWORD }} + with: + destination_container_repo: ${{ env.DOCKER_REPO_NAME }} + provider: dockerhub + short_description: ${{ env.DOCKER_REPO_NAME }} + readme_file: 'README.md' + + PushQuayIoReadme: + runs-on: ubuntu-latest + name: Push README to quay.io + if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks. + steps: + - name: git checkout + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + - 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 + run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV + - name: Push README to quay.io + uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1 + env: + DOCKER_APIKEY: ${{ secrets.QUAY_IO_API_TOKEN }} + with: + destination_container_repo: ${{ env.DOCKER_REPO_NAME }} + provider: quay + readme_file: 'README.md' diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 8f252791..5ceb5909 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -24,15 +24,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: install Go + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + - name: Install Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: 1.21.x + go-version: 1.22.x - name: Install snmp_exporter/generator dependencies run: sudo apt-get update && sudo apt-get -y install libsnmp-dev if: github.repository == 'prometheus/snmp_exporter' - name: Lint - uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0 + uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1 with: - version: v1.55.2 + args: --verbose + version: v1.59.0 diff --git a/.promu.yml b/.promu.yml index a4acaa63..ad461ea5 100644 --- a/.promu.yml +++ b/.promu.yml @@ -1,7 +1,7 @@ --- go: # This must match .circle/config.yml. - version: 1.21 + version: 1.22 repository: path: github.com/prometheus-community/prom-label-proxy build: diff --git a/.yamllint b/.yamllint new file mode 100644 index 00000000..1859cb62 --- /dev/null +++ b/.yamllint @@ -0,0 +1,25 @@ +--- +extends: default +ignore: | + ui/react-app/node_modules + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + commas: disable + comments: disable + comments-indentation: disable + document-start: disable + indentation: + spaces: consistent + indent-sequences: consistent + key-duplicates: + ignore: | + config/testdata/section_key_dup.bad.yml + line-length: disable + truthy: + check-keys: false diff --git a/CHANGELOG.md b/CHANGELOG.md index 79f1ad4b..6b9077fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.0 / 2024-06-04 + +* [ENHANCEMENT] Update /api/v1/{rules,alerts} responses. #214 + ## 0.8.1 / 2024-01-28 Internal change for library compatibility. No user-visible changes. diff --git a/Makefile.common b/Makefile.common index bc2a07d7..16172923 100644 --- a/Makefile.common +++ b/Makefile.common @@ -49,23 +49,23 @@ endif GOTEST := $(GO) test GOTEST_DIR := ifneq ($(CIRCLE_JOB),) -ifneq ($(shell command -v gotestsum > /dev/null),) +ifneq ($(shell command -v gotestsum 2> /dev/null),) GOTEST_DIR := test-results GOTEST := gotestsum --junitfile $(GOTEST_DIR)/unit-tests.xml -- endif endif -PROMU_VERSION ?= 0.15.0 +PROMU_VERSION ?= 0.17.0 PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz SKIP_GOLANGCI_LINT := GOLANGCI_LINT := GOLANGCI_LINT_OPTS ?= -GOLANGCI_LINT_VERSION ?= v1.55.2 -# golangci-lint only supports linux, darwin and windows platforms on i386/amd64. +GOLANGCI_LINT_VERSION ?= v1.59.0 +# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64. # windows isn't included here because of the path separator being different. ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin)) - ifeq ($(GOHOSTARCH),$(filter $(GOHOSTARCH),amd64 i386)) + ifeq ($(GOHOSTARCH),$(filter $(GOHOSTARCH),amd64 i386 arm64)) # If we're in CI and there is an Actions file, that means the linter # is being run in Actions, so we don't need to run it here. ifneq (,$(SKIP_GOLANGCI_LINT)) @@ -169,16 +169,20 @@ common-vet: common-lint: $(GOLANGCI_LINT) ifdef GOLANGCI_LINT @echo ">> running golangci-lint" -# 'go list' needs to be executed before staticcheck to prepopulate the modules cache. -# Otherwise staticcheck might fail randomly for some reason not yet explained. - $(GO) list -e -compiled -test=true -export=false -deps=true -find=false -tags= -- ./... > /dev/null $(GOLANGCI_LINT) run $(GOLANGCI_LINT_OPTS) $(pkgs) endif +.PHONY: common-lint-fix +common-lint-fix: $(GOLANGCI_LINT) +ifdef GOLANGCI_LINT + @echo ">> running golangci-lint fix" + $(GOLANGCI_LINT) run --fix $(GOLANGCI_LINT_OPTS) $(pkgs) +endif + .PHONY: common-yamllint common-yamllint: @echo ">> running yamllint on all YAML files in the repository" -ifeq (, $(shell command -v yamllint > /dev/null)) +ifeq (, $(shell command -v yamllint 2> /dev/null)) @echo "yamllint not installed so skipping" else yamllint . @@ -204,6 +208,10 @@ common-tarball: promu @echo ">> building release tarball" $(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR) +.PHONY: common-docker-repo-name +common-docker-repo-name: + @echo "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)" + .PHONY: common-docker $(BUILD_DOCKER_ARCHS) common-docker: $(BUILD_DOCKER_ARCHS) $(BUILD_DOCKER_ARCHS): common-docker-%: diff --git a/VERSION b/VERSION index 6f4eebdf..ac39a106 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.1 +0.9.0 diff --git a/go.mod b/go.mod index c1e4a555..502fccfb 100644 --- a/go.mod +++ b/go.mod @@ -1,55 +1,55 @@ module github.com/prometheus-community/prom-label-proxy -go 1.20 +go 1.22 require ( github.com/efficientgo/core v1.0.0-rc.2 - github.com/go-openapi/runtime v0.26.2 - github.com/go-openapi/strfmt v0.22.0 + github.com/go-openapi/runtime v0.28.0 + github.com/go-openapi/strfmt v0.23.0 github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a github.com/oklog/run v1.1.0 - github.com/prometheus/alertmanager v0.26.0 - github.com/prometheus/client_golang v1.18.0 - github.com/prometheus/prometheus v0.48.1 - golang.org/x/exp v0.0.0-20231006140011-7918f672742d + github.com/prometheus/alertmanager v0.27.0 + github.com/prometheus/client_golang v1.19.1 + github.com/prometheus/prometheus v0.52.1 + golang.org/x/exp v0.0.0-20240119083558-1b970713d09a + gotest.tools/v3 v3.5.1 ) require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/analysis v0.21.4 // indirect - github.com/go-openapi/errors v0.21.0 // indirect - github.com/go-openapi/jsonpointer v0.20.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/loads v0.21.2 // indirect - github.com/go-openapi/spec v0.20.11 // indirect - github.com/go-openapi/swag v0.22.4 // indirect - github.com/go-openapi/validate v0.22.3 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/google/uuid v1.5.0 // indirect + github.com/go-openapi/analysis v0.23.0 // indirect + github.com/go-openapi/errors v0.22.0 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/loads v0.22.0 // indirect + github.com/go-openapi/spec v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect + github.com/go-openapi/validate v0.24.0 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - go.mongodb.org/mongo-driver v1.13.1 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.mongodb.org/mongo-driver v1.14.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect go.uber.org/atomic v1.11.0 // indirect - golang.org/x/sys v0.15.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.19.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 7de7c98f..1ff63f94 100644 --- a/go.sum +++ b/go.sum @@ -1,29 +1,36 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 h1:9kDVnTz3vbfweTqAUmk/a/pH5pWFCHtvRpHYC0G/dcA= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= -github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 h1:FDif4R1+UUR+00q6wquyX90K7A8dN+R5E8GEadoP7sU= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2/go.mod h1:aiYBYui4BJ/BJCAIKs92XiPyQfTaBWqvHujDwKb6CBU= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/DATA-DOG/go-sqlmock v1.4.1 h1:ThlnYciV1iM/V0OSF/dtkqWb6xo5qITT1TJBG1MRDJM= github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= -github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go v1.45.25 h1:c4fLlh5sLdK2DCRTY1z0hyuJZU4ygxX8m1FswL6/nF4= +github.com/aws/aws-sdk-go v1.51.25 h1:DjTT8mtmsachhV6yrXR8+yhnG6120dazr720nopRsls= +github.com/aws/aws-sdk-go v1.51.25/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo4tARvBm7l6KA9iVMnE3NWizDeWSrps= +github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= github.com/efficientgo/core v1.0.0-rc.2 h1:7j62qHLnrZqO3V3UA0AqOGd5d5aXV3AX6m/NZBHp78I= @@ -37,255 +44,183 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= -github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= -github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.21.0 h1:FhChC/duCnfoLj1gZ0BgaBmzhJC2SL/sJr8a2vAobSY= -github.com/go-openapi/errors v0.21.0/go.mod h1:jxNTMUxRCKj65yb/okJGEtahVd7uvWnuWfj53bse4ho= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= -github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= -github.com/go-openapi/runtime v0.26.2 h1:elWyB9MacRzvIVgAZCBJmqTi7hBzU0hlKD4IvfX0Zl0= -github.com/go-openapi/runtime v0.26.2/go.mod h1:O034jyRZ557uJKzngbMDJXkcKJVzXJiymdSfgejrcRw= -github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/spec v0.20.11 h1:J/TzFDLTt4Rcl/l1PmyErvkqlJDncGvPTMnCI39I4gY= -github.com/go-openapi/spec v0.20.11/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= -github.com/go-openapi/strfmt v0.22.0 h1:Ew9PnEYc246TwrEspvBdDHS4BVKXy/AOVsfqGDgAcaI= -github.com/go-openapi/strfmt v0.22.0/go.mod h1:HzJ9kokGIju3/K6ap8jL+OlGAbjpSv27135Yr9OivU4= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/validate v0.22.3 h1:KxG9mu5HBRYbecRb37KRCihvGGtND2aXziBAv0NNfyI= -github.com/go-openapi/validate v0.22.3/go.mod h1:kVxh31KbfsxU8ZyoHaDbLBWU5CnMdqBUEtadQ2G4d5M= +github.com/go-openapi/analysis v0.23.0 h1:aGday7OWupfMs+LbmLZG4k0MYXIANxcuBTYUC03zFCU= +github.com/go-openapi/analysis v0.23.0/go.mod h1:9mz9ZWaSlV8TvjQHLl2mUW2PbZtemkE8yA5v22ohupo= +github.com/go-openapi/errors v0.22.0 h1:c4xY/OLxUBSTiepAg3j/MHuAv5mJhnf53LLMWFB+u/w= +github.com/go-openapi/errors v0.22.0/go.mod h1:J3DmZScxCDufmIMsdOuDHxJbdOGC0xtUynjIx092vXE= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/loads v0.22.0 h1:ECPGd4jX1U6NApCGG1We+uEozOAvXvJSF4nnwHZ8Aco= +github.com/go-openapi/loads v0.22.0/go.mod h1:yLsaTCS92mnSAZX5WWoxszLj0u+Ojl+Zs5Stn1oF+rs= +github.com/go-openapi/runtime v0.28.0 h1:gpPPmWSNGo214l6n8hzdXYhPuJcGtziTOgUpvsFWGIQ= +github.com/go-openapi/runtime v0.28.0/go.mod h1:QN7OzcS+XuYmkQLw05akXk0jRH/eZ3kb18+1KwW9gyc= +github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9ZY= +github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= +github.com/go-openapi/strfmt v0.23.0 h1:nlUS6BCqcnAk0pyhi9Y+kdDVZdZMHfEKQiS4HaMgO/c= +github.com/go-openapi/strfmt v0.23.0/go.mod h1:NrtIpfKtWIygRkKVsxh7XQMDQW5HKQl6S5ik2elW+K4= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3BumrGD58= +github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= +github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= +github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= -github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.1 h1:NE3C767s2ak2bweCZo3+rdP4U/HoyVXLv/X9f2gPS5g= +github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a h1:0usWxe5SGXKQovz3p+BiQ81Jy845xSMu2CWKuXsXuUM= github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a/go.mod h1:3OETvrxfELvGsU2RoGGWercfeZ4bCL3+SOwzIWtJH/Q= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= -github.com/prometheus/alertmanager v0.26.0 h1:uOMJWfIwJguc3NaM3appWNbbrh6G/OjvaHMk22aBBYc= -github.com/prometheus/alertmanager v0.26.0/go.mod h1:rVcnARltVjavgVaNnmevxK7kOn7IZavyf0KNgHkbEpU= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/alertmanager v0.27.0 h1:V6nTa2J5V4s8TG4C4HtrBP/WNSebCCTYGGv4qecA/+I= +github.com/prometheus/alertmanager v0.27.0/go.mod h1:8Ia/R3urPmbzJ8OsdvmZvIprDwvwmYCmUbwBL+jlPOE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= +github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/prometheus v0.48.1 h1:CTszphSNTXkuCG6O0IfpKdHcJkvvnAAE1GbELKS+NFk= -github.com/prometheus/prometheus v0.48.1/go.mod h1:SRw624aMAxTfryAcP8rOjg4S/sHHaetx2lyJJ2nM83g= +github.com/prometheus/prometheus v0.52.1 h1:BrQ29YG+mzdGh8DgHPirHbeMGNqtL+INe0rqg7ttBJ4= +github.com/prometheus/prometheus v0.52.1/go.mod h1:3z74cVsmVH0iXOR5QBjB7Pa6A0KJeEAK5A6UsmAFb1g= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= -github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= -github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= -github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= -github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= -go.mongodb.org/mongo-driver v1.13.1 h1:YIc7HTYsKndGK4RFzJ3covLz1byri52x0IoMB0Pt/vk= -go.mongodb.org/mongo-driver v1.13.1/go.mod h1:wcDf1JBCXy2mOW0bWHwO/IOYqdca1MPCwDtFu/Z9+eo= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= -go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= +go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA= +golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/oauth2 v0.19.0 h1:9+E/EZBCbTLNrbN35fHv/a/d/mOBatymz1zbtQrXpIg= +golang.org/x/oauth2 v0.19.0/go.mod h1:vYi7skDa1x015PmRRYZ7+s1cWyPgrPiSYRe4rnsexc8= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -294,8 +229,16 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= diff --git a/injectproxy/rules.go b/injectproxy/rules.go index 4d11570f..be5bc39b 100644 --- a/injectproxy/rules.go +++ b/injectproxy/rules.go @@ -126,24 +126,30 @@ func (r *rule) UnmarshalJSON(b []byte) error { } type alertingRule struct { - Name string `json:"name"` - Query string `json:"query"` - Duration float64 `json:"duration"` - Labels labels.Labels `json:"labels"` - Annotations labels.Labels `json:"annotations"` - Alerts []*alert `json:"alerts"` - Health string `json:"health"` - LastError string `json:"lastError,omitempty"` + State string `json:"state"` + Name string `json:"name"` + Query string `json:"query"` + Duration float64 `json:"duration"` + KeepFiringFor float64 `json:"keepFiringFor"` + Labels labels.Labels `json:"labels"` + Annotations labels.Labels `json:"annotations"` + Alerts []*alert `json:"alerts"` + Health string `json:"health"` + LastError string `json:"lastError,omitempty"` + EvaluationTime float64 `json:"evaluationTime"` + LastEvaluation time.Time `json:"lastEvaluation"` // Type of an alertingRule is always "alerting". Type string `json:"type"` } type recordingRule struct { - Name string `json:"name"` - Query string `json:"query"` - Labels labels.Labels `json:"labels,omitempty"` - Health string `json:"health"` - LastError string `json:"lastError,omitempty"` + Name string `json:"name"` + Query string `json:"query"` + Labels labels.Labels `json:"labels,omitempty"` + Health string `json:"health"` + LastError string `json:"lastError,omitempty"` + EvaluationTime float64 `json:"evaluationTime"` + LastEvaluation time.Time `json:"lastEvaluation"` // Type of a recordingRule is always "recording". Type string `json:"type"` } @@ -153,11 +159,12 @@ type alertsData struct { } type alert struct { - Labels labels.Labels `json:"labels"` - Annotations labels.Labels `json:"annotations"` - State string `json:"state"` - ActiveAt *time.Time `json:"activeAt,omitempty"` - Value string `json:"value"` + Labels labels.Labels `json:"labels"` + Annotations labels.Labels `json:"annotations"` + State string `json:"state"` + ActiveAt *time.Time `json:"activeAt,omitempty"` + KeepFiringSince *time.Time `json:"keepFiringSince,omitempty"` + Value string `json:"value"` } // modifyAPIResponse unwraps the Prometheus API response, passes the enforced diff --git a/injectproxy/rules_test.go b/injectproxy/rules_test.go index dd81e215..f325e1fc 100644 --- a/injectproxy/rules_test.go +++ b/injectproxy/rules_test.go @@ -22,6 +22,8 @@ import ( "net/http/httptest" "net/url" "testing" + + "gotest.tools/v3/golden" ) type gzipResponseWriter struct { @@ -62,7 +64,9 @@ func validRules() http.Handler { "namespace": "ns1" }, "health": "ok", - "type": "recording" + "type": "recording", + "evaluationTime": 0.000214303, + "lastEvaluation": "2024-04-29T14:23:52.403557247+02:00" }, { "name": "metric2", @@ -72,7 +76,9 @@ func validRules() http.Handler { "operation": "create" }, "health": "ok", - "type": "recording" + "type": "recording", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:53.403557247+02:00" }, { "name": "metric2", @@ -82,7 +88,9 @@ func validRules() http.Handler { "operation": "update" }, "health": "ok", - "type": "recording" + "type": "recording", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:54.403557247+02:00" }, { "name": "metric2", @@ -92,9 +100,12 @@ func validRules() http.Handler { "operation": "delete" }, "health": "ok", - "type": "recording" + "type": "recording", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:53.603557247+02:00" }, { + "state": "firing", "name": "Alert1", "query": "metric1{namespace=\"ns1\"} == 0", "duration": 0, @@ -115,9 +126,12 @@ func validRules() http.Handler { } ], "health": "ok", - "type": "alerting" + "type": "alerting", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:53.803557247+02:00" }, { + "state": "firing", "name": "Alert2", "query": "metric2{namespace=\"ns1\"} == 0", "duration": 0, @@ -150,7 +164,9 @@ func validRules() http.Handler { } ], "health": "ok", - "type": "alerting" + "type": "alerting", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:53.903557247+02:00" } ], "interval": 10 @@ -166,9 +182,12 @@ func validRules() http.Handler { "namespace": "ns2" }, "health": "ok", - "type": "recording" + "type": "recording", + "evaluationTime": 0.000214303, + "lastEvaluation": "2024-04-29T14:23:52.403557247+02:00" }, { + "state": "inactive", "name": "Alert1", "query": "metric1{namespace=\"ns2\"} == 0", "duration": 0, @@ -178,7 +197,9 @@ func validRules() http.Handler { "annotations": {}, "alerts": [], "health": "ok", - "type": "alerting" + "type": "alerting", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.503557247+02:00" } ], "interval": 10 @@ -195,7 +216,9 @@ func validRules() http.Handler { "operation": "create" }, "health": "ok", - "type": "recording" + "type": "recording", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.503557247+02:00" }, { "name": "metric2", @@ -205,7 +228,9 @@ func validRules() http.Handler { "operation": "update" }, "health": "ok", - "type": "recording" + "type": "recording", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.603557247+02:00" }, { "name": "metric2", @@ -215,7 +240,9 @@ func validRules() http.Handler { "operation": "delete" }, "health": "ok", - "type": "recording" + "type": "recording", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.643557247+02:00" }, { "name": "metric3", @@ -224,9 +251,12 @@ func validRules() http.Handler { "namespace": "ns2" }, "health": "ok", - "type": "recording" + "type": "recording", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.683557247+02:00" }, { + "state": "inactive", "name": "Alert2", "query": "metric2{namespace=\"ns2\"} == 0", "duration": 0, @@ -236,9 +266,12 @@ func validRules() http.Handler { "annotations": {}, "alerts": [], "health": "ok", - "type": "alerting" + "type": "alerting", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.803557247+02:00" }, { + "state": "firing", "name": "Alert3", "query": "metric3{namespace=\"ns2\"} == 0", "duration": 0, @@ -259,7 +292,9 @@ func validRules() http.Handler { } ], "health": "ok", - "type": "alerting" + "type": "alerting", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.903557247+02:00" } ], "interval": 10 @@ -332,12 +367,12 @@ func TestRules(t *testing.T) { reqHeaders http.Header expCode int - expBody []byte + golden string }{ { // No "namespace" parameter returns an error. expCode: http.StatusBadRequest, - expBody: []byte(`{"error":"The \"namespace\" query parameter must be provided.","errorType":"prom-label-proxy","status":"error"}` + "\n"), + golden: "rules_no_namespace_error.golden", }, { // non 200 status code from upstream is passed as-is. @@ -348,7 +383,7 @@ func TestRules(t *testing.T) { }), expCode: http.StatusBadRequest, - expBody: []byte("error"), + golden: "rules_upstream_error.golden", }, { // incomplete API response triggers a 502 error. @@ -358,7 +393,7 @@ func TestRules(t *testing.T) { }), expCode: http.StatusBadGateway, - expBody: []byte(""), + golden: "rules_incomplete_upstream_response.golden", }, { // invalid API response triggers a 502 error. @@ -368,7 +403,7 @@ func TestRules(t *testing.T) { }), expCode: http.StatusBadGateway, - expBody: []byte(""), + golden: "rules_invalid_upstream_response.golden", }, { // "namespace" parameter matching no rule. @@ -376,12 +411,7 @@ func TestRules(t *testing.T) { upstream: validRules(), expCode: http.StatusOK, - expBody: []byte(`{ - "status": "success", - "data": { - "groups": [] - } -}`), + golden: "rules_no_match.golden", }, { // Gzipped response should be handled when explictly asked by the original client. @@ -392,12 +422,7 @@ func TestRules(t *testing.T) { }, expCode: http.StatusOK, - expBody: []byte(`{ - "status": "success", - "data": { - "groups": [] - } -}`), + golden: "rules_no_match_with_gzip_requested.golden", }, { // When the client doesn't ask explicitly for gzip encoding, the Go @@ -407,477 +432,28 @@ func TestRules(t *testing.T) { upstream: gzipHandler(validRules()), expCode: http.StatusOK, - expBody: []byte(`{ - "status": "success", - "data": { - "groups": [] - } -}`), + golden: "rules_no_match_with_gzip_not_requested.golden", }, { labelv: []string{"ns1"}, upstream: validRules(), expCode: http.StatusOK, - expBody: []byte(`{ - "status": "success", - "data": { - "groups": [ - { - "name": "group1", - "file": "testdata/rules1.yml", - "rules": [ - { - "name": "metric1", - "query": "0", - "labels": { - "namespace": "ns1" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "metric2", - "query": "1", - "labels": { - "namespace": "ns1", - "operation": "create" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "metric2", - "query": "0", - "labels": { - "namespace": "ns1", - "operation": "update" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "metric2", - "query": "0", - "labels": { - "namespace": "ns1", - "operation": "delete" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "Alert1", - "query": "metric1{namespace=\"ns1\"} == 0", - "duration": 0, - "labels": { - "namespace": "ns1" - }, - "annotations": {}, - "alerts": [ - { - "labels": { - "alertname": "Alert1", - "namespace": "ns1" - }, - "annotations": {}, - "state": "firing", - "activeAt": "2019-12-18T13:14:44.543981127+01:00", - "value": "0e+00" - } - ], - "health": "ok", - "type": "alerting" - }, - { - "name": "Alert2", - "query": "metric2{namespace=\"ns1\"} == 0", - "duration": 0, - "labels": { - "namespace": "ns1" - }, - "annotations": {}, - "alerts": [ - { - "labels": { - "alertname": "Alert2", - "namespace": "ns1", - "operation": "update" - }, - "annotations": {}, - "state": "firing", - "activeAt": "2019-12-18T13:14:44.543981127+01:00", - "value": "0e+00" - }, - { - "labels": { - "alertname": "Alert2", - "namespace": "ns1", - "operation": "delete" - }, - "annotations": {}, - "state": "firing", - "activeAt": "2019-12-18T13:14:44.543981127+01:00", - "value": "0e+00" - } - ], - "health": "ok", - "type": "alerting" - } - ], - "interval": 10 - } - ] - } -}`), + golden: "rules_match_namespace_ns1.golden", }, { labelv: []string{"ns2"}, upstream: validRules(), expCode: http.StatusOK, - expBody: []byte(`{ - "status": "success", - "data": { - "groups": [ - { - "name": "group1", - "file": "testdata/rules2.yml", - "rules": [ - { - "name": "metric1", - "query": "1", - "labels": { - "namespace": "ns2" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "Alert1", - "query": "metric1{namespace=\"ns2\"} == 0", - "duration": 0, - "labels": { - "namespace": "ns2" - }, - "annotations": {}, - "alerts": [], - "health": "ok", - "type": "alerting" - } - ], - "interval": 10 - }, - { - "name": "group2", - "file": "testdata/rules2.yml", - "rules": [ - { - "name": "metric2", - "query": "1", - "labels": { - "namespace": "ns2", - "operation": "create" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "metric2", - "query": "2", - "labels": { - "namespace": "ns2", - "operation": "update" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "metric2", - "query": "3", - "labels": { - "namespace": "ns2", - "operation": "delete" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "metric3", - "query": "0", - "labels": { - "namespace": "ns2" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "Alert2", - "query": "metric2{namespace=\"ns2\"} == 0", - "duration": 0, - "labels": { - "namespace": "ns2" - }, - "annotations": {}, - "alerts": [], - "health": "ok", - "type": "alerting" - }, - { - "name": "Alert3", - "query": "metric3{namespace=\"ns2\"} == 0", - "duration": 0, - "labels": { - "namespace": "ns2" - }, - "annotations": {}, - "alerts": [ - { - "labels": { - "alertname": "Alert3", - "namespace": "ns2" - }, - "annotations": {}, - "state": "firing", - "activeAt": "2019-12-18T13:14:39.972915521+01:00", - "value": "0e+00" - } - ], - "health": "ok", - "type": "alerting" - } - ], - "interval": 10 - } - ] - } -}`), + golden: "rules_match_namespace_ns2.golden", }, { labelv: []string{"ns1", "ns2"}, upstream: validRules(), expCode: http.StatusOK, - expBody: []byte(`{ - "status": "success", - "data": { - "groups": [ - { - "name": "group1", - "file": "testdata/rules1.yml", - "rules": [ - { - "name": "metric1", - "query": "0", - "labels": { - "namespace": "ns1" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "metric2", - "query": "1", - "labels": { - "namespace": "ns1", - "operation": "create" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "metric2", - "query": "0", - "labels": { - "namespace": "ns1", - "operation": "update" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "metric2", - "query": "0", - "labels": { - "namespace": "ns1", - "operation": "delete" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "Alert1", - "query": "metric1{namespace=\"ns1\"} == 0", - "duration": 0, - "labels": { - "namespace": "ns1" - }, - "annotations": {}, - "alerts": [ - { - "labels": { - "alertname": "Alert1", - "namespace": "ns1" - }, - "annotations": {}, - "state": "firing", - "activeAt": "2019-12-18T13:14:44.543981127+01:00", - "value": "0e+00" - } - ], - "health": "ok", - "type": "alerting" - }, - { - "name": "Alert2", - "query": "metric2{namespace=\"ns1\"} == 0", - "duration": 0, - "labels": { - "namespace": "ns1" - }, - "annotations": {}, - "alerts": [ - { - "labels": { - "alertname": "Alert2", - "namespace": "ns1", - "operation": "update" - }, - "annotations": {}, - "state": "firing", - "activeAt": "2019-12-18T13:14:44.543981127+01:00", - "value": "0e+00" - }, - { - "labels": { - "alertname": "Alert2", - "namespace": "ns1", - "operation": "delete" - }, - "annotations": {}, - "state": "firing", - "activeAt": "2019-12-18T13:14:44.543981127+01:00", - "value": "0e+00" - } - ], - "health": "ok", - "type": "alerting" - } - ], - "interval": 10 - }, - { - "name": "group1", - "file": "testdata/rules2.yml", - "rules": [ - { - "name": "metric1", - "query": "1", - "labels": { - "namespace": "ns2" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "Alert1", - "query": "metric1{namespace=\"ns2\"} == 0", - "duration": 0, - "labels": { - "namespace": "ns2" - }, - "annotations": {}, - "alerts": [], - "health": "ok", - "type": "alerting" - } - ], - "interval": 10 - }, - { - "name": "group2", - "file": "testdata/rules2.yml", - "rules": [ - { - "name": "metric2", - "query": "1", - "labels": { - "namespace": "ns2", - "operation": "create" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "metric2", - "query": "2", - "labels": { - "namespace": "ns2", - "operation": "update" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "metric2", - "query": "3", - "labels": { - "namespace": "ns2", - "operation": "delete" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "metric3", - "query": "0", - "labels": { - "namespace": "ns2" - }, - "health": "ok", - "type": "recording" - }, - { - "name": "Alert2", - "query": "metric2{namespace=\"ns2\"} == 0", - "duration": 0, - "labels": { - "namespace": "ns2" - }, - "annotations": {}, - "alerts": [], - "health": "ok", - "type": "alerting" - }, - { - "name": "Alert3", - "query": "metric3{namespace=\"ns2\"} == 0", - "duration": 0, - "labels": { - "namespace": "ns2" - }, - "annotations": {}, - "alerts": [ - { - "labels": { - "alertname": "Alert3", - "namespace": "ns2" - }, - "annotations": {}, - "state": "firing", - "activeAt": "2019-12-18T13:14:39.972915521+01:00", - "value": "0e+00" - } - ], - "health": "ok", - "type": "alerting" - } - ], - "interval": 10 - } - ] - } -}`), + golden: "rules_match_namespaces_ns1_and_ns2.golden", }, } { t.Run(fmt.Sprintf("%s=%s", proxyLabel, tc.labelv), func(t *testing.T) { @@ -917,22 +493,13 @@ func TestRules(t *testing.T) { body, _ := io.ReadAll(resp.Body) if resp.StatusCode != http.StatusOK { - if string(body) != string(tc.expBody) { - t.Fatalf("expected: %q, got: %q", string(tc.expBody), string(body)) - } + golden.Assert(t, string(body), tc.golden) return } // We need to unmarshal/marshal the result to run deterministic comparisons. got := normalizeAPIResponse(t, body) - expected := normalizeAPIResponse(t, tc.expBody) - if got != expected { - t.Logf("expected:") - t.Logf(expected) - t.Logf("got:") - t.Logf(got) - t.FailNow() - } + golden.Assert(t, got, tc.golden) }) } } @@ -943,12 +510,12 @@ func TestAlerts(t *testing.T) { upstream http.Handler expCode int - expBody []byte + golden string }{ { // No "namespace" parameter returns an error. expCode: http.StatusBadRequest, - expBody: []byte(`{"error":"The \"namespace\" query parameter must be provided.","errorType":"prom-label-proxy","status":"error"}` + "\n"), + golden: "alerts_no_namespace_error.golden", }, { // non 200 status code from upstream is passed as-is. @@ -959,7 +526,7 @@ func TestAlerts(t *testing.T) { }), expCode: http.StatusBadRequest, - expBody: []byte("error"), + golden: "alerts_upstream_error.golden", }, { // incomplete API response triggers a 502 error. @@ -969,7 +536,7 @@ func TestAlerts(t *testing.T) { }), expCode: http.StatusBadGateway, - expBody: []byte(""), + golden: "alerts_incomplete_upstream_response.golden", }, { // invalid API response triggers a 502 error. @@ -979,7 +546,7 @@ func TestAlerts(t *testing.T) { }), expCode: http.StatusBadGateway, - expBody: []byte(""), + golden: "alerts_invalid_upstream_response.golden", }, { // "namespace" parameter matching no rule. @@ -987,135 +554,28 @@ func TestAlerts(t *testing.T) { upstream: validAlerts(), expCode: http.StatusOK, - expBody: []byte(`{ - "status": "success", - "data": { - "alerts": [] - } -}`), + golden: "alerts_no_match.golden", }, { labelv: []string{"ns1"}, upstream: validAlerts(), expCode: http.StatusOK, - expBody: []byte(`{ - "status": "success", - "data": { - "alerts": [ - { - "labels": { - "alertname": "Alert1", - "namespace": "ns1" - }, - "annotations": {}, - "state": "firing", - "activeAt": "2019-12-18T13:14:44.543981127+01:00", - "value": "0e+00" - }, - { - "labels": { - "alertname": "Alert2", - "namespace": "ns1", - "operation": "update" - }, - "annotations": {}, - "state": "firing", - "activeAt": "2019-12-18T13:14:44.543981127+01:00", - "value": "0e+00" - }, - { - "labels": { - "alertname": "Alert2", - "namespace": "ns1", - "operation": "delete" - }, - "annotations": {}, - "state": "firing", - "activeAt": "2019-12-18T13:14:44.543981127+01:00", - "value": "0e+00" - } - ] - } -}`), + golden: "alerts_match_namespace_ns1.golden", }, { labelv: []string{"ns2"}, upstream: validAlerts(), expCode: http.StatusOK, - expBody: []byte(`{ - "status": "success", - "data": { - "alerts": [ - { - "labels": { - "alertname": "Alert3", - "namespace": "ns2" - }, - "annotations": {}, - "state": "firing", - "activeAt": "2019-12-18T13:14:39.972915521+01:00", - "value": "0e+00" - } - ] - } -}`), + golden: "alerts_match_namespace_ns2.golden", }, { labelv: []string{"ns1", "ns2"}, upstream: validAlerts(), expCode: http.StatusOK, - expBody: []byte(`{ - "status": "success", - "data": { - "alerts": [ - { - "labels": { - "alertname": "Alert1", - "namespace": "ns1" - }, - "annotations": {}, - "state": "firing", - "activeAt": "2019-12-18T13:14:44.543981127+01:00", - "value": "0e+00" - }, - { - "labels": { - "alertname": "Alert2", - "namespace": "ns1", - "operation": "update" - }, - "annotations": {}, - "state": "firing", - "activeAt": "2019-12-18T13:14:44.543981127+01:00", - "value": "0e+00" - }, - { - "labels": { - "alertname": "Alert2", - "namespace": "ns1", - "operation": "delete" - }, - "annotations": {}, - "state": "firing", - "activeAt": "2019-12-18T13:14:44.543981127+01:00", - "value": "0e+00" - }, - { - "labels": { - "alertname": "Alert3", - "namespace": "ns2" - }, - "annotations": {}, - "state": "firing", - "activeAt": "2019-12-18T13:14:39.972915521+01:00", - "value": "0e+00" - } - ] - } -}`), + golden: "alerts_match_namespaces_ns1_and_ns2.golden", }, } { t.Run(fmt.Sprintf("%s=%s", proxyLabel, tc.labelv), func(t *testing.T) { @@ -1148,22 +608,13 @@ func TestAlerts(t *testing.T) { body, _ := io.ReadAll(resp.Body) if resp.StatusCode != http.StatusOK { - if string(body) != string(tc.expBody) { - t.Fatalf("expected: %q, got: %q", string(tc.expBody), string(body)) - } + golden.Assert(t, string(body), tc.golden) return } // We need to unmarshal/marshal the result to run deterministic comparisons. got := normalizeAPIResponse(t, body) - expected := normalizeAPIResponse(t, tc.expBody) - if got != expected { - t.Logf("expected:") - t.Logf(expected) - t.Logf("got:") - t.Logf(got) - t.FailNow() - } + golden.Assert(t, got, tc.golden) }) } } diff --git a/injectproxy/testdata/alerts_incomplete_upstream_response.golden b/injectproxy/testdata/alerts_incomplete_upstream_response.golden new file mode 100644 index 00000000..e69de29b diff --git a/injectproxy/testdata/alerts_invalid_upstream_response.golden b/injectproxy/testdata/alerts_invalid_upstream_response.golden new file mode 100644 index 00000000..e69de29b diff --git a/injectproxy/testdata/alerts_match_namespace_ns1.golden b/injectproxy/testdata/alerts_match_namespace_ns1.golden new file mode 100644 index 00000000..5ffdeb5a --- /dev/null +++ b/injectproxy/testdata/alerts_match_namespace_ns1.golden @@ -0,0 +1,39 @@ +{ + "status": "success", + "data": { + "alerts": [ + { + "labels": { + "alertname": "Alert1", + "namespace": "ns1" + }, + "annotations": {}, + "state": "firing", + "activeAt": "2019-12-18T13:14:44.543981127+01:00", + "value": "0e+00" + }, + { + "labels": { + "alertname": "Alert2", + "namespace": "ns1", + "operation": "update" + }, + "annotations": {}, + "state": "firing", + "activeAt": "2019-12-18T13:14:44.543981127+01:00", + "value": "0e+00" + }, + { + "labels": { + "alertname": "Alert2", + "namespace": "ns1", + "operation": "delete" + }, + "annotations": {}, + "state": "firing", + "activeAt": "2019-12-18T13:14:44.543981127+01:00", + "value": "0e+00" + } + ] + } +} \ No newline at end of file diff --git a/injectproxy/testdata/alerts_match_namespace_ns2.golden b/injectproxy/testdata/alerts_match_namespace_ns2.golden new file mode 100644 index 00000000..245cdcdf --- /dev/null +++ b/injectproxy/testdata/alerts_match_namespace_ns2.golden @@ -0,0 +1,17 @@ +{ + "status": "success", + "data": { + "alerts": [ + { + "labels": { + "alertname": "Alert3", + "namespace": "ns2" + }, + "annotations": {}, + "state": "firing", + "activeAt": "2019-12-18T13:14:39.972915521+01:00", + "value": "0e+00" + } + ] + } +} \ No newline at end of file diff --git a/injectproxy/testdata/alerts_match_namespaces_ns1_and_ns2.golden b/injectproxy/testdata/alerts_match_namespaces_ns1_and_ns2.golden new file mode 100644 index 00000000..c3f4c465 --- /dev/null +++ b/injectproxy/testdata/alerts_match_namespaces_ns1_and_ns2.golden @@ -0,0 +1,49 @@ +{ + "status": "success", + "data": { + "alerts": [ + { + "labels": { + "alertname": "Alert1", + "namespace": "ns1" + }, + "annotations": {}, + "state": "firing", + "activeAt": "2019-12-18T13:14:44.543981127+01:00", + "value": "0e+00" + }, + { + "labels": { + "alertname": "Alert2", + "namespace": "ns1", + "operation": "update" + }, + "annotations": {}, + "state": "firing", + "activeAt": "2019-12-18T13:14:44.543981127+01:00", + "value": "0e+00" + }, + { + "labels": { + "alertname": "Alert2", + "namespace": "ns1", + "operation": "delete" + }, + "annotations": {}, + "state": "firing", + "activeAt": "2019-12-18T13:14:44.543981127+01:00", + "value": "0e+00" + }, + { + "labels": { + "alertname": "Alert3", + "namespace": "ns2" + }, + "annotations": {}, + "state": "firing", + "activeAt": "2019-12-18T13:14:39.972915521+01:00", + "value": "0e+00" + } + ] + } +} \ No newline at end of file diff --git a/injectproxy/testdata/alerts_no_match.golden b/injectproxy/testdata/alerts_no_match.golden new file mode 100644 index 00000000..9fb25f8b --- /dev/null +++ b/injectproxy/testdata/alerts_no_match.golden @@ -0,0 +1,6 @@ +{ + "status": "success", + "data": { + "alerts": [] + } +} \ No newline at end of file diff --git a/injectproxy/testdata/alerts_no_namespace_error.golden b/injectproxy/testdata/alerts_no_namespace_error.golden new file mode 100644 index 00000000..a14ac5d2 --- /dev/null +++ b/injectproxy/testdata/alerts_no_namespace_error.golden @@ -0,0 +1 @@ +{"error":"The \"namespace\" query parameter must be provided.","errorType":"prom-label-proxy","status":"error"} diff --git a/injectproxy/testdata/alerts_upstream_error.golden b/injectproxy/testdata/alerts_upstream_error.golden new file mode 100644 index 00000000..760589cb --- /dev/null +++ b/injectproxy/testdata/alerts_upstream_error.golden @@ -0,0 +1 @@ +error \ No newline at end of file diff --git a/injectproxy/testdata/rules_incomplete_upstream_response.golden b/injectproxy/testdata/rules_incomplete_upstream_response.golden new file mode 100644 index 00000000..e69de29b diff --git a/injectproxy/testdata/rules_invalid_upstream_response.golden b/injectproxy/testdata/rules_invalid_upstream_response.golden new file mode 100644 index 00000000..e69de29b diff --git a/injectproxy/testdata/rules_match_namespace_ns1.golden b/injectproxy/testdata/rules_match_namespace_ns1.golden new file mode 100644 index 00000000..cbb43610 --- /dev/null +++ b/injectproxy/testdata/rules_match_namespace_ns1.golden @@ -0,0 +1,127 @@ +{ + "status": "success", + "data": { + "groups": [ + { + "name": "group1", + "file": "testdata/rules1.yml", + "rules": [ + { + "name": "metric1", + "query": "0", + "labels": { + "namespace": "ns1" + }, + "health": "ok", + "evaluationTime": 0.000214303, + "lastEvaluation": "2024-04-29T14:23:52.403557247+02:00", + "type": "recording" + }, + { + "name": "metric2", + "query": "1", + "labels": { + "namespace": "ns1", + "operation": "create" + }, + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:53.403557247+02:00", + "type": "recording" + }, + { + "name": "metric2", + "query": "0", + "labels": { + "namespace": "ns1", + "operation": "update" + }, + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:54.403557247+02:00", + "type": "recording" + }, + { + "name": "metric2", + "query": "0", + "labels": { + "namespace": "ns1", + "operation": "delete" + }, + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:53.603557247+02:00", + "type": "recording" + }, + { + "state": "firing", + "name": "Alert1", + "query": "metric1{namespace=\"ns1\"} == 0", + "duration": 0, + "keepFiringFor": 0, + "labels": { + "namespace": "ns1" + }, + "annotations": {}, + "alerts": [ + { + "labels": { + "alertname": "Alert1", + "namespace": "ns1" + }, + "annotations": {}, + "state": "firing", + "activeAt": "2019-12-18T13:14:44.543981127+01:00", + "value": "0e+00" + } + ], + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:53.803557247+02:00", + "type": "alerting" + }, + { + "state": "firing", + "name": "Alert2", + "query": "metric2{namespace=\"ns1\"} == 0", + "duration": 0, + "keepFiringFor": 0, + "labels": { + "namespace": "ns1" + }, + "annotations": {}, + "alerts": [ + { + "labels": { + "alertname": "Alert2", + "namespace": "ns1", + "operation": "update" + }, + "annotations": {}, + "state": "firing", + "activeAt": "2019-12-18T13:14:44.543981127+01:00", + "value": "0e+00" + }, + { + "labels": { + "alertname": "Alert2", + "namespace": "ns1", + "operation": "delete" + }, + "annotations": {}, + "state": "firing", + "activeAt": "2019-12-18T13:14:44.543981127+01:00", + "value": "0e+00" + } + ], + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:53.903557247+02:00", + "type": "alerting" + } + ], + "interval": 10 + } + ] + } +} \ No newline at end of file diff --git a/injectproxy/testdata/rules_match_namespace_ns2.golden b/injectproxy/testdata/rules_match_namespace_ns2.golden new file mode 100644 index 00000000..97c0809a --- /dev/null +++ b/injectproxy/testdata/rules_match_namespace_ns2.golden @@ -0,0 +1,138 @@ +{ + "status": "success", + "data": { + "groups": [ + { + "name": "group1", + "file": "testdata/rules2.yml", + "rules": [ + { + "name": "metric1", + "query": "1", + "labels": { + "namespace": "ns2" + }, + "health": "ok", + "evaluationTime": 0.000214303, + "lastEvaluation": "2024-04-29T14:23:52.403557247+02:00", + "type": "recording" + }, + { + "state": "inactive", + "name": "Alert1", + "query": "metric1{namespace=\"ns2\"} == 0", + "duration": 0, + "keepFiringFor": 0, + "labels": { + "namespace": "ns2" + }, + "annotations": {}, + "alerts": [], + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.503557247+02:00", + "type": "alerting" + } + ], + "interval": 10 + }, + { + "name": "group2", + "file": "testdata/rules2.yml", + "rules": [ + { + "name": "metric2", + "query": "1", + "labels": { + "namespace": "ns2", + "operation": "create" + }, + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.503557247+02:00", + "type": "recording" + }, + { + "name": "metric2", + "query": "2", + "labels": { + "namespace": "ns2", + "operation": "update" + }, + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.603557247+02:00", + "type": "recording" + }, + { + "name": "metric2", + "query": "3", + "labels": { + "namespace": "ns2", + "operation": "delete" + }, + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.643557247+02:00", + "type": "recording" + }, + { + "name": "metric3", + "query": "0", + "labels": { + "namespace": "ns2" + }, + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.683557247+02:00", + "type": "recording" + }, + { + "state": "inactive", + "name": "Alert2", + "query": "metric2{namespace=\"ns2\"} == 0", + "duration": 0, + "keepFiringFor": 0, + "labels": { + "namespace": "ns2" + }, + "annotations": {}, + "alerts": [], + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.803557247+02:00", + "type": "alerting" + }, + { + "state": "firing", + "name": "Alert3", + "query": "metric3{namespace=\"ns2\"} == 0", + "duration": 0, + "keepFiringFor": 0, + "labels": { + "namespace": "ns2" + }, + "annotations": {}, + "alerts": [ + { + "labels": { + "alertname": "Alert3", + "namespace": "ns2" + }, + "annotations": {}, + "state": "firing", + "activeAt": "2019-12-18T13:14:39.972915521+01:00", + "value": "0e+00" + } + ], + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.903557247+02:00", + "type": "alerting" + } + ], + "interval": 10 + } + ] + } +} \ No newline at end of file diff --git a/injectproxy/testdata/rules_match_namespaces_ns1_and_ns2.golden b/injectproxy/testdata/rules_match_namespaces_ns1_and_ns2.golden new file mode 100644 index 00000000..dace4788 --- /dev/null +++ b/injectproxy/testdata/rules_match_namespaces_ns1_and_ns2.golden @@ -0,0 +1,258 @@ +{ + "status": "success", + "data": { + "groups": [ + { + "name": "group1", + "file": "testdata/rules1.yml", + "rules": [ + { + "name": "metric1", + "query": "0", + "labels": { + "namespace": "ns1" + }, + "health": "ok", + "evaluationTime": 0.000214303, + "lastEvaluation": "2024-04-29T14:23:52.403557247+02:00", + "type": "recording" + }, + { + "name": "metric2", + "query": "1", + "labels": { + "namespace": "ns1", + "operation": "create" + }, + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:53.403557247+02:00", + "type": "recording" + }, + { + "name": "metric2", + "query": "0", + "labels": { + "namespace": "ns1", + "operation": "update" + }, + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:54.403557247+02:00", + "type": "recording" + }, + { + "name": "metric2", + "query": "0", + "labels": { + "namespace": "ns1", + "operation": "delete" + }, + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:53.603557247+02:00", + "type": "recording" + }, + { + "state": "firing", + "name": "Alert1", + "query": "metric1{namespace=\"ns1\"} == 0", + "duration": 0, + "keepFiringFor": 0, + "labels": { + "namespace": "ns1" + }, + "annotations": {}, + "alerts": [ + { + "labels": { + "alertname": "Alert1", + "namespace": "ns1" + }, + "annotations": {}, + "state": "firing", + "activeAt": "2019-12-18T13:14:44.543981127+01:00", + "value": "0e+00" + } + ], + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:53.803557247+02:00", + "type": "alerting" + }, + { + "state": "firing", + "name": "Alert2", + "query": "metric2{namespace=\"ns1\"} == 0", + "duration": 0, + "keepFiringFor": 0, + "labels": { + "namespace": "ns1" + }, + "annotations": {}, + "alerts": [ + { + "labels": { + "alertname": "Alert2", + "namespace": "ns1", + "operation": "update" + }, + "annotations": {}, + "state": "firing", + "activeAt": "2019-12-18T13:14:44.543981127+01:00", + "value": "0e+00" + }, + { + "labels": { + "alertname": "Alert2", + "namespace": "ns1", + "operation": "delete" + }, + "annotations": {}, + "state": "firing", + "activeAt": "2019-12-18T13:14:44.543981127+01:00", + "value": "0e+00" + } + ], + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:53.903557247+02:00", + "type": "alerting" + } + ], + "interval": 10 + }, + { + "name": "group1", + "file": "testdata/rules2.yml", + "rules": [ + { + "name": "metric1", + "query": "1", + "labels": { + "namespace": "ns2" + }, + "health": "ok", + "evaluationTime": 0.000214303, + "lastEvaluation": "2024-04-29T14:23:52.403557247+02:00", + "type": "recording" + }, + { + "state": "inactive", + "name": "Alert1", + "query": "metric1{namespace=\"ns2\"} == 0", + "duration": 0, + "keepFiringFor": 0, + "labels": { + "namespace": "ns2" + }, + "annotations": {}, + "alerts": [], + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.503557247+02:00", + "type": "alerting" + } + ], + "interval": 10 + }, + { + "name": "group2", + "file": "testdata/rules2.yml", + "rules": [ + { + "name": "metric2", + "query": "1", + "labels": { + "namespace": "ns2", + "operation": "create" + }, + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.503557247+02:00", + "type": "recording" + }, + { + "name": "metric2", + "query": "2", + "labels": { + "namespace": "ns2", + "operation": "update" + }, + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.603557247+02:00", + "type": "recording" + }, + { + "name": "metric2", + "query": "3", + "labels": { + "namespace": "ns2", + "operation": "delete" + }, + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.643557247+02:00", + "type": "recording" + }, + { + "name": "metric3", + "query": "0", + "labels": { + "namespace": "ns2" + }, + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.683557247+02:00", + "type": "recording" + }, + { + "state": "inactive", + "name": "Alert2", + "query": "metric2{namespace=\"ns2\"} == 0", + "duration": 0, + "keepFiringFor": 0, + "labels": { + "namespace": "ns2" + }, + "annotations": {}, + "alerts": [], + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.803557247+02:00", + "type": "alerting" + }, + { + "state": "firing", + "name": "Alert3", + "query": "metric3{namespace=\"ns2\"} == 0", + "duration": 0, + "keepFiringFor": 0, + "labels": { + "namespace": "ns2" + }, + "annotations": {}, + "alerts": [ + { + "labels": { + "alertname": "Alert3", + "namespace": "ns2" + }, + "annotations": {}, + "state": "firing", + "activeAt": "2019-12-18T13:14:39.972915521+01:00", + "value": "0e+00" + } + ], + "health": "ok", + "evaluationTime": 0.000214, + "lastEvaluation": "2024-04-29T14:23:52.903557247+02:00", + "type": "alerting" + } + ], + "interval": 10 + } + ] + } +} \ No newline at end of file diff --git a/injectproxy/testdata/rules_no_match.golden b/injectproxy/testdata/rules_no_match.golden new file mode 100644 index 00000000..e764d07b --- /dev/null +++ b/injectproxy/testdata/rules_no_match.golden @@ -0,0 +1,6 @@ +{ + "status": "success", + "data": { + "groups": [] + } +} \ No newline at end of file diff --git a/injectproxy/testdata/rules_no_match_with_gzip_not_requested.golden b/injectproxy/testdata/rules_no_match_with_gzip_not_requested.golden new file mode 100644 index 00000000..e764d07b --- /dev/null +++ b/injectproxy/testdata/rules_no_match_with_gzip_not_requested.golden @@ -0,0 +1,6 @@ +{ + "status": "success", + "data": { + "groups": [] + } +} \ No newline at end of file diff --git a/injectproxy/testdata/rules_no_match_with_gzip_requested.golden b/injectproxy/testdata/rules_no_match_with_gzip_requested.golden new file mode 100644 index 00000000..e764d07b --- /dev/null +++ b/injectproxy/testdata/rules_no_match_with_gzip_requested.golden @@ -0,0 +1,6 @@ +{ + "status": "success", + "data": { + "groups": [] + } +} \ No newline at end of file diff --git a/injectproxy/testdata/rules_no_namespace_error.golden b/injectproxy/testdata/rules_no_namespace_error.golden new file mode 100644 index 00000000..a14ac5d2 --- /dev/null +++ b/injectproxy/testdata/rules_no_namespace_error.golden @@ -0,0 +1 @@ +{"error":"The \"namespace\" query parameter must be provided.","errorType":"prom-label-proxy","status":"error"} diff --git a/injectproxy/testdata/rules_upstream_error.golden b/injectproxy/testdata/rules_upstream_error.golden new file mode 100644 index 00000000..760589cb --- /dev/null +++ b/injectproxy/testdata/rules_upstream_error.golden @@ -0,0 +1 @@ +error \ No newline at end of file