Skip to content

Commit

Permalink
commentMonitor: Refactor, cleanup and rename to comment-monitor. (#805)
Browse files Browse the repository at this point in the history
Some examples on how old one works (vs the unit test I added): prometheus/prometheus#15487

Signed-off-by: bwplotka <[email protected]>
  • Loading branch information
bwplotka authored Dec 13, 2024
1 parent 930224a commit d5e383c
Show file tree
Hide file tree
Showing 21 changed files with 1,116 additions and 614 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ jobs:
password_variable: DOCKER_PASSWORD
- prometheus/publish_images:
container_image_name: comment-monitor
dockerfile_path: "tools/commentMonitor/Dockerfile"
dockerbuild_context: "tools/commentMonitor/"
dockerfile_path: "tools/comment-monitor/Dockerfile"
dockerbuild_context: "tools/comment-monitor/"
registry: docker.io
organization: "$DOCKER_ORG"
login_variable: DOCKER_LOGIN
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.idea/
/tools/amGithubNotifier/amGithubNotifier
/tools/commentMonitor/commentMonitor
/tools/comment-monitor/comment-monitor
/tools/fake-webserver/fake-webserver
/tools/scaler/scaler
/infra/infra
Expand Down
4 changes: 2 additions & 2 deletions .promu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ build:
path: ./infra
- name: tools/amGithubNotifier
path: ./tools/amGithubNotifier
- name: tools/commentMonitor
path: ./tools/commentMonitor
- name: tools/comment-monitor
path: ./tools/comment-monitor
- name: tools/fake-webserver
path: ./tools/fake-webserver
- name: tools/scaler
Expand Down
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,21 @@ docs-check:
generate-dashboards-cm:
./scripts/sync-dashboards-to-configmap.sh

GOIMPORTS = goimports
$(GOIMPORTS):
@go install golang.org/x/tools/cmd/goimports@latest

GOFUMPT = gofumpt
$(GOFUMPT):
@go install mvdan.cc/gofumpt@latest

GO_FILES = $(shell find . -path ./vendor -prune -o -name '*.go' -print)

.PHONY: format
format: $(GOFUMPT) $(GOIMPORTS)
@echo ">> formating imports)"
@$(GOIMPORTS) -local github.com/prometheus/test-infra -w $(GO_FILES)
@echo ">> gofumpt-ing the code; golangci-lint requires this"
@$(GOFUMPT) -extra -w $(GO_FILES)

include Makefile.common
31 changes: 18 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require (
cloud.google.com/go/container v1.41.0
github.com/aws/aws-sdk-go v1.55.5
github.com/google/go-github/v29 v29.0.3
github.com/nelkinda/health-go v0.0.1
github.com/prometheus/alertmanager v0.27.0
github.com/prometheus/client_golang v1.20.5
github.com/prometheus/common v0.60.1
Expand All @@ -18,7 +19,7 @@ require (
k8s.io/apiextensions-apiserver v0.31.2
k8s.io/apimachinery v0.31.2
k8s.io/client-go v0.31.2
k8s.io/cloud-provider-gcp v0.0.0-20231031161848-992c1c33f1be
k8s.io/cloud-provider-gcp v0.0.0-20241115222652-d74b2e1d6653
sigs.k8s.io/aws-iam-authenticator v0.6.27
sigs.k8s.io/kind v0.25.0
)
Expand Down Expand Up @@ -58,6 +59,7 @@ require (
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mozillazg/go-httpheader v0.2.1 // indirect
github.com/ncw/swift v1.0.53 // indirect
github.com/nelkinda/http-go v0.0.1 // indirect
github.com/oracle/oci-go-sdk/v65 v65.41.1 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/rs/xid v1.5.0 // indirect
Expand Down Expand Up @@ -100,7 +102,7 @@ require (
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-cmp v0.6.0
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/s2a-go v0.1.8 // indirect
Expand Down Expand Up @@ -131,7 +133,7 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/oklog/run v1.1.0
github.com/oklog/ulid v1.3.1 // indirect
github.com/onsi/gomega v1.33.1 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
Expand All @@ -149,18 +151,18 @@ require (
github.com/thanos-io/objstore v0.0.0-20240913165201-fd105025a2e5
github.com/x448/float16 v0.8.4 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect
go.opentelemetry.io/otel v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect
go.opentelemetry.io/otel v1.30.0 // indirect
go.opentelemetry.io/otel/metric v1.30.0 // indirect
go.opentelemetry.io/otel/trace v1.30.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/term v0.25.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/sync v0.10.0
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.7.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 // indirect
Expand All @@ -175,3 +177,6 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

// Remove broken version.
exclude k8s.io/cloud-provider-gcp/providers v0.0.0-00010101000000-000000000000
Loading

0 comments on commit d5e383c

Please sign in to comment.