Skip to content

Commit 882b7d2

Browse files
authored
Merge pull request #11194 from ipfs/release-v0.40.0
Release v0.40.0
2 parents 2896aed + 4a96745 commit 882b7d2

File tree

285 files changed

+13242
-3872
lines changed

Some content is hidden

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

285 files changed

+13242
-3872
lines changed

.github/dependabot.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,45 @@
1+
# Dependabot PRs are auto-tidied by .github/workflows/dependabot-tidy.yml
12
version: 2
23
updates:
34
- package-ecosystem: "github-actions"
45
directory: "/"
56
schedule:
67
interval: "weekly"
8+
9+
- package-ecosystem: "gomod"
10+
directory: "/"
11+
schedule:
12+
interval: "monthly"
13+
open-pull-requests-limit: 10
14+
labels:
15+
- "dependencies"
16+
ignore:
17+
# Updated via go-ds-* wrappers in ipfs-ecosystem group
18+
- dependency-name: "github.com/cockroachdb/pebble*"
19+
- dependency-name: "github.com/syndtr/goleveldb"
20+
- dependency-name: "github.com/dgraph-io/badger*"
21+
groups:
22+
ipfs-ecosystem:
23+
patterns:
24+
- "github.com/ipfs/*"
25+
- "github.com/ipfs-shipyard/*"
26+
- "github.com/ipshipyard/*"
27+
- "github.com/multiformats/*"
28+
- "github.com/ipld/*"
29+
libp2p-ecosystem:
30+
patterns:
31+
- "github.com/libp2p/*"
32+
golang-x:
33+
patterns:
34+
- "golang.org/x/*"
35+
opentelemetry:
36+
patterns:
37+
- "go.opentelemetry.io/*"
38+
prometheus:
39+
patterns:
40+
- "github.com/prometheus/*"
41+
- "contrib.go.opencensus.io/*"
42+
- "go.opencensus.io"
43+
uber:
44+
patterns:
45+
- "go.uber.org/*"

.github/legacy/Dockerfile.goipfs-stub

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/legacy/goipfs_stub.sh

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
steps:
3131
- name: Checkout repository
32-
uses: actions/checkout@v5
32+
uses: actions/checkout@v6
3333

3434
- name: Setup Go
3535
uses: actions/setup-go@v6
@@ -38,12 +38,12 @@ jobs:
3838

3939
# Initializes the CodeQL tools for scanning.
4040
- name: Initialize CodeQL
41-
uses: github/codeql-action/init@v3
41+
uses: github/codeql-action/init@v4
4242
with:
4343
languages: go
4444

4545
- name: Autobuild
46-
uses: github/codeql-action/autobuild@v3
46+
uses: github/codeql-action/autobuild@v4
4747

4848
- name: Perform CodeQL Analysis
49-
uses: github/codeql-action/analyze@v3
49+
uses: github/codeql-action/analyze@v4
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Dependabot only updates go.mod/go.sum in the root module, but this repo has
2+
# multiple Go modules (see docs/examples/). This workflow runs `make mod_tidy`
3+
# on Dependabot PRs to keep all go.sum files in sync, preventing go-check CI
4+
# failures.
5+
name: Dependabot Tidy
6+
7+
on:
8+
pull_request_target:
9+
types: [opened, synchronize]
10+
workflow_dispatch:
11+
inputs:
12+
pr_number:
13+
description: 'PR number to run mod_tidy on'
14+
required: true
15+
type: number
16+
17+
permissions:
18+
contents: write
19+
pull-requests: write
20+
21+
jobs:
22+
tidy:
23+
if: github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch'
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Get PR info
27+
id: pr
28+
env:
29+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
run: |
31+
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
32+
pr_number="${{ inputs.pr_number }}"
33+
else
34+
pr_number="${{ github.event.pull_request.number }}"
35+
fi
36+
echo "number=$pr_number" >> $GITHUB_OUTPUT
37+
branch=$(gh pr view "$pr_number" --repo "${{ github.repository }}" --json headRefName -q '.headRefName')
38+
echo "branch=$branch" >> $GITHUB_OUTPUT
39+
- uses: actions/checkout@v6
40+
with:
41+
ref: ${{ steps.pr.outputs.branch }}
42+
token: ${{ secrets.GITHUB_TOKEN }}
43+
- uses: actions/setup-go@v6
44+
with:
45+
go-version-file: go.mod
46+
- name: Run make mod_tidy
47+
run: make mod_tidy
48+
- name: Check for changes
49+
id: git-check
50+
run: |
51+
if [[ -n $(git status --porcelain) ]]; then
52+
echo "modified=true" >> $GITHUB_OUTPUT
53+
fi
54+
- name: Commit changes
55+
if: steps.git-check.outputs.modified == 'true'
56+
run: |
57+
git config user.name "github-actions[bot]"
58+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
59+
git add -A
60+
git commit -m "chore: run make mod_tidy"
61+
git push

.github/workflows/docker-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
timeout-minutes: 5
2424
steps:
25-
- uses: actions/checkout@v5
25+
- uses: actions/checkout@v6
2626
- uses: hadolint/hadolint-action@v3.3.0
2727
with:
2828
dockerfile: Dockerfile
@@ -41,7 +41,7 @@ jobs:
4141
run:
4242
shell: bash
4343
steps:
44-
- uses: actions/checkout@v5
44+
- uses: actions/checkout@v6
4545

4646
- name: Set up Docker Buildx
4747
uses: docker/setup-buildx-action@v3

.github/workflows/docker-image.yml

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
tags: ${{ steps.tags.outputs.value }}
4444
steps:
4545
- name: Check out the repo
46-
uses: actions/checkout@v5
46+
uses: actions/checkout@v6
4747

4848
- name: Set up QEMU
4949
uses: docker/setup-qemu-action@v3
@@ -141,52 +141,3 @@ jobs:
141141
cache-to: |
142142
type=gha,mode=max
143143
type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max
144-
145-
# Build and push stub image to the legacy ipfs/go-ipfs name
146-
# This redirects users to use ipfs/kubo instead
147-
legacy-name:
148-
needs: docker-hub
149-
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
150-
name: Push stub to legacy ipfs/go-ipfs name
151-
runs-on: ubuntu-latest
152-
timeout-minutes: 5
153-
env:
154-
LEGACY_IMAGE_NAME: ipfs/go-ipfs
155-
steps:
156-
- name: Check out the repo
157-
uses: actions/checkout@v5
158-
159-
- name: Set up QEMU
160-
uses: docker/setup-qemu-action@v3
161-
162-
- name: Set up Docker Buildx
163-
uses: docker/setup-buildx-action@v3
164-
165-
- name: Log in to Docker Hub
166-
uses: docker/login-action@v3
167-
with:
168-
username: ${{ vars.DOCKER_USERNAME }}
169-
password: ${{ secrets.DOCKER_PASSWORD }}
170-
171-
- name: Convert tags to legacy image name
172-
id: legacy_tags
173-
run: |
174-
TAGS="${{ github.event.inputs.tags || needs.docker-hub.outputs.tags }}"
175-
if ! echo "$TAGS" | grep -q "kubo"; then
176-
echo "ERROR: Tags must contain kubo image name"
177-
exit 1
178-
fi
179-
echo "value<<EOF" >> $GITHUB_OUTPUT
180-
echo "$TAGS" | sed "s|ipfs/kubo|$LEGACY_IMAGE_NAME|g" >> $GITHUB_OUTPUT
181-
echo "EOF" >> $GITHUB_OUTPUT
182-
shell: bash
183-
184-
- if: github.event_name != 'workflow_dispatch' || github.event.inputs.push == 'true'
185-
name: Build and push legacy stub image
186-
uses: docker/build-push-action@v6
187-
with:
188-
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
189-
context: .
190-
push: true
191-
file: ./.github/legacy/Dockerfile.goipfs-stub
192-
tags: ${{ steps.legacy_tags.outputs.value }}

.github/workflows/gateway-conformance.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ 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.8
44+
uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.10
4545
with:
4646
output: fixtures
4747

4848
# 2. Build the kubo-gateway
4949
- name: Checkout kubo-gateway
50-
uses: actions/checkout@v5
50+
uses: actions/checkout@v6
5151
with:
5252
path: kubo-gateway
5353
- name: Setup Go
@@ -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.8
96+
uses: ipfs/gateway-conformance/.github/actions/test@v0.10
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@v5
112+
uses: actions/upload-artifact@v6
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@v5
118+
uses: actions/upload-artifact@v6
119119
with:
120120
name: gateway-conformance.json
121121
path: output.json
@@ -127,13 +127,13 @@ 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.8
130+
uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.10
131131
with:
132132
output: fixtures
133133

134134
# 2. Build the kubo-gateway
135135
- name: Checkout kubo-gateway
136-
uses: actions/checkout@v5
136+
uses: actions/checkout@v6
137137
with:
138138
path: kubo-gateway
139139
- name: Setup Go
@@ -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.8
202+
uses: ipfs/gateway-conformance/.github/actions/test@v0.10
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@v5
217+
uses: actions/upload-artifact@v6
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@v5
223+
uses: actions/upload-artifact@v6
224224
with:
225225
name: gateway-conformance-libp2p.json
226226
path: output.json

.github/workflows/gobuild.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run:
2828
shell: bash
2929
steps:
30-
- uses: actions/checkout@v5
30+
- uses: actions/checkout@v6
3131
- uses: actions/setup-go@v6
3232
with:
3333
go-version-file: 'go.mod'

.github/workflows/golang-analysis.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
timeout-minutes: 10
2424
steps:
25-
- uses: actions/checkout@v5
25+
- uses: actions/checkout@v6
2626
with:
2727
submodules: recursive
2828
- uses: actions/setup-go@v6
@@ -47,6 +47,15 @@ jobs:
4747
echo "$out"
4848
exit 1
4949
fi
50+
- name: go fix
51+
if: always() # run this step even if the previous one failed
52+
run: |
53+
go fix ./...
54+
if [[ -n $(git diff --name-only) ]]; then
55+
echo "go fix produced changes. Run 'go fix ./...' locally and commit the result."
56+
git diff
57+
exit 1
58+
fi
5059
- name: go vet
5160
if: always() # run this step even if the previous one failed
5261
uses: protocol/multiple-go-modules@v1.4

0 commit comments

Comments
 (0)