Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade loki and related dependencies #277

Merged
merged 13 commits into from
Sep 6, 2023
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
26 changes: 15 additions & 11 deletions .github/workflows/validate_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,34 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3.7.0
with:
version: v1.31
version: v1.54.2
unit_tests:
name: Unit-Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go 1.16
uses: actions/setup-go@v1
- uses: actions/checkout@v3
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.16
go-version: 1.21
- name: Unit Tests
run: make test
build:
name: Build Binaries
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go 1.16
uses: actions/setup-go@v1
- uses: actions/checkout@v3
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.16
go-version: 1.21
- name: Build All
run: make all
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ dist/
/metrics-in-grafana.json
/prometheus-metrics.json
/metrics-in-ruler.json
.idea
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Order should be `CHANGE`, `FEATURE`, `ENHANCEMENT`, and `BUGFIX`

* [FEATURE] Support Arm64 on Darwin for all binaries (benchtool etc). #215
* [BUGFIX] Fix `cortextool rules` legends displaying wrong symbols for updates and deletions. #226
* [CHANGE] Upgrade modules to latest versions

## v0.10.7

Expand Down
14 changes: 2 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ GIT_REVISION := $(shell git rev-parse --short HEAD)
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
GO_FLAGS := -mod=vendor -ldflags "-extldflags \"-static\" -s -w -X $(VPREFIX).Branch=$(GIT_BRANCH) -X $(VPREFIX).Version=$(IMAGE_TAG) -X $(VPREFIX).Revision=$(GIT_REVISION)" -tags netgo

all: cortextool chunktool logtool
images: cortextool-image chunktool-image logtool-image benchtool-image
all: cortextool logtool
images: cortextool-image logtool-image benchtool-image
benchtool: cmd/benchtool/benchtool
cortextool: cmd/cortextool/cortextool
chunktool: cmd/chunktool/chunktool
logtool: cmd/logtool/logtool
e2ealerting: cmd/e2ealerting/e2ealerting
blockscopy: cmd/blockscopy/blockscopy
Expand All @@ -24,10 +23,6 @@ cortextool-image:
$(SUDO) docker build -t $(IMAGE_PREFIX)/cortextool -f cmd/cortextool/Dockerfile .
$(SUDO) docker tag $(IMAGE_PREFIX)/cortextool $(IMAGE_PREFIX)/cortextool:$(IMAGE_TAG)

chunktool-image:
$(SUDO) docker build -t $(IMAGE_PREFIX)/chunktool -f cmd/chunktool/Dockerfile .
$(SUDO) docker tag $(IMAGE_PREFIX)/chunktool $(IMAGE_PREFIX)/chunktool:$(IMAGE_TAG)

logtool-image:
$(SUDO) docker build -t $(IMAGE_PREFIX)/logtool -f cmd/logtool/Dockerfile .
$(SUDO) docker tag $(IMAGE_PREFIX)/logtool $(IMAGE_PREFIX)/logtool:$(IMAGE_TAG)
Expand All @@ -48,9 +43,6 @@ cmd/benchtool/benchtool: $(APP_GO_FILES) cmd/benchtool/main.go
cmd/cortextool/cortextool: $(APP_GO_FILES) cmd/cortextool/main.go
CGO_ENABLED=0 go build $(GO_FLAGS) -o $@ ./$(@D)

cmd/chunktool/chunktool: $(APP_GO_FILES) cmd/chunktool/main.go
CGO_ENABLED=0 go build $(GO_FLAGS) -o $@ ./$(@D)

cmd/logtool/logtool: $(APP_GO_FILES) cmd/logtool/main.go
CGO_ENABLED=0 go build $(GO_FLAGS) -o $@ ./$(@D)

Expand All @@ -70,7 +62,6 @@ cross:
CGO_ENABLED=0 gox -output="dist/{{.Dir}}-{{.OS}}-{{.Arch}}" -ldflags=${LDFLAGS} -arch="amd64" -os="linux windows darwin" -osarch="darwin/arm64" ./cmd/benchtool
CGO_ENABLED=0 gox -output="dist/{{.Dir}}-{{.OS}}-{{.Arch}}" -ldflags=${LDFLAGS} -arch="amd64" -os="linux windows darwin" -osarch="darwin/arm64" ./cmd/blockgen
CGO_ENABLED=0 gox -output="dist/{{.Dir}}-{{.OS}}-{{.Arch}}" -ldflags=${LDFLAGS} -arch="amd64" -os="linux windows darwin" -osarch="darwin/arm64" ./cmd/blockscopy
CGO_ENABLED=0 gox -output="dist/{{.Dir}}-{{.OS}}-{{.Arch}}" -ldflags=${LDFLAGS} -arch="amd64" -os="linux windows darwin" -osarch="darwin/arm64" ./cmd/chunktool
CGO_ENABLED=0 gox -output="dist/{{.Dir}}-{{.OS}}-{{.Arch}}" -ldflags=${LDFLAGS} -arch="amd64" -os="linux windows darwin" -osarch="darwin/arm64" ./cmd/cortextool
CGO_ENABLED=0 gox -output="dist/{{.Dir}}-{{.OS}}-{{.Arch}}" -ldflags=${LDFLAGS} -arch="amd64" -os="linux windows darwin" -osarch="darwin/arm64" ./cmd/e2ealerting
CGO_ENABLED=0 gox -output="dist/{{.Dir}}-{{.OS}}-{{.Arch}}" -ldflags=${LDFLAGS} -arch="amd64" -os="linux windows darwin" -osarch="darwin/arm64" ./cmd/logtool
Expand All @@ -83,7 +74,6 @@ test:
clean:
rm -rf cmd/benchtool/benchtool
rm -rf cmd/cortextool/cortextool
rm -rf cmd/chunktool/chunktool
rm -rf cmd/logtool/logtool
rm -rf cmd/e2ealerting/e2ealerting
rm -rf cmd/blockscopy/blockscopy
20 changes: 0 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ This repo contains tools used for interacting with [Cortex](https://github.com/c
* [benchtool](docs/benchtool.md): A powerful YAML driven tool for benchmarking
Cortex write and query API.
* [cortextool](#cortextool): Interacts with user-facing Cortex APIs and backend storage components.
* [chunktool](#chunktool): Interacts with chunks stored and indexed in Cortex storage backends.
* [logtool](#logtool): Tool which parses Cortex query-frontend logs and formats them for easy analysis.
* [e2ealerting](docs/e2ealerting.md): Tool that helps measure how long an alert takes from scrape of sample to Alertmanager notification delivery.

Expand Down Expand Up @@ -386,25 +385,6 @@ This command accepts Prometheus rule YAML files as input and extracts Prometheus
cortextool analyse rule-file ./rule_file_one.yaml ./rule_file_two.yaml ...
```

## chunktool

This repo also contains the `chunktool`. A client meant to interact with chunks stored and indexed in cortex backends.

##### Chunk Delete

The delete command currently cleans all index entries pointing to chunks in the specified index. Only bigtable and the v10 schema are currently fully supported. This will not delete the entire index entry, only the corresponding chunk entries within the index row.

##### Chunk Migrate

The migrate command helps with migrating chunks across cortex clusters. It also takes care of setting right index in the new cluster as per the specified schema config.

As of now it only supports `Bigtable` or `GCS` as a source to read chunks from for migration. For writing it supports all the storages that Cortex supports.
More details about it [here](./pkg/chunk/migrate/README.md)

##### Chunk Validate/Clean-Index

The `chunk validate-index` and `chunk clean-index` command allows users to scan their index and chunk backends for invalid entries. The `validate-index` command will find invalid entries and ouput them to a CSV file. The `clean-index` command will take that CSV file as input and delete the invalid entries.

## logtool

A CLI tool to parse Cortex query-frontend logs and formats them for easy analysis.
Expand Down
2 changes: 1 addition & 1 deletion cmd/benchtool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"os/signal"

logutil "github.com/cortexproject/cortex/pkg/util/log"
"github.com/go-kit/kit/log/level"
"github.com/go-kit/log/level"
"github.com/grafana/dskit/flagext"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
Expand Down
12 changes: 0 additions & 12 deletions cmd/chunktool/Dockerfile

This file was deleted.

25 changes: 0 additions & 25 deletions cmd/chunktool/main.go

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/e2ealerting/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"flag"
"os"

"github.com/go-kit/kit/log/level"
"github.com/go-kit/log/level"
"github.com/grafana/cortex-tools/pkg/alerting"

util_log "github.com/cortexproject/cortex/pkg/util/log"
Expand Down
116 changes: 0 additions & 116 deletions cmd/rules-migrator/main.go

This file was deleted.

Loading