Skip to content

Commit d1f5bf1

Browse files
chore(deps): Update GitHub Actions (major) (#1388)
* chore(deps): Update GitHub Actions | datasource | package | from | to | | ----------- | ----------------------------- | ------ | ------ | | github-tags | actions/checkout | v4.3.0 | v5.0.0 | | github-tags | actions/setup-go | v5.5.0 | v6.0.0 | | github-tags | actions/stale | v9 | v10 | | github-tags | golangci/golangci-lint-action | v6.5.2 | v9.0.0 | Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> --------- Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> Co-authored-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
1 parent 055c27c commit d1f5bf1

Some content is hidden

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

66 files changed

+255
-264
lines changed

.github/workflows/check-grafana-compatibility.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ jobs:
1717
permissions:
1818
contents: read
1919
steps:
20-
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
20+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2121
with:
2222
persist-credentials: false
2323
path: "./grafana-plugin-sdk-go"
24-
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
24+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2525
with:
2626
persist-credentials: false
2727
repository: "grafana/grafana"
2828
path: "./grafana"
29-
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # 5.5.0
29+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # 6.0.0
3030
with:
3131
cache: false
3232
go-version: "~1.22"

.github/workflows/check-incompatibility.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
permissions:
1818
contents: read
1919
steps:
20-
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
20+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2121
with:
2222
persist-credentials: false
2323
path: './grafana-plugin-sdk-go'
24-
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # 5.5.0
24+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # 6.0.0
2525
with:
2626
cache: false
2727
check-latest: true

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
18+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1919
with:
2020
persist-credentials: false
2121

2222
- name: Setup go
23-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # 5.5.0
23+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # 6.0.0
2424
with:
2525
go-version-file: ./go.mod
2626

2727
- name: Run golangci-lint
28-
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
28+
uses: golangci/golangci-lint-action@0a35821d5c230e903fcfe077583637dea1b27b47 # v9.0.0
2929
with:
30-
version: v1.64.2
30+
version: v2.4.0
3131
args: |
3232
"./..." --timeout=7m
3333
skip-cache: true

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
stale:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9
12+
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10
1313
with:
1414
# Number of days of inactivity before a stale Issue or Pull Request is closed.
1515
# Set to -1 to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.

.github/workflows/validate-protos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
contents: read
1717
steps:
1818
# Run `git checkout`
19-
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
19+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2020
with:
2121
persist-credentials: false
2222
# Install the `buf` CLI

.golangci.toml

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,22 @@
1-
[issues]
2-
exclude-files = ["data/.*\\.gen\\.go", "data/generic_nullable_vector\\.go", "data/generic_vector\\.go"]
3-
4-
[linters-settings.goconst]
5-
min-len = 5
6-
min-occurrences = 5
7-
8-
[linters-settings.revive]
9-
ignore-generated-header = false
10-
11-
[linters-settings.misspell]
12-
ignore-words = ["unknwon"]
13-
14-
[linters-settings.depguard.rules.main]
15-
allow = [] # allow all
16-
deny = [
17-
{ pkg = "io/ioutil", desc = "Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details." },
18-
]
1+
version = "2"
192

203
[linters]
21-
disable-all = true
224
enable = [
235
"bodyclose",
24-
"depguard",
256
"dogsled",
267
"errcheck",
278
"gochecknoinits",
289
"goconst",
2910
"gocritic",
30-
"goimports",
3111
"goprintffuncname",
3212
"gosec",
33-
"gosimple",
3413
"govet",
3514
"ineffassign",
3615
"misspell",
3716
"nakedret",
3817
"rowserrcheck",
3918
"copyloopvar",
4019
"staticcheck",
41-
"stylecheck",
42-
"typecheck",
4320
"unconvert",
4421
"unused",
4522
"whitespace",
@@ -50,14 +27,4 @@ enable = [
5027
"errorlint",
5128
"sqlclosecheck",
5229
"thelper",
53-
"revive"
5430
]
55-
# Don't require that errors are included through wrapping, since might not always want to wrap an error
56-
[[issues.exclude-rules]]
57-
linters = ["errorlint"]
58-
text = "non-wrapping format verb for fmt.Errorf"
59-
[[issues.exclude-rules]]
60-
linters = ["staticcheck"]
61-
text = "SA1019"
62-
[linters-settings.gosec]
63-
excludes = ["G115"]

Magefile.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build mage
2-
// +build mage
32

43
package main
54

backend/app/manage_example_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (ds *testApp) CheckHealth(_ context.Context, _ *backend.CheckHealthRequest)
4949
if err != nil {
5050
return nil, err
5151
}
52-
resp.Body.Close()
52+
_ = resp.Body.Close()
5353
return nil, nil
5454
}
5555

@@ -60,7 +60,7 @@ func (ds *testApp) handleTest(rw http.ResponseWriter, _ *http.Request) {
6060
rw.WriteHeader(500)
6161
return
6262
}
63-
resp.Body.Close()
63+
_ = resp.Body.Close()
6464
}
6565

6666
func Example() {

backend/config_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ func TestAppURL(t *testing.T) {
201201
})
202202

203203
t.Run("it should return the configured app URL from env", func(t *testing.T) {
204-
os.Setenv(AppURL, "http://localhost-env:3000")
205-
defer os.Unsetenv(AppURL)
204+
_ = os.Setenv(AppURL, "http://localhost-env:3000")
205+
defer func() { _ = os.Unsetenv(AppURL) }()
206206
cfg := NewGrafanaCfg(map[string]string{})
207207
v, err := cfg.AppURL()
208208
require.NoError(t, err)
@@ -354,8 +354,8 @@ func TestPluginAppClientSecret(t *testing.T) {
354354
})
355355

356356
t.Run("it should return the configured PluginAppClientSecret from env", func(t *testing.T) {
357-
os.Setenv(AppClientSecret, "client-secret")
358-
defer os.Unsetenv(AppClientSecret)
357+
_ = os.Setenv(AppClientSecret, "client-secret")
358+
defer func() { _ = os.Unsetenv(AppClientSecret) }()
359359
cfg := NewGrafanaCfg(map[string]string{})
360360
v, err := cfg.PluginAppClientSecret()
361361
require.NoError(t, err)

backend/convert_to_protobuf.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ func (t ConvertToProtobuf) QueryDataResponse(res *QueryDataResponse) (*pluginv2.
220220
}
221221
}
222222
if status.IsValid() {
223-
pDR.Status = int32(status)
223+
pDR.Status = int32(status) // #nosec G115 -- Status values are HTTP status codes (100-599), always fit in int32
224224
} else if status == 0 {
225-
pDR.Status = int32(StatusOK)
225+
pDR.Status = int32(StatusOK) // #nosec G115 -- StatusOK is 200, always fits in int32
226226
}
227227
pDR.ErrorSource = string(dr.ErrorSource)
228228

@@ -242,7 +242,7 @@ func (t ConvertToProtobuf) CallResourceResponse(resp *CallResourceResponse) *plu
242242

243243
return &pluginv2.CallResourceResponse{
244244
Headers: headers,
245-
Code: int32(resp.Status),
245+
Code: int32(resp.Status), // #nosec G115 -- HTTP status codes (100-599) always fit in int32
246246
Body: resp.Body,
247247
}
248248
}

0 commit comments

Comments
 (0)