Skip to content

Commit 22d5dc4

Browse files
committed
Refactor tools: dedicated module for promtool
Promtool causes build errors when placed with other kubernetes tools, or dependencies. It looks like there was a breaking change in kubernetes libraries, and promtool has not caught up. Since promtool seems to lag behind a bit, it's best to place promtool in an isolated internal module.
1 parent 552d1cb commit 22d5dc4

File tree

8 files changed

+1210
-1105
lines changed

8 files changed

+1210
-1105
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,4 @@ docker-registry-secret:
257257
install-tools:
258258
go install tool
259259
cd internal/tools; go install tool; go tool
260+
cd internal/promtool; go install tool

go.mod

Lines changed: 111 additions & 123 deletions
Large diffs are not rendered by default.

go.sum

Lines changed: 313 additions & 396 deletions
Large diffs are not rendered by default.

internal/promtool/go.mod

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
module promtool
2+
3+
go 1.24.3
4+
5+
tool github.com/prometheus/prometheus/cmd/promtool
6+
7+
require (
8+
cloud.google.com/go/auth v0.16.0 // indirect
9+
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
10+
cloud.google.com/go/compute/metadata v0.6.0 // indirect
11+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0 // indirect
12+
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.9.0 // indirect
13+
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect
14+
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.7.0 // indirect
15+
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 // indirect
16+
github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2 // indirect
17+
github.com/Code-Hex/go-generics-cache v1.5.1 // indirect
18+
github.com/Microsoft/go-winio v0.6.1 // indirect
19+
github.com/alecthomas/kingpin/v2 v2.4.0 // indirect
20+
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect
21+
github.com/armon/go-metrics v0.4.1 // indirect
22+
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
23+
github.com/aws/aws-sdk-go v1.55.7 // indirect
24+
github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 // indirect
25+
github.com/beorn7/perks v1.0.1 // indirect
26+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
27+
github.com/cncf/xds/go v0.0.0-20250121191232-2f005788dc42 // indirect
28+
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
29+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
30+
github.com/dennwc/varint v1.0.0 // indirect
31+
github.com/digitalocean/godo v1.144.0 // indirect
32+
github.com/distribution/reference v0.5.0 // indirect
33+
github.com/docker/docker v28.1.1+incompatible // indirect
34+
github.com/docker/go-connections v0.4.0 // indirect
35+
github.com/docker/go-units v0.5.0 // indirect
36+
github.com/edsrzf/mmap-go v1.2.0 // indirect
37+
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
38+
github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect
39+
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
40+
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb // indirect
41+
github.com/fatih/color v1.16.0 // indirect
42+
github.com/felixge/httpsnoop v1.0.4 // indirect
43+
github.com/fsnotify/fsnotify v1.8.0 // indirect
44+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
45+
github.com/go-logr/logr v1.4.2 // indirect
46+
github.com/go-logr/stdr v1.2.2 // indirect
47+
github.com/go-openapi/analysis v0.23.0 // indirect
48+
github.com/go-openapi/errors v0.22.0 // indirect
49+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
50+
github.com/go-openapi/jsonreference v0.21.0 // indirect
51+
github.com/go-openapi/loads v0.22.0 // indirect
52+
github.com/go-openapi/spec v0.21.0 // indirect
53+
github.com/go-openapi/strfmt v0.23.0 // indirect
54+
github.com/go-openapi/swag v0.23.0 // indirect
55+
github.com/go-openapi/validate v0.24.0 // indirect
56+
github.com/go-resty/resty/v2 v2.16.5 // indirect
57+
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
58+
github.com/go-zookeeper/zk v1.0.4 // indirect
59+
github.com/gogo/protobuf v1.3.2 // indirect
60+
github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
61+
github.com/golang/protobuf v1.5.4 // indirect
62+
github.com/golang/snappy v1.0.0 // indirect
63+
github.com/google/gnostic-models v0.6.8 // indirect
64+
github.com/google/go-cmp v0.7.0 // indirect
65+
github.com/google/go-querystring v1.1.0 // indirect
66+
github.com/google/gofuzz v1.2.0 // indirect
67+
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
68+
github.com/google/s2a-go v0.1.9 // indirect
69+
github.com/google/uuid v1.6.0 // indirect
70+
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
71+
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
72+
github.com/gophercloud/gophercloud/v2 v2.7.0 // indirect
73+
github.com/gorilla/websocket v1.5.0 // indirect
74+
github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect
75+
github.com/hashicorp/consul/api v1.32.0 // indirect
76+
github.com/hashicorp/cronexpr v1.1.2 // indirect
77+
github.com/hashicorp/errwrap v1.1.0 // indirect
78+
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
79+
github.com/hashicorp/go-hclog v1.6.3 // indirect
80+
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
81+
github.com/hashicorp/go-multierror v1.1.1 // indirect
82+
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
83+
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
84+
github.com/hashicorp/go-version v1.7.0 // indirect
85+
github.com/hashicorp/golang-lru v0.6.0 // indirect
86+
github.com/hashicorp/nomad/api v0.0.0-20241218080744-e3ac00f30eec // indirect
87+
github.com/hashicorp/serf v0.10.1 // indirect
88+
github.com/hetznercloud/hcloud-go/v2 v2.21.0 // indirect
89+
github.com/ionos-cloud/sdk-go/v6 v6.3.3 // indirect
90+
github.com/jmespath/go-jmespath v0.4.0 // indirect
91+
github.com/josharian/intern v1.0.0 // indirect
92+
github.com/jpillora/backoff v1.0.0 // indirect
93+
github.com/json-iterator/go v1.1.12 // indirect
94+
github.com/klauspost/compress v1.18.0 // indirect
95+
github.com/knadh/koanf/maps v0.1.2 // indirect
96+
github.com/knadh/koanf/providers/confmap v0.1.0 // indirect
97+
github.com/knadh/koanf/v2 v2.1.2 // indirect
98+
github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect
99+
github.com/kylelemons/godebug v1.1.0 // indirect
100+
github.com/linode/linodego v1.49.0 // indirect
101+
github.com/mailru/easyjson v0.7.7 // indirect
102+
github.com/mattn/go-colorable v0.1.13 // indirect
103+
github.com/mattn/go-isatty v0.0.20 // indirect
104+
github.com/mdlayher/socket v0.4.1 // indirect
105+
github.com/mdlayher/vsock v1.2.1 // indirect
106+
github.com/miekg/dns v1.1.65 // indirect
107+
github.com/mitchellh/copystructure v1.2.0 // indirect
108+
github.com/mitchellh/go-homedir v1.1.0 // indirect
109+
github.com/mitchellh/mapstructure v1.5.0 // indirect
110+
github.com/mitchellh/reflectwalk v1.0.2 // indirect
111+
github.com/moby/docker-image-spec v1.3.1 // indirect
112+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
113+
github.com/modern-go/reflect2 v1.0.2 // indirect
114+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
115+
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
116+
github.com/nsf/jsondiff v0.0.0-20230430225905-43f6cf3098c1 // indirect
117+
github.com/oklog/ulid v1.3.1 // indirect
118+
github.com/oklog/ulid/v2 v2.1.0 // indirect
119+
github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.124.1 // indirect
120+
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.124.1 // indirect
121+
github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatocumulativeprocessor v0.124.1 // indirect
122+
github.com/opencontainers/go-digest v1.0.0 // indirect
123+
github.com/opencontainers/image-spec v1.0.2 // indirect
124+
github.com/ovh/go-ovh v1.7.0 // indirect
125+
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
126+
github.com/pkg/errors v0.9.1 // indirect
127+
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
128+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
129+
github.com/prometheus/alertmanager v0.28.1 // indirect
130+
github.com/prometheus/client_golang v1.22.0 // indirect
131+
github.com/prometheus/client_model v0.6.2 // indirect
132+
github.com/prometheus/common v0.63.0 // indirect
133+
github.com/prometheus/exporter-toolkit v0.14.0 // indirect
134+
github.com/prometheus/otlptranslator v0.0.0-20250320144820-d800c8b0eb07 // indirect
135+
github.com/prometheus/procfs v0.15.1 // indirect
136+
github.com/prometheus/prometheus v0.304.1 // indirect
137+
github.com/prometheus/sigv4 v0.1.2 // indirect
138+
github.com/puzpuzpuz/xsync/v3 v3.5.1 // indirect
139+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33 // indirect
140+
github.com/spf13/pflag v1.0.5 // indirect
141+
github.com/stretchr/testify v1.10.0 // indirect
142+
github.com/vultr/govultr/v2 v2.17.2 // indirect
143+
github.com/x448/float16 v0.8.4 // indirect
144+
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
145+
go.mongodb.org/mongo-driver v1.14.0 // indirect
146+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
147+
go.opentelemetry.io/collector/component v1.30.0 // indirect
148+
go.opentelemetry.io/collector/confmap v1.30.0 // indirect
149+
go.opentelemetry.io/collector/confmap/xconfmap v0.124.0 // indirect
150+
go.opentelemetry.io/collector/consumer v1.30.0 // indirect
151+
go.opentelemetry.io/collector/featuregate v1.30.0 // indirect
152+
go.opentelemetry.io/collector/internal/telemetry v0.124.0 // indirect
153+
go.opentelemetry.io/collector/pdata v1.30.0 // indirect
154+
go.opentelemetry.io/collector/pipeline v0.124.0 // indirect
155+
go.opentelemetry.io/collector/processor v1.30.0 // indirect
156+
go.opentelemetry.io/collector/semconv v0.124.0 // indirect
157+
go.opentelemetry.io/contrib/bridges/otelzap v0.10.0 // indirect
158+
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.60.0 // indirect
159+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
160+
go.opentelemetry.io/otel v1.35.0 // indirect
161+
go.opentelemetry.io/otel/log v0.11.0 // indirect
162+
go.opentelemetry.io/otel/metric v1.35.0 // indirect
163+
go.opentelemetry.io/otel/sdk v1.35.0 // indirect
164+
go.opentelemetry.io/otel/trace v1.35.0 // indirect
165+
go.uber.org/atomic v1.11.0 // indirect
166+
go.uber.org/goleak v1.3.0 // indirect
167+
go.uber.org/multierr v1.11.0 // indirect
168+
go.uber.org/zap v1.27.0 // indirect
169+
golang.org/x/crypto v0.37.0 // indirect
170+
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect
171+
golang.org/x/mod v0.24.0 // indirect
172+
golang.org/x/net v0.39.0 // indirect
173+
golang.org/x/oauth2 v0.29.0 // indirect
174+
golang.org/x/sync v0.13.0 // indirect
175+
golang.org/x/sys v0.32.0 // indirect
176+
golang.org/x/term v0.31.0 // indirect
177+
golang.org/x/text v0.24.0 // indirect
178+
golang.org/x/time v0.11.0 // indirect
179+
golang.org/x/tools v0.32.0 // indirect
180+
google.golang.org/api v0.230.0 // indirect
181+
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
182+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e // indirect
183+
google.golang.org/grpc v1.72.0 // indirect
184+
google.golang.org/protobuf v1.36.6 // indirect
185+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
186+
gopkg.in/inf.v0 v0.9.1 // indirect
187+
gopkg.in/ini.v1 v1.67.0 // indirect
188+
gopkg.in/yaml.v2 v2.4.0 // indirect
189+
gopkg.in/yaml.v3 v3.0.1 // indirect
190+
k8s.io/api v0.32.3 // indirect
191+
k8s.io/apimachinery v0.32.3 // indirect
192+
k8s.io/client-go v0.32.3 // indirect
193+
k8s.io/klog/v2 v2.130.1 // indirect
194+
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect
195+
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
196+
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
197+
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
198+
sigs.k8s.io/yaml v1.4.0 // indirect
199+
)

0 commit comments

Comments
 (0)