Skip to content

Commit d719fb8

Browse files
authored
Merge pull request #11279 from ipfs/release-v0.41.0
Release v0.41.0
2 parents 39f8a65 + af0dcf6 commit d719fb8

174 files changed

Lines changed: 13508 additions & 4162 deletions

File tree

Some content is hidden

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

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
custom: [ipshipyard.gitwallet.co]
1+
github: [ipshipyard]

.github/workflows/docker-check.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,20 @@ jobs:
3030
verbose: true
3131
format: tty
3232

33+
# Guard rail: the Dockerfile ARG default is what `docker build .` uses
34+
# locally without --build-arg. CI overrides it from go.mod, but the
35+
# default must stay in sync so local builds and the published image use
36+
# the same Go toolchain.
37+
- name: Verify Dockerfile GO_VERSION default matches go.mod
38+
run: |
39+
GO_MOD_VERSION=$(awk '/^go [0-9]/ {print $2; exit}' go.mod)
40+
DOCKERFILE_VERSION=$(awk -F= '/^ARG GO_VERSION=/ {print $2; exit}' Dockerfile)
41+
if [ "$GO_MOD_VERSION" != "$DOCKERFILE_VERSION" ]; then
42+
echo "::error file=Dockerfile::go.mod has 'go ${GO_MOD_VERSION}' but Dockerfile default ARG GO_VERSION=${DOCKERFILE_VERSION}. Update the Dockerfile default to match go.mod."
43+
exit 1
44+
fi
45+
echo "OK: both pinned to ${GO_MOD_VERSION}"
46+
3347
build:
3448
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
3549
runs-on: ubuntu-latest
@@ -42,17 +56,25 @@ jobs:
4256
shell: bash
4357
steps:
4458
- uses: actions/checkout@v6
45-
59+
4660
- name: Set up Docker Buildx
47-
uses: docker/setup-buildx-action@v3
48-
61+
uses: docker/setup-buildx-action@v4
62+
63+
# Mirror the publish workflow: pull the Go version from go.mod so the
64+
# PR check builds with the same toolchain that the published image uses.
65+
- name: Read Go version from go.mod
66+
id: go
67+
run: echo "version=$(awk '/^go [0-9]/ {print $2; exit}' go.mod)" >> "$GITHUB_OUTPUT"
68+
4969
- name: Build Docker image with BuildKit
50-
uses: docker/build-push-action@v6
70+
uses: docker/build-push-action@v7
5171
with:
5272
context: .
5373
push: false
5474
load: true
5575
tags: ${{ env.IMAGE_NAME }}:${{ env.WIP_IMAGE_TAG }}
76+
build-args: |
77+
GO_VERSION=${{ steps.go.outputs.version }}
5678
cache-from: |
5779
type=gha
5880
type=registry,ref=${{ env.IMAGE_NAME }}:buildcache

.github/workflows/docker-image.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ jobs:
4646
uses: actions/checkout@v6
4747

4848
- name: Set up QEMU
49-
uses: docker/setup-qemu-action@v3
49+
uses: docker/setup-qemu-action@v4
5050

5151
- name: Set up Docker Buildx
52-
uses: docker/setup-buildx-action@v3
52+
uses: docker/setup-buildx-action@v4
5353

5454
- name: Log in to Docker Hub
55-
uses: docker/login-action@v3
55+
uses: docker/login-action@v4
5656
with:
5757
username: ${{ vars.DOCKER_USERNAME }}
5858
password: ${{ secrets.DOCKER_PASSWORD }}
@@ -66,46 +66,58 @@ jobs:
6666
echo "EOF" >> $GITHUB_OUTPUT
6767
shell: bash
6868

69+
# Read the Go version from go.mod so the Docker image is built with the
70+
# exact same toolchain that setup-go installs in the rest of CI.
71+
- name: Read Go version from go.mod
72+
id: go
73+
run: echo "version=$(awk '/^go [0-9]/ {print $2; exit}' go.mod)" >> "$GITHUB_OUTPUT"
74+
6975
# We have to build each platform separately because when using multi-arch
7076
# builds, only one platform is being loaded into the cache. This would
7177
# prevent us from testing the other platforms.
7278
- name: Build Docker image (linux/amd64)
73-
uses: docker/build-push-action@v6
79+
uses: docker/build-push-action@v7
7480
with:
7581
platforms: linux/amd64
7682
context: .
7783
push: false
7884
load: true
7985
file: ./Dockerfile
8086
tags: ${{ env.IMAGE_NAME }}:linux-amd64
87+
build-args: |
88+
GO_VERSION=${{ steps.go.outputs.version }}
8189
cache-from: |
8290
type=gha
8391
type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
8492
cache-to: type=gha,mode=max
8593

8694
- name: Build Docker image (linux/arm/v7)
87-
uses: docker/build-push-action@v6
95+
uses: docker/build-push-action@v7
8896
with:
8997
platforms: linux/arm/v7
9098
context: .
9199
push: false
92100
load: true
93101
file: ./Dockerfile
94102
tags: ${{ env.IMAGE_NAME }}:linux-arm-v7
103+
build-args: |
104+
GO_VERSION=${{ steps.go.outputs.version }}
95105
cache-from: |
96106
type=gha
97107
type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
98108
cache-to: type=gha,mode=max
99109

100110
- name: Build Docker image (linux/arm64/v8)
101-
uses: docker/build-push-action@v6
111+
uses: docker/build-push-action@v7
102112
with:
103113
platforms: linux/arm64/v8
104114
context: .
105115
push: false
106116
load: true
107117
file: ./Dockerfile
108118
tags: ${{ env.IMAGE_NAME }}:linux-arm64-v8
119+
build-args: |
120+
GO_VERSION=${{ steps.go.outputs.version }}
109121
cache-from: |
110122
type=gha
111123
type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
@@ -128,13 +140,15 @@ jobs:
128140
# This will only push the previously built images.
129141
- if: github.event_name != 'workflow_dispatch' || github.event.inputs.push == 'true'
130142
name: Publish to Docker Hub
131-
uses: docker/build-push-action@v6
143+
uses: docker/build-push-action@v7
132144
with:
133145
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
134146
context: .
135147
push: true
136148
file: ./Dockerfile
137149
tags: "${{ github.event.inputs.tags || steps.tags.outputs.value }}"
150+
build-args: |
151+
GO_VERSION=${{ steps.go.outputs.version }}
138152
cache-from: |
139153
type=gha
140154
type=registry,ref=${{ env.IMAGE_NAME }}:buildcache

.github/workflows/gateway-conformance.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
steps:
4242
# 1. Download the gateway-conformance fixtures
4343
- name: Download gateway-conformance fixtures
44-
uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.10
44+
uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.13
4545
with:
4646
output: fixtures
4747

@@ -93,7 +93,7 @@ jobs:
9393

9494
# 6. Run the gateway-conformance tests
9595
- name: Run gateway-conformance tests
96-
uses: ipfs/gateway-conformance/.github/actions/test@v0.10
96+
uses: ipfs/gateway-conformance/.github/actions/test@v0.13
9797
with:
9898
gateway-url: http://127.0.0.1:8080
9999
subdomain-url: http://localhost:8080
@@ -109,13 +109,13 @@ jobs:
109109
run: cat output.md >> $GITHUB_STEP_SUMMARY
110110
- name: Upload HTML report
111111
if: failure() || success()
112-
uses: actions/upload-artifact@v6
112+
uses: actions/upload-artifact@v7
113113
with:
114114
name: gateway-conformance.html
115115
path: output.html
116116
- name: Upload JSON report
117117
if: failure() || success()
118-
uses: actions/upload-artifact@v6
118+
uses: actions/upload-artifact@v7
119119
with:
120120
name: gateway-conformance.json
121121
path: output.json
@@ -127,7 +127,7 @@ jobs:
127127
steps:
128128
# 1. Download the gateway-conformance fixtures
129129
- name: Download gateway-conformance fixtures
130-
uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.10
130+
uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.13
131131
with:
132132
output: fixtures
133133

@@ -199,7 +199,7 @@ jobs:
199199

200200
# 9. Run the gateway-conformance tests over libp2p
201201
- name: Run gateway-conformance tests over libp2p
202-
uses: ipfs/gateway-conformance/.github/actions/test@v0.10
202+
uses: ipfs/gateway-conformance/.github/actions/test@v0.13
203203
with:
204204
gateway-url: http://127.0.0.1:8092
205205
args: --specs "trustless-gateway,-trustless-ipns-gateway" -skip 'TestGatewayCar/GET_response_for_application/vnd.ipld.car/Header_Content-Length'
@@ -214,13 +214,13 @@ jobs:
214214
run: cat output.md >> $GITHUB_STEP_SUMMARY
215215
- name: Upload HTML report
216216
if: failure() || success()
217-
uses: actions/upload-artifact@v6
217+
uses: actions/upload-artifact@v7
218218
with:
219219
name: gateway-conformance-libp2p.html
220220
path: output.html
221221
- name: Upload JSON report
222222
if: failure() || success()
223-
uses: actions/upload-artifact@v6
223+
uses: actions/upload-artifact@v7
224224
with:
225225
name: gateway-conformance-libp2p.json
226226
path: output.json

.github/workflows/gotest.yml

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
make test_unit &&
4444
[[ ! $(jq -s -c 'map(select(.Action == "fail")) | .[]' test/unit/gotest.json) ]]
4545
- name: Upload coverage to Codecov
46-
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
46+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
4747
if: failure() || success()
4848
with:
4949
name: unittests
@@ -57,7 +57,7 @@ jobs:
5757
output: test/unit/gotest.junit.xml
5858
if: failure() || success()
5959
- name: Archive the JUnit XML report
60-
uses: actions/upload-artifact@v6
60+
uses: actions/upload-artifact@v7
6161
with:
6262
name: unit-tests-junit
6363
path: test/unit/gotest.junit.xml
@@ -70,7 +70,7 @@ jobs:
7070
output: test/unit/gotest.html
7171
if: failure() || success()
7272
- name: Archive the HTML report
73-
uses: actions/upload-artifact@v6
73+
uses: actions/upload-artifact@v7
7474
with:
7575
name: unit-tests-html
7676
path: test/unit/gotest.html
@@ -120,7 +120,7 @@ jobs:
120120
output: test/cli/cli-tests.junit.xml
121121
if: failure() || success()
122122
- name: Archive JUnit XML report
123-
uses: actions/upload-artifact@v6
123+
uses: actions/upload-artifact@v7
124124
with:
125125
name: cli-tests-junit
126126
path: test/cli/cli-tests.junit.xml
@@ -133,7 +133,7 @@ jobs:
133133
output: test/cli/cli-tests.html
134134
if: failure() || success()
135135
- name: Archive HTML report
136-
uses: actions/upload-artifact@v6
136+
uses: actions/upload-artifact@v7
137137
with:
138138
name: cli-tests-html
139139
path: test/cli/cli-tests.html
@@ -149,6 +149,59 @@ jobs:
149149
run: cat test/cli/cli-tests.md >> $GITHUB_STEP_SUMMARY
150150
if: failure() || success()
151151

152+
# FUSE filesystem tests (require /dev/fuse and fusermount)
153+
# Runs both FUSE unit tests (./fuse/...) and CLI integration tests (./test/cli/fuse/...)
154+
fuse-tests:
155+
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
156+
runs-on: ${{ fromJSON(github.repository == 'ipfs/kubo' && '["self-hosted", "linux", "x64", "2xlarge"]' || '"ubuntu-latest"') }}
157+
concurrency:
158+
group: fuse-tests-${{ github.repository }}
159+
cancel-in-progress: false
160+
# A normal run takes ~3min. 6min gives roughly 2x and lets Go's 4min
161+
# test timeout fire first (printing a stack trace) on a hang, instead
162+
# of GitHub silently cancelling the job.
163+
timeout-minutes: 6
164+
env:
165+
# Dump all goroutines on a test panic, not just the panicking one,
166+
# so we can see which test is actually hung.
167+
GOTRACEBACK: all
168+
TEST_FUSE: 1
169+
defaults:
170+
run:
171+
shell: bash
172+
steps:
173+
- name: Check out Kubo
174+
uses: actions/checkout@v6
175+
- name: Set up Go
176+
uses: actions/setup-go@v6
177+
with:
178+
go-version-file: 'go.mod'
179+
- name: Install FUSE
180+
run: |
181+
if ! command -v fusermount3 &>/dev/null && ! command -v fusermount &>/dev/null; then
182+
sudo apt-get update
183+
sudo apt-get install -y fuse3
184+
fi
185+
- name: Clean up stale FUSE mounts
186+
run: |
187+
# On shared self-hosted runners, leftover mounts from previous
188+
# runs can exhaust the kernel FUSE mount limit (mount_max).
189+
# Unit tests mount with FsName "kubo-test"; CLI tests mount
190+
# under the harness temp dir (ipfs/ipns/mfs subdirectories).
191+
awk '$1 == "kubo-test" || $2 ~ /\/tmp\/.*\/(ipfs|ipns|mfs)$/ { print $2 }' /proc/mounts 2>/dev/null \
192+
| while read -r mp; do
193+
fusermount3 -uz "$mp" 2>/dev/null || fusermount -uz "$mp" 2>/dev/null || true
194+
done
195+
- name: Run FUSE tests
196+
run: make test_fuse
197+
- name: Clean up FUSE mounts
198+
if: always()
199+
run: |
200+
awk '$1 == "kubo-test" || $2 ~ /\/tmp\/.*\/(ipfs|ipns|mfs)$/ { print $2 }' /proc/mounts 2>/dev/null \
201+
| while read -r mp; do
202+
fusermount3 -uz "$mp" 2>/dev/null || fusermount -uz "$mp" 2>/dev/null || true
203+
done
204+
152205
# Example tests (kubo-as-a-library)
153206
example-tests:
154207
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'

.github/workflows/interop.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
with:
5252
go-version-file: 'go.mod'
5353
- run: make build
54-
- uses: actions/upload-artifact@v6
54+
- uses: actions/upload-artifact@v7
5555
with:
5656
name: kubo
5757
path: cmd/ipfs/ipfs
@@ -66,7 +66,7 @@ jobs:
6666
- uses: actions/setup-node@v6
6767
with:
6868
node-version: lts/*
69-
- uses: actions/download-artifact@v7
69+
- uses: actions/download-artifact@v8
7070
with:
7171
name: kubo
7272
path: cmd/ipfs
@@ -122,7 +122,7 @@ jobs:
122122
run:
123123
shell: bash
124124
steps:
125-
- uses: actions/download-artifact@v7
125+
- uses: actions/download-artifact@v8
126126
with:
127127
name: kubo
128128
path: cmd/ipfs
@@ -196,7 +196,7 @@ jobs:
196196
working-directory: ipfs-webui
197197
- name: Upload test artifacts on failure
198198
if: failure()
199-
uses: actions/upload-artifact@v6
199+
uses: actions/upload-artifact@v7
200200
with:
201201
name: webui-test-results
202202
path: ipfs-webui/test-results/

.github/workflows/sharness.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
# increasing parallelism beyond 10 doesn't speed up the tests much
5656
PARALLEL: ${{ github.repository == 'ipfs/kubo' && 10 || 3 }}
5757
- name: Upload coverage report
58-
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
58+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
5959
if: failure() || success()
6060
with:
6161
name: sharness
@@ -90,7 +90,7 @@ jobs:
9090
destination: sharness.html
9191
- name: Upload one-page HTML report
9292
if: github.repository != 'ipfs/kubo' && (failure() || success())
93-
uses: actions/upload-artifact@v6
93+
uses: actions/upload-artifact@v7
9494
with:
9595
name: sharness.html
9696
path: kubo/test/sharness/test-results/sharness.html
@@ -110,7 +110,7 @@ jobs:
110110
destination: sharness-html/
111111
- name: Upload full HTML report
112112
if: github.repository != 'ipfs/kubo' && (failure() || success())
113-
uses: actions/upload-artifact@v6
113+
uses: actions/upload-artifact@v7
114114
with:
115115
name: sharness-html
116116
path: kubo/test/sharness/test-results/sharness-html

0 commit comments

Comments
 (0)