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

Synchronize common files from prometheus/prometheus #226

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
executors:
golang:
docker:
- image: cimg/go:1.18
- image: cimg/go:1.20
jobs:
test:
executor: golang
Expand All @@ -18,7 +18,7 @@ jobs:
- restore_cache:
keys:
- v5-crossbuild-cache
- run: go install github.com/goreleaser/goreleaser@v1.7.0
- run: go install github.com/goreleaser/goreleaser@v1.15.2
- run: git reset --hard
- run: make crossbuild
- run: mkdir artifacts
Expand All @@ -40,7 +40,7 @@ jobs:
- v5-crossbuild-cache
- run: docker login docker.io -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
- run: docker login quay.io -u $QUAY_LOGIN -p $QUAY_PASSWORD
- run: cd ..; GO111MODULE=on go get github.com/goreleaser/goreleaser@v0.131.1
- run: cd ..; GO111MODULE=on go get github.com/goreleaser/goreleaser@v1.15.2
- run: git reset --hard
- run: make release
check_repo_consistency:
Expand Down Expand Up @@ -104,4 +104,4 @@ workflows:
tags:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
orbs:
prometheus: prometheus/prometheus@0.11.0
prometheus: prometheus/prometheus@0.17.1
24 changes: 15 additions & 9 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
name: golangci-lint
on:
push:
tags:
- v*
branches:
- master
paths:
- "go.sum"
- "go.mod"
- "**.go"
- "scripts/errcheck_excludes.txt"
- ".github/workflows/golangci-lint.yml"
pull_request:
paths:
- "go.sum"
- "go.mod"
- "**.go"
- "scripts/errcheck_excludes.txt"
- ".github/workflows/golangci-lint.yml"

jobs:
golangci:
name: lint
Expand All @@ -15,8 +24,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.29
only_new_issues: true
# Optional: golangci-lint command line arguments.
# args: ./the-only-dir-to-analyze/...
version: v1.51.1
args: ./langserver/...
3 changes: 0 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ builds:
goarch:
- amd64
- 386
- arm
- arm64

goarm:
- 7


archives:
Expand Down
2 changes: 1 addition & 1 deletion cmd/promql-langserver/promql-langserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"os"
"time"

kitlog "github.com/go-kit/kit/log"
kitlog "github.com/go-kit/log"
"github.com/prometheus-community/promql-langserver/config"
promClient "github.com/prometheus-community/promql-langserver/prometheus"
"github.com/prometheus/common/route"
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const (
TextFormat LogFormat = "text"
)

var mapLogFormat = map[LogFormat]bool{ // nolint: gochecknoglobals
var mapLogFormat = map[LogFormat]bool{ //nolint: gochecknoglobals
JSONFormat: true,
TextFormat: true,
}
Expand Down
4 changes: 2 additions & 2 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ func TestUnmarshalENV(t *testing.T) {
},
}
for _, testSuite := range testSuites {
// nolint
//nolint
t.Run(testSuite.title, func(t *testing.T) {
os.Clearenv()
// nolint
//nolint
for k, v := range testSuite.variables {
os.Setenv(k, v)
}
Expand Down
43 changes: 34 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,20 +1,45 @@
module github.com/prometheus-community/promql-langserver

go 1.13
go 1.20

require (
github.com/blang/semver v3.5.1+incompatible
github.com/go-kit/kit v0.12.0
github.com/blang/semver v2.2.0+incompatible
github.com/go-kit/log v0.2.1
github.com/google/uuid v1.3.0
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/kelseyhightower/envconfig v1.4.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.12.2
github.com/prometheus/common v0.35.0
github.com/prometheus/prometheus v0.36.2
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/common v0.39.0
github.com/prometheus/prometheus v0.42.0
github.com/rakyll/statik v0.1.7
github.com/sahilm/fuzzy v0.1.0
github.com/stretchr/testify v1.8.0
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f
github.com/stretchr/testify v1.8.1
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dennwc/varint v1.0.0 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/julienschmidt/httprouter v1.3.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/goleak v1.2.0 // indirect
golang.org/x/exp v0.0.0-20230124195608-d38c7dcee874 // indirect
golang.org/x/sys v0.4.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
Loading