Skip to content

Commit

Permalink
updating go version from 1.18 to 1.19 (#1665)
Browse files Browse the repository at this point in the history
* updating go version from 1.18 to 1.19

* oops

* changelog and update lint version

* lint

* changelog

* undo comment formatting, remove nolint for embedded structs

* more styling fixes

* uncommit .patched-proto files

* addressing comments

* changelog
  • Loading branch information
ie-pham authored Sep 8, 2022
1 parent 0d81035 commit 161ab9d
Show file tree
Hide file tree
Showing 70 changed files with 172 additions and 167 deletions.
10 changes: 5 additions & 5 deletions .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ local image_tag_for_cd() = {

local build_binaries(arch) = {
name: 'build-tempo-binaries',
image: 'golang:1.18-alpine',
image: 'golang:1.19-alpine',
commands: [
'apk add make git',
] + [
Expand Down Expand Up @@ -226,7 +226,7 @@ local deploy_to_dev() = {
steps+: [
{
name: 'build-tempo-serverless',
image: 'golang:1.18-alpine',
image: 'golang:1.19-alpine',
commands: [
'apk add make git zip bash',
'./tools/image-tag | cut -d, -f 1 | tr A-Z a-z > .tags', // values in .tags are used by the next step when pushing the image
Expand Down Expand Up @@ -323,7 +323,7 @@ local deploy_to_dev() = {
},
{
name: 'write-key',
image: 'golang:1.18',
image: 'golang:1.19',
commands: ['printf "%s" "$NFPM_SIGNING_KEY" > $NFPM_SIGNING_KEY_FILE'],
environment: {
NFPM_SIGNING_KEY: { from_secret: gpg_private_key.name },
Expand All @@ -332,7 +332,7 @@ local deploy_to_dev() = {
},
{
name: 'test release',
image: 'golang:1.18',
image: 'golang:1.19',
commands: ['make release-snapshot'],
environment: {
NFPM_DEFAULT_PASSPHRASE: { from_secret: gpg_passphrase.name },
Expand Down Expand Up @@ -365,7 +365,7 @@ local deploy_to_dev() = {
},
{
name: 'release',
image: 'golang:1.18',
image: 'golang:1.19',
commands: ['make release'],
environment: {
GITHUB_TOKEN: { from_secret: gh_token_secret.name },
Expand Down
12 changes: 6 additions & 6 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
- COMPONENT=tempo GOARCH=amd64 make exe
- COMPONENT=tempo-vulture GOARCH=amd64 make exe
- COMPONENT=tempo-query GOARCH=amd64 make exe
image: golang:1.18-alpine
image: golang:1.19-alpine
name: build-tempo-binaries
- image: plugins/docker
name: build-tempo-image
Expand Down Expand Up @@ -77,7 +77,7 @@ steps:
- COMPONENT=tempo GOARCH=arm64 make exe
- COMPONENT=tempo-vulture GOARCH=arm64 make exe
- COMPONENT=tempo-query GOARCH=arm64 make exe
image: golang:1.18-alpine
image: golang:1.19-alpine
name: build-tempo-binaries
- image: plugins/docker
name: build-tempo-image
Expand Down Expand Up @@ -235,7 +235,7 @@ steps:
- cd ./cmd/tempo-serverless
- make build-docker-gcr-binary
- make build-lambda-zip
image: golang:1.18-alpine
image: golang:1.19-alpine
name: build-tempo-serverless
- image: plugins/gcr
name: deploy-tempo-serverless-gcr
Expand Down Expand Up @@ -304,15 +304,15 @@ steps:
NFPM_SIGNING_KEY:
from_secret: gpg_private_key
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: golang:1.18
image: golang:1.19
name: write-key
- commands:
- make release-snapshot
environment:
NFPM_DEFAULT_PASSPHRASE:
from_secret: gpg_passphrase
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: golang:1.18
image: golang:1.19
name: test release
- commands:
- ./tools/packaging/verify-deb-install.sh
Expand All @@ -338,7 +338,7 @@ steps:
NFPM_DEFAULT_PASSPHRASE:
from_secret: gpg_passphrase
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: golang:1.18
image: golang:1.19
name: release
when:
event:
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.18
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Check out code
uses: actions/checkout@v3

- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.2
version: v1.49.0

unit-tests:
name: Test packages
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.18
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Check out code
uses: actions/checkout@v3
Expand All @@ -46,10 +46,10 @@ jobs:
name: Test integration e2e suite
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.18
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Check out code
uses: actions/checkout@v3
Expand All @@ -61,10 +61,10 @@ jobs:
name: Test serverless integration e2e suite
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.18
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Check out code
uses: actions/checkout@v3
Expand All @@ -76,10 +76,10 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.18
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Check out code
uses: actions/checkout@v3
Expand All @@ -100,10 +100,10 @@ jobs:
name: Benchmark
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.18
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Check out code
uses: actions/checkout@v3
Expand All @@ -115,10 +115,10 @@ jobs:
name: Vendor check
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.18
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Check out code
uses: actions/checkout@v3
Expand All @@ -136,10 +136,10 @@ jobs:
name: Check jsonnet & tempo-mixin
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.18
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Install jsonnet, jsonnet-bundler & tanka
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependabot_serverless_gomod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
steps:
- name: Set up Go 1.18
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Check out code
uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* [CHANGE] **BREAKING CHANGE** Use storage.trace.block.row_group_size_bytes to cut rows during compaction instead of
compactor.compaction.flush_size_bytes. [#1696](https://github.com/grafana/tempo/pull/1696) (@joe-elliott)
* [CHANGE] Return 200 instead of 206 when blocks failed is < tolerate_failed_blocks. [#1725](https://github.com/grafana/tempo/pull/1725) (@joe-elliott)
* [CHANGE] Update Go to 1.19 [#1665](https://github.com/grafana/tempo/pull/1665) (@ie-pham)
* [ENHANCEMENT] cache: expose username and sentinel_username redis configuration options for ACL-based Redis Auth support [#1708](https://github.com/grafana/tempo/pull/1708) (@jsievenpiper)
* [ENHANCEMENT] metrics-generator: expose span size as a metric [#1662](https://github.com/grafana/tempo/pull/1662) (@ie-pham)
* [ENHANCEMENT] Set Max Idle connections to 100 for Azure, should reduce DNS errors in Azure [#1632](https://github.com/grafana/tempo/pull/1632) (@electron0zero)
Expand Down
2 changes: 1 addition & 1 deletion cmd/tempo-cli/cmd-list-block.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func printKVPairs(kvp kvPairs) {
}

// attempts to calculate the "value" that storing a given label would provide by. currently (number of times appeared)^2 / cardinality
// this is not researched and could definitely be improved
// this is not researched and could definitely be improved
func relativeValue(v values) float64 {
return (float64(v.count) * float64(v.count)) / float64(len(v.all))
}
Expand Down
1 change: 1 addition & 0 deletions cmd/tempo-cli/cmd-list-compactionsummary.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func displayCompactionSummary(results []blockStats) {

var newest time.Time
var oldest time.Time

for _, r := range resultsByLevel[l] {
sizeSum += r.Size
countSum += r.TotalObjects
Expand Down
2 changes: 1 addition & 1 deletion cmd/tempo-serverless/cloud-run/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/grafana/tempo/cmd/tempo-serverless/cloud-run

go 1.18
go 1.19

require (
github.com/gogo/protobuf v1.3.2
Expand Down
2 changes: 1 addition & 1 deletion cmd/tempo-serverless/lambda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
# build the lambda and retrive the lambda-local-proxy
#
FROM golang:1.18-buster AS build
FROM golang:1.19-buster AS build

# copy in the lambda. todo: build in container
COPY lambda /
Expand Down
2 changes: 1 addition & 1 deletion cmd/tempo-serverless/lambda/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/grafana/tempo/cmd/tempo-serverless/lambda

go 1.18
go 1.19

require (
github.com/aws/aws-lambda-go v1.28.0
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/grafana/tempo

go 1.18
go 1.19

require (
cloud.google.com/go/storage v1.22.1
Expand Down
1 change: 0 additions & 1 deletion modules/compactor/compactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ func (c *Compactor) OnRingInstanceStopping(lifecycler *ring.BasicLifecycler) {}
func (c *Compactor) OnRingInstanceHeartbeat(lifecycler *ring.BasicLifecycler, ringDesc *ring.Desc, instanceDesc *ring.InstanceDesc) {
}

//
func countSpans(dataEncoding string, objs ...[]byte) int {
decoder, err := model.NewObjectDecoder(dataEncoding)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion modules/distributor/distributor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/go-kit/log"
kitlog "github.com/go-kit/log"
"github.com/gogo/status"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/proto" //nolint: all //ProtoReflect
"github.com/grafana/dskit/flagext"
"github.com/grafana/dskit/kv"
"github.com/grafana/dskit/ring"
Expand Down
2 changes: 1 addition & 1 deletion modules/frontend/deduper.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http"

"github.com/go-kit/log"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/proto" //nolint:all //deprecated
"github.com/opentracing/opentracing-go"

"github.com/grafana/tempo/pkg/tempopb"
Expand Down
4 changes: 2 additions & 2 deletions modules/frontend/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/jsonpb" //nolint:all //deprecated
"github.com/golang/protobuf/proto" //nolint:all //deprecated
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
Expand Down
2 changes: 1 addition & 1 deletion modules/frontend/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "net/http"
// middleware.go contains types and code related to building http pipelines

// RoundTripperFunc is like http.HandlerFunc, but for RoundTripper
// chosen for pipeline building over queryrange.Handler b/c of how similar queryrange.Handler is to this existing interface.
// chosen for pipeline building over queryrange.Handler b/c of how similar queryrange.Handler is to this existing interface.
type RoundTripperFunc func(*http.Request) (*http.Response, error)

// RoundTrip implememnts http.RoundTripper
Expand Down
14 changes: 7 additions & 7 deletions modules/frontend/searchsharding.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/gogo/protobuf/jsonpb"
"github.com/gogo/protobuf/jsonpb" //nolint:all deprecated
"github.com/grafana/tempo/modules/overrides"
"github.com/grafana/tempo/pkg/api"
"github.com/grafana/tempo/pkg/boundedwaitgroup"
Expand Down Expand Up @@ -157,12 +157,12 @@ func newSearchSharder(reader tempodb.Reader, o *overrides.Overrides, cfg SearchS
}

// Roundtrip implements http.RoundTripper
// execute up to concurrentRequests simultaneously where each request scans ~targetMBsPerRequest
// until limit results are found
// keeping things simple. current query params are only:
// limit=<number>
// start=<unix epoch seconds>
// end=<unix epoch seconds>
// execute up to concurrentRequests simultaneously where each request scans ~targetMBsPerRequest
// until limit results are found
// keeping things simple. current query params are only:
// limit=<number>
// start=<unix epoch seconds>
// end=<unix epoch seconds>
func (s searchSharder) RoundTrip(r *http.Request) (*http.Response, error) {
searchReq, err := api.ParseSearchRequest(r)
if err != nil {
Expand Down
5 changes: 2 additions & 3 deletions modules/frontend/searchsharding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"context"
"errors"
"io"
"io/ioutil"
"net/http"
"net/http/httptest"
"strconv"
Expand All @@ -14,7 +13,7 @@ import (
"time"

"github.com/go-kit/log"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/jsonpb" //nolint:all deprecated
"github.com/google/uuid"
"github.com/grafana/tempo/modules/overrides"
"github.com/grafana/tempo/pkg/api"
Expand Down Expand Up @@ -699,7 +698,7 @@ func TestSearchSharderRoundTripBadRequest(t *testing.T) {
func testBadRequest(t *testing.T, resp *http.Response, err error, expectedBody string) {
assert.Equal(t, http.StatusBadRequest, resp.StatusCode)
assert.Nil(t, err)
buff, err := ioutil.ReadAll(resp.Body)
buff, err := io.ReadAll(resp.Body)
assert.NoError(t, err)
assert.Equal(t, expectedBody, string(buff))
}
Expand Down
2 changes: 1 addition & 1 deletion modules/frontend/tracebyidsharding.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/proto" //nolint:all //deprecated
"github.com/grafana/tempo/modules/querier"
"github.com/grafana/tempo/pkg/api"
"github.com/grafana/tempo/pkg/model/trace"
Expand Down
Loading

0 comments on commit 161ab9d

Please sign in to comment.