Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
Fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ywwg committed Oct 11, 2022
1 parent 0c8561c commit 823834a
Show file tree
Hide file tree
Showing 25 changed files with 1,166 additions and 87 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- image: circleci/golang:1.17.3
steps:
- checkout
- run: GO111MODULE=off go test -v -race --short ./...
- run: go test -v -race --short ./...

qa:
working_directory: /go/src/github.com/grafana/metrictank
Expand Down Expand Up @@ -53,8 +53,8 @@ jobs:
- run: go version
- run: scripts/qa/docs.sh
- run: docker load -i build_docker/metrictank.tar
- run: GO111MODULE=off go test -v ./stacktest/tests/end2end_carbon
- run: GO111MODULE=off go test -v ./stacktest/tests/end2end_carbon_bigtable
- run: go test -v ./pkg/stacktest/tests/end2end_carbon
- run: go test -v ./pkg/stacktest/tests/end2end_carbon_bigtable

qa-chaos:
working_directory: /home/circleci/.go_workspace/src/github.com/grafana/metrictank
Expand All @@ -75,7 +75,7 @@ jobs:
- run: docker pull jaegertracing/all-in-one
# kafka broker advertises itself as 'kafka' but that doesn't resolve. we do have a docker proxy on localhost
- run: echo "127.0.0.1 kafka" | sudo tee -a /etc/hosts
- run: GO111MODULE=off go test -v ./stacktest/tests/chaos_cluster
- run: go test -v ./pkg/stacktest/tests/chaos_cluster

deploy:
docker:
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
default:
$(MAKE) all
test:
GO111MODULE=off CGO_ENABLED=1 go test -race -short ./...
CGO_ENABLED=1 go test -race -short ./...
test-all:
GO111MODULE=off CGO_ENABLED=1 go test -race ./...
CGO_ENABLED=1 go test -race ./...
benchmark:
GO111MODULE=off CGO_ENABLED=0 go test -count=10 -run='^$$' -bench=. -benchtime=100ms ./... | tee benchmark.txt
CGO_ENABLED=0 go test -count=10 -run='^$$' -bench=. -benchtime=100ms ./... | tee benchmark.txt

stacktest:
# count=1 forces uncached runs
# not using stacktest/... here because Go would run them all in parallel,
# or at least the TestMain's, and the stacks would conflict with each other
GO111MODULE=off go test -count=1 -v ./stacktest/tests/chaos_cluster
GO111MODULE=off go test -count=1 -v ./stacktest/tests/end2end_carbon
GO111MODULE=off go test -count=1 -v ./stacktest/tests/end2end_carbon_bigtable
go test -count=1 -v ./pkg/stacktest/tests/chaos_cluster
go test -count=1 -v ./pkg/stacktest/tests/end2end_carbon
go test -count=1 -v ./pkg/stacktest/tests/end2end_carbon_bigtable

check:
$(MAKE) test
Expand Down
6 changes: 3 additions & 3 deletions cmd/mt-gateway/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"testing"
)

//Set up a mock http.ServeMux that returns the name of the service routed to.
//We then verify that we're routing to the expected service
// Set up a mock http.ServeMux that returns the name of the service routed to.
// We then verify that we're routing to the expected service
func TestApi(t *testing.T) {
mux := Api{
ingestHandler: stubHandler("ingest"),
Expand Down Expand Up @@ -66,7 +66,7 @@ func TestApi(t *testing.T) {

}

//creates a new http.Handler that always responds with the name of the service
// creates a new http.Handler that always responds with the name of the service
func stubHandler(svc string) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(svc))
Expand Down
2 changes: 1 addition & 1 deletion cmd/mt-store-cp-experimental/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func main() {
fmt.Fprintln(os.Stderr, "Copies data in Cassandra to use another table (and possibly another cluster).")
fmt.Fprintln(os.Stderr, "It is up to you to assure table-out exists before running this tool")
fmt.Fprintln(os.Stderr, "This tool is EXPERIMENTAL and needs doublechecking whether data is successfully written to Cassandra")
fmt.Fprintln(os.Stderr, "see https://github.com/grafana/metrictank/pkg/pull/909 for details")
fmt.Fprintln(os.Stderr, "see https://github.com/grafana/metrictank/pull/909 for details")
fmt.Fprintln(os.Stderr, "Please report good or bad experiences in the above ticket or in a new one")
fmt.Println("Flags:")
flag.PrintDefaults()
Expand Down
19 changes: 14 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ require (
github.com/metrics20/go-metrics20 v0.0.0-20171130201432-27c134d83f76
github.com/mitchellh/go-homedir v1.1.0
github.com/opentracing/opentracing-go v1.1.0
github.com/pelletier/go-toml v1.2.0
github.com/pelletier/go-toml v1.9.5
github.com/prometheus/client_golang v1.4.0
github.com/prometheus/procfs v0.0.8
github.com/raintank/dur v0.0.0-20181019115741-955e3a77c6a8
Expand All @@ -47,7 +47,7 @@ require (
github.com/tinylib/msgp v1.1.0
github.com/uber/jaeger-client-go v2.30.0+incompatible
github.com/xdg/scram v0.0.1
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f
golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e
gopkg.in/macaron.v1 v1.3.4
)
Expand All @@ -57,11 +57,16 @@ require (
cloud.google.com/go/compute v1.7.0 // indirect
cloud.google.com/go/iam v0.3.0 // indirect
github.com/DataDog/datadog-go v3.2.0+incompatible // indirect
github.com/Dieterbe/metrics2docs v0.0.0-20161227222501-c4d2ec832956 // indirect
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/vcs v1.13.3 // indirect
github.com/Microsoft/go-winio v0.4.5 // indirect
github.com/alexcesaro/statsd v2.0.0+incompatible // indirect
github.com/armon/go-metrics v0.3.10 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/boltdb/bolt v1.3.1 // indirect
github.com/census-instrumentation/opencensus-proto v0.2.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 // indirect
Expand All @@ -78,6 +83,7 @@ require (
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/glacjay/goini v0.0.0-20161120062552-fd3024d87ee2 // indirect
github.com/go-macaron/inject v0.0.0-20160627170012-d8a0b8677191 // indirect
github.com/golang/dep v0.5.4 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/btree v1.1.2 // indirect
Expand All @@ -94,6 +100,7 @@ require (
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jcmturner/gofork v1.0.0 // indirect
github.com/jmank88/nuts v0.4.0 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/klauspost/compress v1.10.2 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
Expand All @@ -103,13 +110,15 @@ require (
github.com/miekg/dns v1.1.41 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/nightlyone/lockfile v1.0.0 // indirect
github.com/philhofer/fwd v1.0.0 // indirect
github.com/pierrec/lz4 v2.5.2+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.9.1 // indirect
github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563 // indirect
github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521 // indirect
github.com/sdboyer/constext v0.0.0-20170321163424-836a14457353 // indirect
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
github.com/smartystreets/assertions v1.0.1 // indirect
github.com/spf13/afero v1.2.2 // indirect
Expand All @@ -126,14 +135,14 @@ require (
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect
golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect
golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
golang.org/x/sys v0.0.0-20221006211917-84dc82d7e875 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
google.golang.org/api v0.85.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b // indirect
google.golang.org/grpc v1.48.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/alexcesaro/statsd.v1 v1.0.0-20160306065229-c289775e46fd // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand All @@ -142,6 +151,6 @@ require (
gopkg.in/jcmturner/dnsutils.v1 v1.0.1 // indirect
gopkg.in/jcmturner/gokrb5.v7 v7.5.0 // indirect
gopkg.in/jcmturner/rpc.v1 v1.1.0 // indirect
gopkg.in/yaml.v2 v2.2.8 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
)
Loading

0 comments on commit 823834a

Please sign in to comment.