Skip to content

Commit 907cab2

Browse files
authored
Merge branch 'master' into feature/3552-grpc-tests-separate-process
2 parents dc9bb5c + 55562fd commit 907cab2

File tree

174 files changed

+5193
-2203
lines changed

Some content is hidden

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

174 files changed

+5193
-2203
lines changed

.github/ISSUE_TEMPLATE/release.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ labels: ["release"]
3434
- [ ] Ensure all PRs in the `k6` repository, part of the current [milestone](https://github.com/grafana/k6/milestones), have been merged.
3535
- [ ] Open a PR with the release notes for the new version
3636
- [ ] Ask teams that might have contributed to the release (e.g., k6-ecosystem, k6-docs, k6-devrel teams) to contribute their notes and review the existing ones.
37-
- [ ] Remember to mention and thank [external contributors](https://github.com/search?q=user%3Agrafana+repo%3Ak6+milestone%3A%22v0.51.0%22+-author%3Amstoykov+-author%3Aoleiade+-author%3Ana--+-author%3Acodebien+-author%3Aolegbespalov+-author%3Aandrewslotin+-author%3Ajoanlopez+-author%3Aankur22+-author%3Ainancgumus+-author%3Aszkiba+-author%3Adependabot%5Bbot%5D&type=pullrequests). (**<- Update the query with the correct milestone version**).
37+
- [ ] Remember to mention and thank [external contributors](https://github.com/search?q=user%3Agrafana+repo%3Ak6+milestone%3A%22v1.3.0%22+-author%3Amstoykov+-author%3Aoleiade+-author%3Ana--+-author%3Acodebien+-author%3Aolegbespalov+-author%3Aandrewslotin+-author%3Ajoanlopez+-author%3Aankur22+-author%3Ainancgumus+-author%3aszkiba+-author%3aAgnesToulet+-author%3Adependabot%5Bbot%5D&type=pullrequests). (**<- Update the query with the correct milestone version**).
3838
- [ ] Share the release notes PR with the k6 open-source teams. Request contributions from all affected teams (k6-chaos, k6-docs, k6-devrel, etc.) and any other stakeholders involved in the new release.
3939
- [ ] Open a separate PR for bumping [the k6 Go project's version](https://github.com/grafana/k6/blob/master/internal/build/version.go#L6).
4040
- [ ] Open a PR in the `DefinitelyTyped/DefinitelyTyped` repository using the release branch created in the grafana/k6-DefinitelyTyped fork to update the k6 type definitions for the new release.
@@ -47,16 +47,22 @@ labels: ["release"]
4747

4848
#### Documentation
4949

50-
- [ ] Open and merge a PR from `main` in the `k6-docs` repository, copying the current k6's `next` to a folder named with the k6 version (e.g., `v1.1.x`).
50+
- [ ] Open and merge a PR from `main` in the `k6-docs` repository, copying the current k6's `next` to a folder named with the k6 version (e.g., `v1.3.x`).
5151
- [ ] Ensure the `k6` repository release notes PR contains the correct links to the docs.
5252

5353
#### In k6 repository
5454

5555
- [ ] Merge the PR bumping [the k6 Go project's version](https://github.com/grafana/k6/blob/master/lib/consts/consts.go#L11-L12).
5656
- [ ] Merge the release notes PR.
5757
- [ ] Pull locally the previously merged changes.
58-
- [ ] Create a new long-lived `v{major}.{minor}.x` release branch from the `main` branch.
59-
- [ ] Checkout the new `v{major}.{minor}.x` release branch, create and push a new tag of the form `v{major}.{minor}.0` using git: _e.g._ `git tag v1.0.0 -m "v1.0.0"`.
58+
- [ ] Create a new long-lived `v{major}.{minor}.x` release branch from the `master` branch.
59+
- [ ] Create and push a new tag of the form `v{major}.{minor}.0`.
60+
61+
!!! Update the below when making the issue
62+
63+
```
64+
git checkout master && git pull && git checkout -b v1.3.x && git tag v1.3.0 -m "v1.3.0" && git push origin v1.3.0
65+
```
6066

6167
#### Announcements
6268

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
version: 2
22
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
38
- package-ecosystem: "gomod"
49
directory: "/"
510
schedule:

.github/workflows/browser_e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
runs-on: ${{ matrix.platform }}
2828
steps:
2929
- name: Checkout code
30-
uses: actions/checkout@v4
30+
uses: actions/checkout@v5
3131
with:
3232
persist-credentials: false
3333
- name: Install Go

.github/workflows/build.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
go_version: ${{ steps.get_go_version.outputs.go_version }}
3838
steps:
3939
- name: Checkout code
40-
uses: actions/checkout@v4
40+
uses: actions/checkout@v5
4141
with:
4242
fetch-depth: 0
4343
persist-credentials: false
@@ -82,7 +82,7 @@ jobs:
8282
VERSION: ${{ needs.configure.outputs.k6_version }}
8383
steps:
8484
- name: Checkout code
85-
uses: actions/checkout@v4
85+
uses: actions/checkout@v5
8686
with:
8787
fetch-depth: 0
8888
persist-credentials: false
@@ -148,7 +148,7 @@ jobs:
148148
VERSION: ${{ needs.configure.outputs.k6_version }}
149149
steps:
150150
- name: Checkout code
151-
uses: actions/checkout@v4
151+
uses: actions/checkout@v5
152152
with:
153153
fetch-depth: 0
154154
persist-credentials: false
@@ -243,7 +243,7 @@ jobs:
243243
VERSION: ${{ needs.configure.outputs.k6_version }}
244244
steps:
245245
- name: Checkout code
246-
uses: actions/checkout@v4
246+
uses: actions/checkout@v5
247247
with:
248248
persist-credentials: false
249249
- name: Install pandoc
@@ -280,7 +280,7 @@ jobs:
280280
# version tag, or manually triggered dev builds, so we have enough
281281
# assurance that package signing works, but don't sign every PR build.
282282
- if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' }}
283-
uses: grafana/shared-workflows/actions/get-vault-secrets@get-vault-secrets/v1.2.1
283+
uses: grafana/shared-workflows/actions/get-vault-secrets@get-vault-secrets/v1.3.0
284284
with:
285285
repo_secrets: |
286286
WIN_SIGN_CERT=winsign:WIN_SIGN_CERT
@@ -328,7 +328,7 @@ jobs:
328328
contents: write
329329
steps:
330330
- name: Checkout code
331-
uses: actions/checkout@v4
331+
uses: actions/checkout@v5
332332
with:
333333
persist-credentials: false
334334
- name: Download binaries
@@ -345,7 +345,7 @@ jobs:
345345
run: cd dist && sha256sum * > "k6-${VERSION}-checksums.txt"
346346
- name: Anchore SBOM Action
347347
continue-on-error: true
348-
uses: anchore/sbom-action@9fece9e20048ca9590af301449208b2b8861333b # v0.15.9
348+
uses: anchore/sbom-action@7b36ad622f042cab6f59a75c2ac24ccb256e9b45 # v0.20.4
349349
with:
350350
artifact-name: k6-${{ env.VERSION }}-spdx.json
351351
upload-release-assets: false
@@ -374,7 +374,7 @@ jobs:
374374
id-token: write # Required for Vault
375375
steps:
376376
- name: Checkout code
377-
uses: actions/checkout@v4
377+
uses: actions/checkout@v5
378378
with:
379379
persist-credentials: false
380380
- name: Download binaries
@@ -393,7 +393,7 @@ jobs:
393393
mv "dist/k6-$VERSION-windows-amd64.msi" "dist/k6-$VERSION-amd64.msi"
394394
mv "dist/k6-$VERSION-linux-amd64.rpm" "dist/k6-$VERSION-amd64.rpm"
395395
mv "dist/k6-$VERSION-linux-amd64.deb" "dist/k6-$VERSION-amd64.deb"
396-
- uses: grafana/shared-workflows/actions/get-vault-secrets@get-vault-secrets/v1.2.1
396+
- uses: grafana/shared-workflows/actions/get-vault-secrets@get-vault-secrets/v1.3.0
397397
with:
398398
repo_secrets: |
399399
IAM_ROLE_ARN=deploy:packager-iam-role

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ jobs:
1515

1616
steps:
1717
- name: Checkout repo
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v5
1919
with:
2020
persist-credentials: false
2121

2222
- name: Initialize CodeQL
23-
uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
23+
uses: github/codeql-action/init@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.5
2424
with:
2525
languages: go
2626

2727
- name: CodeQL Analysis
28-
uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
28+
uses: github/codeql-action/analyze@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.5

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@v5
2020
with:
2121
persist-credentials: false
2222
fetch-depth: 0
@@ -39,7 +39,7 @@ jobs:
3939
runs-on: ubuntu-latest
4040
steps:
4141
- name: Checkout code
42-
uses: actions/checkout@v4
42+
uses: actions/checkout@v5
4343
with:
4444
persist-credentials: false
4545
fetch-depth: 0

.github/workflows/packager.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
packages: write
2323
steps:
2424
- name: Checkout code
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v5
2626
with:
2727
persist-credentials: false
2828
- name: Build

.github/workflows/tc39.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Checkout code
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v5
2626
with:
2727
persist-credentials: false
2828
- name: Install Go

.github/workflows/test.yml

Lines changed: 23 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ permissions:
1414

1515
jobs:
1616
test-prev:
17+
if: ${{ github.ref == 'refs/heads/master' }}
1718
strategy:
1819
fail-fast: false
1920
matrix:
@@ -22,7 +23,7 @@ jobs:
2223
runs-on: ${{ matrix.platform }}
2324
steps:
2425
- name: Checkout code
25-
uses: actions/checkout@v4
26+
uses: actions/checkout@v5
2627
with:
2728
fetch-depth: 0
2829
persist-credentials: false
@@ -47,11 +48,13 @@ jobs:
4748
go version
4849
export GOMAXPROCS=2
4950
args=("-p" "2" "-race")
50-
# Run with less concurrency on Windows/MacOS/ARM to minimize flakiness.
51-
if [[ "${{ matrix.platform }}" == windows* || "${{ matrix.platform }}" == macos* || "${{ matrix.platform }}" == *arm ]]; then
52-
unset args[2]
51+
# Run with less concurrency on Windows/ARM to minimize flakiness.
52+
if [[ "${{ matrix.platform }}" == windows* || "${{ matrix.platform }}" == *arm ]]; then
5353
args[1]="1"
5454
export GOMAXPROCS=1
55+
if [[ "${{ matrix.platform }}" == windows* ]]; then
56+
unset args[2]
57+
fi
5558
fi
5659
go test "${args[@]}" -timeout 800s ./...
5760
@@ -64,7 +67,7 @@ jobs:
6467
continue-on-error: true
6568
steps:
6669
- name: Checkout code
67-
uses: actions/checkout@v4
70+
uses: actions/checkout@v5
6871
with:
6972
persist-credentials: false
7073
- name: Download Go tip
@@ -92,27 +95,26 @@ jobs:
9295
go version
9396
export GOMAXPROCS=2
9497
args=("-p" "2" "-race")
95-
# Run with less concurrency on Windows/MacOS/ARM to minimize flakiness.
96-
if [[ "${{ matrix.platform }}" == windows* || "${{ matrix.platform }}" == macos* || "${{ matrix.platform }}" == *arm ]]; then
97-
unset args[2]
98+
# Run with less concurrency on Windows/ARM to minimize flakiness.
99+
if [[ "${{ matrix.platform }}" == windows* || "${{ matrix.platform }}" == *arm ]]; then
98100
args[1]="1"
99101
export GOMAXPROCS=1
102+
if [[ "${{ matrix.platform }}" == windows* ]]; then
103+
unset args[2]
104+
fi
100105
fi
101106
go test "${args[@]}" -timeout 800s ./...
102107
103-
test-current-cov:
108+
test-latest:
104109
strategy:
105110
fail-fast: false
106111
matrix:
107112
go-version: [1.24.x]
108113
platform: [ubuntu-22.04, ubuntu-24.04-arm, windows-latest]
109-
permissions: # required for Vault
110-
id-token: write
111-
contents: read
112114
runs-on: ${{ matrix.platform }}
113115
steps:
114116
- name: Checkout code
115-
uses: actions/checkout@v4
117+
uses: actions/checkout@v5
116118
with:
117119
persist-credentials: false
118120
- name: Install Go
@@ -126,54 +128,18 @@ jobs:
126128
run: |
127129
sudo apt update && sudo apt install chromium-browser
128130
chromium --version
129-
- name: Run tests with code coverage
131+
- name: Run tests
130132
run: |
133+
set -x
131134
go version
132135
export GOMAXPROCS=2
133136
args=("-p" "2" "-race")
134-
# Run with less concurrency on Windows/MacOS/ARM to minimize flakiness.
135-
if [[ "${{ matrix.platform }}" == windows* || "${{ matrix.platform }}" == macos* || "${{ matrix.platform }}" == *arm ]]; then
136-
unset args[2]
137+
# Run with less concurrency on Windows/ARM to minimize flakiness.
138+
if [[ "${{ matrix.platform }}" == windows* || "${{ matrix.platform }}" == *arm ]]; then
137139
args[1]="1"
138140
export GOMAXPROCS=1
141+
if [[ "${{ matrix.platform }}" == windows* ]]; then
142+
unset args[2]
143+
fi
139144
fi
140-
echo "mode: set" > coverage.txt
141-
for pkg in $(go list ./... | grep -v vendor); do
142-
list=$(go list -test -f '{{ join .Deps "\n"}}' $pkg | grep go.k6.io/k6 | grep -v vendor || true)
143-
if [ -n "$list" ]; then
144-
list=$(echo "$list" | cut -f1 -d ' ' | sort -u | paste -sd, -)
145-
fi
146-
147-
go test "${args[@]}" -timeout 800s --coverpkg="$list" -coverprofile=$(echo $pkg | tr / -).coverage $pkg
148-
done
149-
grep -h -v "^mode:" *.coverage >> coverage.txt
150-
rm -f *.coverage
151-
# Sets CODECOV_TOKEN as an environment variable for the next step
152-
- name: Get Codecov token
153-
# Skip this step if the PR is from a fork, as we can't fetch secrets for forks.
154-
if: github.event.pull_request.head.repo.full_name == github.repository
155-
uses: grafana/shared-workflows/actions/get-vault-secrets@get-vault-secrets/v1.2.1
156-
with:
157-
repo_secrets: |
158-
CODECOV_TOKEN=CODECOV_TOKEN:CODECOV_TOKEN
159-
- name: Upload coverage to Codecov
160-
if: github.event.pull_request.head.repo.full_name == github.repository
161-
env:
162-
CODECOV_BASH_VERSION: 1.0.1
163-
CODECOV_BASH_SHA512SUM: d075b412a362a9a2b7aedfec3b8b9a9a927b3b99e98c7c15a2b76ef09862aeb005e91d76a5fd71b511141496d0fd23d1b42095f722ebcd509d768fba030f159e
164-
run: |
165-
if [[ "${{ matrix.platform }}" == macos* ]]; then
166-
shopt -s expand_aliases
167-
alias sha512sum='shasum -a 512'
168-
fi
169-
curl -fsSLO "https://raw.githubusercontent.com/codecov/codecov-bash/${CODECOV_BASH_VERSION}/codecov"
170-
echo "$CODECOV_BASH_SHA512SUM codecov" | sha512sum -c -
171-
platform="${{ matrix.platform }}"
172-
bash ./codecov -F "${platform%%-*}"
173-
- name: Generate coverage HTML report
174-
run: go tool cover -html=coverage.txt -o coverage.html
175-
- name: Upload coverage report
176-
uses: actions/upload-artifact@v4
177-
with:
178-
name: test-coverage-report-${{ matrix.platform }}
179-
path: coverage.html
145+
go test "${args[@]}" -timeout 800s ./...

.github/workflows/trivy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
if: github.repository == 'grafana/k6' # avoid running on forks
2222
steps:
2323
- name: Run Trivy vulnerability scanner
24-
uses: aquasecurity/trivy-action@22d2755f774d925b191a185b74e782a4b0638a41 # v0.15.0
24+
uses: aquasecurity/trivy-action@dc5a429b52fcf669ce959baa2c2dd26090d2a6c4 # v0.32.0
2525
with:
2626
image-ref: 'grafana/k6:master'
2727
format: 'sarif'
2828
output: 'trivy-results.sarif'
2929
severity: 'CRITICAL,HIGH,MEDIUM'
3030

3131
- name: Upload Trivy scan results to GitHub Security tab
32-
uses: github/codeql-action/upload-sarif@4c3e5362829f0b0bb62ff5f6c938d7f95574c306 # v2.21.1
32+
uses: github/codeql-action/upload-sarif@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v2.21.1
3333
with:
3434
sarif_file: 'trivy-results.sarif'

0 commit comments

Comments
 (0)