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

[v9.5.x] Chore: Upgrade go to 1.21.10 #87478

Merged
merged 9 commits into from
May 10, 2024
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
198 changes: 99 additions & 99 deletions .drone.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
name: Set go version
uses: actions/setup-go@v3
with:
go-version: '1.21.8'
go-version: '1.21.10'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-codeql-analysis-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set go version
uses: actions/setup-go@v3
with:
go-version: '1.21.8'
go-version: '1.21.10'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ARG BASE_IMAGE=alpine:3.19.1
ARG JS_IMAGE=node:18-alpine
ARG JS_PLATFORM=linux/amd64
ARG GO_IMAGE=golang:1.21.8-alpine
ARG GO_IMAGE=golang:1.21.10-alpine

ARG GO_SRC=go-builder
ARG JS_SRC=js-builder
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development.
--build-arg COMMIT_SHA=$$(git rev-parse HEAD) \
--build-arg BUILD_BRANCH=$$(git rev-parse --abbrev-ref HEAD) \
--build-arg BASE_IMAGE=ubuntu:22.04 \
--build-arg GO_IMAGE=golang:1.21.8 \
--build-arg GO_IMAGE=golang:1.21.10 \
--tag grafana/grafana$(TAG_SUFFIX):dev-ubuntu \
$(DOCKER_BUILD_ARGS)

Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/grafana/grafana

go 1.19
go 1.21.10

// Override xorm's outdated go-mssqldb dependency, since we can't upgrade to current xorm (due to breaking changes).
// We need a more current go-mssqldb so we get rid of a version of apache/thrift with vulnerabilities.
Expand Down Expand Up @@ -365,7 +365,6 @@ require (
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/RoaringBitmap/roaring v0.9.4 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/axiomhq/hyperloglog v0.0.0-20191112132149-a4c4c47bc57f // indirect
github.com/bits-and-blooms/bitset v1.2.0 // indirect
github.com/blevesearch/go-porterstemmer v1.0.3 // indirect
Expand Down Expand Up @@ -395,7 +394,6 @@ require (
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/labstack/echo/v4 v4.10.0 // indirect
github.com/labstack/gommon v0.4.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mschoch/smat v0.2.0 // indirect
github.com/pierrec/lz4/v4 v4.1.15 // indirect
Expand Down
44 changes: 5 additions & 39 deletions go.sum

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pkg/services/sqlstore/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ func TestRetryingOnFailures(t *testing.T) {
require.NoError(t, err)
})
require.NoError(t, err)
require.NoError(t, rows.Err())
require.True(t, rows.Next()) // first row

str1 := ""
Expand Down
1 change: 1 addition & 0 deletions pkg/services/store/entity/sqlstash/folder_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func updateFolderTree(ctx context.Context, tx *session.SessionTx, tenant int64)
}

all := []*folderInfo{}
//nolint:rowserrcheck
rows, err := tx.Query(ctx, "SELECT uid,folder,name,slug FROM entity WHERE kind=? AND tenant_id=? ORDER BY slug asc;",
entity.StandardKindFolder, tenant)
if err != nil {
Expand Down
6 changes: 6 additions & 0 deletions pkg/services/store/entity/sqlstash/sql_storage_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ func (s *sqlEntityServer) readFromHistory(ctx context.Context, r *entity.ReadEnt
"updated_at", "updated_by",
}

//nolint:rowserrcheck
rows, err := s.sess.Query(ctx,
"SELECT "+strings.Join(fields, ",")+
" FROM entity_history WHERE grn=? AND version=?", oid, r.Version)
Expand Down Expand Up @@ -473,6 +474,7 @@ func (s *sqlEntityServer) fillCreationInfo(ctx context.Context, tx *session.Sess
createdBy = &ignore
}

//nolint:rowserrcheck
rows, err := tx.Query(ctx, "SELECT created_at,created_by FROM entity WHERE grn=?", grn)
if err != nil {
return err
Expand All @@ -494,6 +496,8 @@ func (s *sqlEntityServer) selectForUpdate(ctx context.Context, tx *session.Sessi
if false { // TODO, MYSQL/PosgreSQL can lock the row " FOR UPDATE"
q += " FOR UPDATE"
}

//nolint:rowserrcheck
rows, err := tx.Query(ctx, q, grn)
if err != nil {
return nil, err
Expand Down Expand Up @@ -695,6 +699,7 @@ func (s *sqlEntityServer) History(ctx context.Context, r *entity.EntityHistoryRe
" WHERE grn=? " + page + "\n" +
" ORDER BY updated_at DESC LIMIT 100"

//nolint:rowserrcheck
rows, err := s.sess.Query(ctx, query, args...)
if err != nil {
return nil, err
Expand Down Expand Up @@ -780,6 +785,7 @@ func (s *sqlEntityServer) Search(ctx context.Context, r *entity.EntitySearchRequ

query, args := entityQuery.toQuery()

//nolint:rowserrcheck
rows, err := s.sess.Query(ctx, query, args...)
if err != nil {
return nil, err
Expand Down
3 changes: 0 additions & 3 deletions pkg/web/macaron.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build go1.3
// +build go1.3

// Copyright 2014 The Macaron Authors
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jest.mock('@grafana/data', () => ({

const now = dateTime().valueOf();
const intervalInSeconds = 60 * 5;
const endInput = encodeURIComponent(dateTime(now).add(5, 'hours').format('Y-MM-DD HH:mm'));
const endInput = encodeURIComponent(dateTime(now).utc().format('Y-MM-DD HH:mm'));

const getPanelData = (panelDataOverrides?: Partial<PanelData>) => {
const panelData = {
Expand Down
2 changes: 1 addition & 1 deletion scripts/drone/variables.star
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ global variables
"""

grabpl_version = "v3.0.50"
golang_version = "1.21.8"
golang_version = "1.21.10"

# nodejs_version should match what's in ".nvmrc", but without the v prefix.
nodejs_version = "18.12.0"
Loading