Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/compliance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ jobs:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
# Skip ST tests on CI as Prometheus does not implement those yet (see PROM-60).
- run: cd remotewrite && make sender PROMETHEUS_RW_COMPLIANCE_SKIP_TEST_RE="TestSample/rw2/prometheus/start_timestamp*"
- run: cd remotewrite && make sender PROMETHEUS_RW_COMPLIANCE_SKIP_TEST_RE=${SKIP_TESTS}
env:
# Skip ST tests on CI as Prometheus does not implement those yet (see PROM-60).
SKIP_TESTS: "TestCompliance/prometheus/samples/rw2/start_timestamp*"
23 changes: 5 additions & 18 deletions remotewrite/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,11 @@ ROOT_DIR := $(dir $(mkfile_path))
SED=$(shell which gsed 2>/dev/null || which sed)

# Shared variables
DEBUG=""
TIMEOUT="10m"
PROMETHEUS_RW_COMPLIANCE_TEST_RE=""
PROMETHEUS_RW_COMPLIANCE_SKIP_TEST_RE=""
RESULT_FILE="$(ROOT_DIR)/results.json"

# Go test arguments and the base execution command.
BASE_TEST_ARGS = -run $(PROMETHEUS_RW_COMPLIANCE_TEST_RE) -skip $(PROMETHEUS_RW_COMPLIANCE_SKIP_TEST_RE)
RUN_TEST = cd ./$(COMPONENT) && GOWORK=off DEBUG=$(DEBUG) $(COMPONENT_ENV) go test $(BASE_TEST_ARGS)

# Use target-specific variables to dynamically inject directories and environment variables.
sender sender-%: PROMETHEUS_COMPLIANCE_RW_SENDERS="prometheus"
sender sender-%: PROMETHEUS_COMPLIANCE_RW_PROCESS_CMD=""
sender sender-%: COMPONENT = sender
sender sender-%: COMPONENT_ENV = PROMETHEUS_COMPLIANCE_RW_SENDERS=$(PROMETHEUS_COMPLIANCE_RW_SENDERS) PROMETHEUS_COMPLIANCE_RW_PROCESS_CMD=$(PROMETHEUS_COMPLIANCE_RW_PROCESS_CMD)

receiver receiver-%: COMPONENT = receiver
receiver receiver-%: COMPONENT_ENV = PROMETHEUS_RW2_COMPLIANCE_RECEIVERS=$(PROMETHEUS_RW2_COMPLIANCE_RECEIVERS)
RUN_TEST = go test -run $(PROMETHEUS_RW_COMPLIANCE_TEST_RE) -skip $(PROMETHEUS_RW_COMPLIANCE_SKIP_TEST_RE)

.PHONY: help
help: ## Show this help message
Expand All @@ -36,20 +23,20 @@ help: ## Show this help message

.PHONY: sender
sender: ## Run sender compliance tests for a given senders suitable for humans and CI.
$(RUN_TEST) -v -timeout=$(TIMEOUT)
@$(RUN_TEST) ./sender -v -timeout=$(TIMEOUT)

.PHONY: sender-web
sender-web: ## Run sender compliance tests for a given senders with a HTML results view.
@$(RUN_TEST) -json | tee $(RESULT_FILE)
@$(RUN_TEST) ./sender -json | tee $(RESULT_FILE)
@$(MAKE) results-web

.PHONY: receiver
receiver: ## Run receiver compliance tests for a given receivers suitable for humans and CI.
$(RUN_TEST) -v -timeout=$(TIMEOUT)
@$(RUN_TEST) ./receiver -v -timeout=$(TIMEOUT)

.PHONY: receiver-web
receiver-web: ## Run receiver compliance tests for a given receivers with a HTML results view.
@$(RUN_TEST) -json | tee $(RESULT_FILE)
@$(RUN_TEST) ./receiver -json | tee $(RESULT_FILE)
@$(MAKE) results-web

.PHONY: results-web
Expand Down
82 changes: 82 additions & 0 deletions remotewrite/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
module github.com/prometheus/compliance/remotewrite

go 1.25.0

require (
github.com/golang/snappy v1.0.0
github.com/oklog/run v1.2.0
github.com/prometheus/client_golang/exp v0.0.0-20250914183048-a974e0d45e0a
github.com/prometheus/common v0.67.2
github.com/prometheus/prometheus v0.307.4-0.20251119130332-1174b0ce4f1f
github.com/prometheus/sigv4 v0.3.0
github.com/stretchr/testify v1.11.1
)

require (
cloud.google.com/go/auth v0.17.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
cloud.google.com/go/compute/metadata v0.9.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.12.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.5.0 // indirect
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect
github.com/aws/aws-sdk-go-v2 v1.39.6 // indirect
github.com/aws/aws-sdk-go-v2/config v1.31.17 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.18.21 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.13 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.13 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.13 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.13 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.30.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.39.1 // indirect
github.com/aws/smithy-go v1.23.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v5 v5.3.0 // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
github.com/grafana/regexp v0.0.0-20250905093917-f7b3be9d1853 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/klauspost/compress v1.18.1 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.23.2 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/otlptranslator v1.0.0 // indirect
github.com/prometheus/procfs v0.16.1 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
go.opentelemetry.io/otel v1.38.0 // indirect
go.opentelemetry.io/otel/metric v1.38.0 // indirect
go.opentelemetry.io/otel/trace v1.38.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
golang.org/x/crypto v0.43.0 // indirect
golang.org/x/net v0.46.0 // indirect
golang.org/x/oauth2 v0.32.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.30.0 // indirect
golang.org/x/time v0.13.0 // indirect
google.golang.org/api v0.252.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797 // indirect
google.golang.org/grpc v1.76.0 // indirect
google.golang.org/protobuf v1.36.10 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apimachinery v0.34.1 // indirect
k8s.io/client-go v0.34.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
)
Loading