Skip to content

Commit baf626e

Browse files
committed
Merge remote-tracking branch 'upstream/master' into cache-index-writes
Signed-off-by: Goutham Veeramachaneni <[email protected]>
2 parents df519ab + 1132a52 commit baf626e

File tree

176 files changed

+592
-532
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+592
-532
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ version: 2
33
# https://circleci.com/blog/circleci-hacks-reuse-yaml-in-your-circleci-config-with-yaml/
44
defaults: &defaults
55
docker:
6-
- image: cortexproject/cortex-build-image:check-vendor-87fd0610a
7-
working_directory: /go/src/github.com/weaveworks/cortex
6+
- image: cortexproject/build-image:switch-imports-f7f4e51d7
7+
working_directory: /go/src/github.com/cortexproject/cortex
88

99
workflows:
1010
version: 2
@@ -46,12 +46,12 @@ jobs:
4646

4747
integration:
4848
docker:
49-
- image: weaveworks/cortex-build-image:master-af2a0261
49+
- image: cortexproject/build-image:switch-imports-f7f4e51d7
5050
- image: circleci/postgres:9.6.2-alpine
5151
environment:
5252
POSTGRES_DB: configs_test
5353

54-
working_directory: /go/src/github.com/weaveworks/cortex
54+
working_directory: /go/src/github.com/cortexproject/cortex
5555
steps:
5656
- checkout
5757
- run:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cmd/query-frontend/query-frontend
77
cmd/ruler/ruler
88
cmd/table-manager/table-manager
99
cmd/lite/lite
10+
cmd/test-exporter/test-exporter
1011
.uptodate
1112
.pkg
1213
.cache

Gopkg.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ UPTODATE := .uptodate
1818
touch $@
1919

2020
# We don't want find to scan inside a bunch of directories, to accelerate the
21-
# 'make: Entering directory '/go/src/github.com/weaveworks/cortex' phase.
21+
# 'make: Entering directory '/go/src/github.com/cortexproject/cortex' phase.
2222
DONT_FIND := -name tools -prune -o -name vendor -prune -o -name .git -prune -o -name .cache -prune -o -name .pkg -prune -o
2323

2424
# Get a list of directories containing Dockerfiles
@@ -86,7 +86,7 @@ $(EXES) $(PROTO_GOS) lint test shell dep-check: build-image/$(UPTODATE)
8686
$(SUDO) time docker run $(RM) $(TTY) -i \
8787
-v $(shell pwd)/.cache:/go/cache \
8888
-v $(shell pwd)/.pkg:/go/pkg \
89-
-v $(shell pwd):/go/src/github.com/weaveworks/cortex \
89+
-v $(shell pwd):/go/src/github.com/cortexproject/cortex \
9090
$(IMAGE_PREFIX)build-image $@;
9191

9292
configs-integration-test: build-image/$(UPTODATE)
@@ -96,10 +96,10 @@ configs-integration-test: build-image/$(UPTODATE)
9696
$(SUDO) docker run $(RM) $(TTY) -i \
9797
-v $(shell pwd)/.cache:/go/cache \
9898
-v $(shell pwd)/.pkg:/go/pkg \
99-
-v $(shell pwd):/go/src/github.com/weaveworks/cortex \
99+
-v $(shell pwd):/go/src/github.com/cortexproject/cortex \
100100
-v $(shell pwd)/cmd/configs/migrations:/migrations \
101101
-e MIGRATIONS_DIR=/migrations \
102-
--workdir /go/src/github.com/weaveworks/cortex \
102+
--workdir /go/src/github.com/cortexproject/cortex \
103103
--link "$$DB_CONTAINER":configs-db.cortex.local \
104104
$(IMAGE_PREFIX)build-image $@; \
105105
status=$$?; \

build-image/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ ENTRYPOINT ["/build.sh"]
2727

2828
ARG revision
2929
LABEL org.opencontainers.image.title="build-image" \
30-
org.opencontainers.image.source="https://github.com/weaveworks/cortex/tree/master/build-image" \
30+
org.opencontainers.image.source="https://github.com/cortexproject/cortex/tree/master/build-image" \
3131
org.opencontainers.image.revision="${revision}"

build-image/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -eu
44

5-
SRC_PATH=$GOPATH/src/github.com/weaveworks/cortex
5+
SRC_PATH=$GOPATH/src/github.com/cortexproject/cortex
66

77
# If we run make directly, any files created on the bind mount
88
# will have awkward ownership. So we switch to a user with the

cmd/alertmanager/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ ENTRYPOINT [ "/bin/alertmanager" ]
66

77
ARG revision
88
LABEL org.opencontainers.image.title="alertmanager" \
9-
org.opencontainers.image.source="https://github.com/weaveworks/cortex/tree/master/cmd/alertmanager" \
9+
org.opencontainers.image.source="https://github.com/cortexproject/cortex/tree/master/cmd/alertmanager" \
1010
org.opencontainers.image.revision="${revision}"

cmd/alertmanager/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ import (
1919

2020
"google.golang.org/grpc"
2121

22+
"github.com/cortexproject/cortex/pkg/alertmanager"
23+
"github.com/cortexproject/cortex/pkg/util"
2224
"github.com/go-kit/kit/log/level"
2325
"github.com/weaveworks/common/middleware"
2426
"github.com/weaveworks/common/server"
25-
"github.com/weaveworks/cortex/pkg/alertmanager"
26-
"github.com/weaveworks/cortex/pkg/util"
2727
)
2828

2929
func main() {

cmd/configs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ ENTRYPOINT [ "/bin/configs" ]
77

88
ARG revision
99
LABEL org.opencontainers.image.title="configs" \
10-
org.opencontainers.image.source="https://github.com/weaveworks/cortex/tree/master/cmd/configs" \
10+
org.opencontainers.image.source="https://github.com/cortexproject/cortex/tree/master/cmd/configs" \
1111
org.opencontainers.image.revision="${revision}"

cmd/configs/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import (
77
"github.com/go-kit/kit/log/level"
88
"google.golang.org/grpc"
99

10+
"github.com/cortexproject/cortex/pkg/configs/api"
11+
"github.com/cortexproject/cortex/pkg/configs/db"
12+
"github.com/cortexproject/cortex/pkg/util"
1013
"github.com/weaveworks/common/middleware"
1114
"github.com/weaveworks/common/server"
12-
"github.com/weaveworks/cortex/pkg/configs/api"
13-
"github.com/weaveworks/cortex/pkg/configs/db"
14-
"github.com/weaveworks/cortex/pkg/util"
1515
)
1616

1717
func main() {

cmd/distributor/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ ENTRYPOINT [ "/bin/distributor" ]
66

77
ARG revision
88
LABEL org.opencontainers.image.title="distributor" \
9-
org.opencontainers.image.source="https://github.com/weaveworks/cortex/tree/master/cmd/distributor" \
9+
org.opencontainers.image.source="https://github.com/cortexproject/cortex/tree/master/cmd/distributor" \
1010
org.opencontainers.image.revision="${revision}"

cmd/distributor/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import (
1111
"github.com/prometheus/client_golang/prometheus"
1212
"google.golang.org/grpc"
1313

14+
"github.com/cortexproject/cortex/pkg/distributor"
15+
"github.com/cortexproject/cortex/pkg/ingester/client"
16+
"github.com/cortexproject/cortex/pkg/ring"
17+
"github.com/cortexproject/cortex/pkg/util"
1418
"github.com/weaveworks/common/middleware"
1519
"github.com/weaveworks/common/server"
1620
"github.com/weaveworks/common/tracing"
17-
"github.com/weaveworks/cortex/pkg/distributor"
18-
"github.com/weaveworks/cortex/pkg/ingester/client"
19-
"github.com/weaveworks/cortex/pkg/ring"
20-
"github.com/weaveworks/cortex/pkg/util"
2121
)
2222

2323
func main() {

cmd/ingester/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ ENTRYPOINT [ "/bin/ingester" ]
66

77
ARG revision
88
LABEL org.opencontainers.image.title="ingester" \
9-
org.opencontainers.image.source="https://github.com/weaveworks/cortex/tree/master/cmd/ingester" \
9+
org.opencontainers.image.source="https://github.com/cortexproject/cortex/tree/master/cmd/ingester" \
1010
org.opencontainers.image.revision="${revision}"

cmd/ingester/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ import (
1010
_ "google.golang.org/grpc/encoding/gzip" // get gzip compressor registered
1111
"google.golang.org/grpc/health/grpc_health_v1"
1212

13+
"github.com/cortexproject/cortex/pkg/chunk"
14+
"github.com/cortexproject/cortex/pkg/chunk/storage"
15+
"github.com/cortexproject/cortex/pkg/ingester"
16+
"github.com/cortexproject/cortex/pkg/ingester/client"
17+
"github.com/cortexproject/cortex/pkg/util"
1318
"github.com/weaveworks/common/middleware"
1419
"github.com/weaveworks/common/server"
1520
"github.com/weaveworks/common/tracing"
16-
"github.com/weaveworks/cortex/pkg/chunk"
17-
"github.com/weaveworks/cortex/pkg/chunk/storage"
18-
"github.com/weaveworks/cortex/pkg/ingester"
19-
"github.com/weaveworks/cortex/pkg/ingester/client"
20-
"github.com/weaveworks/cortex/pkg/util"
2121
)
2222

2323
func main() {

cmd/lite/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ ENTRYPOINT [ "/bin/cortex" ]
66

77
ARG revision
88
LABEL org.opencontainers.image.title="lite" \
9-
org.opencontainers.image.source="https://github.com/weaveworks/cortex/tree/master/cmd/lite" \
9+
org.opencontainers.image.source="https://github.com/cortexproject/cortex/tree/master/cmd/lite" \
1010
org.opencontainers.image.revision="${revision}"

cmd/lite/main.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ import (
1515
"github.com/prometheus/tsdb"
1616
"google.golang.org/grpc"
1717

18+
"github.com/cortexproject/cortex/pkg/chunk"
19+
"github.com/cortexproject/cortex/pkg/chunk/storage"
20+
"github.com/cortexproject/cortex/pkg/distributor"
21+
"github.com/cortexproject/cortex/pkg/ingester"
22+
"github.com/cortexproject/cortex/pkg/ingester/client"
23+
"github.com/cortexproject/cortex/pkg/querier"
24+
"github.com/cortexproject/cortex/pkg/ring"
25+
"github.com/cortexproject/cortex/pkg/ruler"
26+
"github.com/cortexproject/cortex/pkg/util"
1827
"github.com/weaveworks/common/middleware"
1928
"github.com/weaveworks/common/server"
2029
"github.com/weaveworks/common/tracing"
2130
"github.com/weaveworks/common/user"
22-
"github.com/weaveworks/cortex/pkg/chunk"
23-
"github.com/weaveworks/cortex/pkg/chunk/storage"
24-
"github.com/weaveworks/cortex/pkg/distributor"
25-
"github.com/weaveworks/cortex/pkg/ingester"
26-
"github.com/weaveworks/cortex/pkg/ingester/client"
27-
"github.com/weaveworks/cortex/pkg/querier"
28-
"github.com/weaveworks/cortex/pkg/ring"
29-
"github.com/weaveworks/cortex/pkg/ruler"
30-
"github.com/weaveworks/cortex/pkg/util"
3131
)
3232

3333
func main() {
@@ -172,7 +172,7 @@ func main() {
172172

173173
// Only serve the API for setting & getting rules configs if we're not
174174
// serving configs from the configs API. Allows for smoother
175-
// migration. See https://github.com/weaveworks/cortex/issues/619
175+
// migration. See https://github.com/cortexproject/cortex/issues/619
176176
if configStoreConfig.ConfigsAPIURL.URL == nil {
177177
a, err := ruler.NewAPIFromConfig(configStoreConfig.DBConfig)
178178
if err != nil {

cmd/querier/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ ENTRYPOINT [ "/bin/querier" ]
66

77
ARG revision
88
LABEL org.opencontainers.image.title="querier" \
9-
org.opencontainers.image.source="https://github.com/weaveworks/cortex/tree/master/cmd/querier" \
9+
org.opencontainers.image.source="https://github.com/cortexproject/cortex/tree/master/cmd/querier" \
1010
org.opencontainers.image.revision="${revision}"

cmd/querier/main.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ import (
1414
"github.com/prometheus/prometheus/web/api/v1"
1515
"github.com/prometheus/tsdb"
1616

17+
"github.com/cortexproject/cortex/pkg/chunk"
18+
"github.com/cortexproject/cortex/pkg/chunk/storage"
19+
"github.com/cortexproject/cortex/pkg/distributor"
20+
"github.com/cortexproject/cortex/pkg/querier"
21+
"github.com/cortexproject/cortex/pkg/querier/frontend"
22+
"github.com/cortexproject/cortex/pkg/ring"
23+
"github.com/cortexproject/cortex/pkg/util"
1724
httpgrpc_server "github.com/weaveworks/common/httpgrpc/server"
1825
"github.com/weaveworks/common/middleware"
1926
"github.com/weaveworks/common/server"
2027
"github.com/weaveworks/common/tracing"
21-
"github.com/weaveworks/cortex/pkg/chunk"
22-
"github.com/weaveworks/cortex/pkg/chunk/storage"
23-
"github.com/weaveworks/cortex/pkg/distributor"
24-
"github.com/weaveworks/cortex/pkg/querier"
25-
"github.com/weaveworks/cortex/pkg/querier/frontend"
26-
"github.com/weaveworks/cortex/pkg/ring"
27-
"github.com/weaveworks/cortex/pkg/util"
2828
)
2929

3030
func main() {

cmd/query-frontend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ ENTRYPOINT [ "/bin/query-frontend" ]
66

77
ARG revision
88
LABEL org.opencontainers.image.title="query-frontend" \
9-
org.opencontainers.image.source="https://github.com/weaveworks/cortex/tree/master/cmd/query-frontend" \
9+
org.opencontainers.image.source="https://github.com/cortexproject/cortex/tree/master/cmd/query-frontend" \
1010
org.opencontainers.image.revision="${revision}"

cmd/query-frontend/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import (
77
"github.com/go-kit/kit/log/level"
88
"google.golang.org/grpc"
99

10+
"github.com/cortexproject/cortex/pkg/querier/frontend"
11+
"github.com/cortexproject/cortex/pkg/util"
1012
"github.com/weaveworks/common/middleware"
1113
"github.com/weaveworks/common/server"
1214
"github.com/weaveworks/common/tracing"
13-
"github.com/weaveworks/cortex/pkg/querier/frontend"
14-
"github.com/weaveworks/cortex/pkg/util"
1515
)
1616

1717
func main() {

cmd/ruler/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ ENTRYPOINT [ "/bin/ruler" ]
66

77
ARG revision
88
LABEL org.opencontainers.image.title="ruler" \
9-
org.opencontainers.image.source="https://github.com/weaveworks/cortex/tree/master/cmd/ruler" \
9+
org.opencontainers.image.source="https://github.com/cortexproject/cortex/tree/master/cmd/ruler" \
1010
org.opencontainers.image.revision="${revision}"

cmd/ruler/main.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ import (
88
"github.com/prometheus/client_golang/prometheus"
99
"google.golang.org/grpc"
1010

11+
"github.com/cortexproject/cortex/pkg/chunk"
12+
"github.com/cortexproject/cortex/pkg/chunk/storage"
13+
"github.com/cortexproject/cortex/pkg/distributor"
14+
"github.com/cortexproject/cortex/pkg/querier"
15+
"github.com/cortexproject/cortex/pkg/ring"
16+
"github.com/cortexproject/cortex/pkg/ruler"
17+
"github.com/cortexproject/cortex/pkg/util"
1118
"github.com/weaveworks/common/middleware"
1219
"github.com/weaveworks/common/server"
1320
"github.com/weaveworks/common/tracing"
14-
"github.com/weaveworks/cortex/pkg/chunk"
15-
"github.com/weaveworks/cortex/pkg/chunk/storage"
16-
"github.com/weaveworks/cortex/pkg/distributor"
17-
"github.com/weaveworks/cortex/pkg/querier"
18-
"github.com/weaveworks/cortex/pkg/ring"
19-
"github.com/weaveworks/cortex/pkg/ruler"
20-
"github.com/weaveworks/cortex/pkg/util"
2121
)
2222

2323
func main() {
@@ -108,7 +108,7 @@ func main() {
108108

109109
// Only serve the API for setting & getting rules configs if we're not
110110
// serving configs from the configs API. Allows for smoother
111-
// migration. See https://github.com/weaveworks/cortex/issues/619
111+
// migration. See https://github.com/cortexproject/cortex/issues/619
112112
if configStoreConfig.ConfigsAPIURL.URL == nil {
113113
a, err := ruler.NewAPIFromConfig(configStoreConfig.DBConfig)
114114
if err != nil {

cmd/table-manager/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ ENTRYPOINT [ "/bin/table-manager" ]
66

77
ARG revision
88
LABEL org.opencontainers.image.title="table-manager" \
9-
org.opencontainers.image.source="https://github.com/weaveworks/cortex/tree/master/cmd/table-manager" \
9+
org.opencontainers.image.source="https://github.com/cortexproject/cortex/tree/master/cmd/table-manager" \
1010
org.opencontainers.image.revision="${revision}"

cmd/table-manager/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import (
77
"github.com/go-kit/kit/log/level"
88
"google.golang.org/grpc"
99

10+
"github.com/cortexproject/cortex/pkg/chunk"
11+
"github.com/cortexproject/cortex/pkg/chunk/storage"
12+
"github.com/cortexproject/cortex/pkg/ingester"
13+
"github.com/cortexproject/cortex/pkg/util"
1014
"github.com/weaveworks/common/middleware"
1115
"github.com/weaveworks/common/server"
12-
"github.com/weaveworks/cortex/pkg/chunk"
13-
"github.com/weaveworks/cortex/pkg/chunk/storage"
14-
"github.com/weaveworks/cortex/pkg/ingester"
15-
"github.com/weaveworks/cortex/pkg/util"
1616
)
1717

1818
func main() {

cmd/test-exporter/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ ENTRYPOINT ["/test-exporter"]
55

66
ARG revision
77
LABEL org.opencontainers.image.title="test-exporter" \
8-
org.opencontainers.image.source="https://github.com/weaveworks/cortex/tree/master/cmd/test-exporter" \
8+
org.opencontainers.image.source="https://github.com/cortexproject/cortex/tree/master/cmd/test-exporter" \
99
org.opencontainers.image.revision="${revision}"

cmd/test-exporter/main.go

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ package main
33
import (
44
"flag"
55
"math"
6+
"os"
67
"time"
78

9+
"github.com/go-kit/kit/log/level"
810
"github.com/prometheus/client_golang/prometheus"
9-
log "github.com/sirupsen/logrus"
10-
"github.com/weaveworks/common/server"
1111

12-
"github.com/weaveworks/cortex/pkg/querier/correctness"
12+
"github.com/cortexproject/cortex/pkg/querier/correctness"
13+
"github.com/cortexproject/cortex/pkg/util"
14+
"github.com/weaveworks/common/server"
15+
"github.com/weaveworks/common/tracing"
1316
)
1417

1518
var (
@@ -25,15 +28,23 @@ func main() {
2528
runnerConfig.RegisterFlags(flag.CommandLine)
2629
flag.Parse()
2730

31+
// Setting the environment variable JAEGER_AGENT_HOST enables tracing
32+
trace := tracing.NewFromEnv("test-exporter")
33+
defer trace.Close()
34+
35+
util.InitLogger(&serverConfig)
36+
2837
server, err := server.New(serverConfig)
2938
if err != nil {
30-
log.Fatal(err)
39+
level.Error(util.Logger).Log("msg", "error initializing server", "err", err)
40+
os.Exit(1)
3141
}
3242
defer server.Shutdown()
3343

3444
runner, err := correctness.NewRunner(runnerConfig)
3545
if err != nil {
36-
log.Fatal(err)
46+
level.Error(util.Logger).Log("msg", "error initializing runner", "err", err)
47+
os.Exit(1)
3748
}
3849
defer runner.Stop()
3950

0 commit comments

Comments
 (0)