Skip to content

Commit c9d51bb

Browse files
authored
Merge pull request #9023 from ipfs/release-v0.13.0
Release v0.13.0
2 parents 0e8b121 + 3b88b44 commit c9d51bb

File tree

298 files changed

+14368
-2984
lines changed

Some content is hidden

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

298 files changed

+14368
-2984
lines changed

.circleci/main.yml

+37-16
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ default_environment: &default_environment
3232
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
3333
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
3434
GIT_PAGER: cat
35+
IPFS_CHECK_RCMGR_DEFAULTS: 1
3536

3637
executors:
3738
golang:
3839
docker:
39-
- image: cimg/go:1.16.15
40+
- image: cimg/go:1.18.3
4041
working_directory: ~/ipfs/go-ipfs
4142
environment:
4243
<<: *default_environment
@@ -61,14 +62,15 @@ executors:
6162
E2E_IPFSD_TYPE: go
6263
dockerizer:
6364
docker:
64-
- image: cimg/go:1.16.15
65+
- image: cimg/go:1.18.3
6566
environment:
6667
IMAGE_NAME: ipfs/go-ipfs
6768
WIP_IMAGE_TAG: wip
6869

6970
jobs:
7071
gobuild:
7172
executor: golang
73+
resource_class: 2xlarge+
7274
steps:
7375
- checkout
7476
- *make_out_dirs
@@ -106,7 +108,10 @@ jobs:
106108
command: bash <(curl -s https://codecov.io/bash) -cF unittests -X search -f coverage/unit_tests.coverprofile
107109
- run:
108110
command: |
109-
# we want to test the examples against the current version of go-ipfs
111+
# we want to first test with the go-ipfs in the go.mod file
112+
go test -v ./...
113+
114+
# we also want to test the examples against the current version of go-ipfs
110115
# however, that version might be in a fork so we need to replace the dependency
111116
112117
# backup the go.mod and go.sum files to restore them after we run the tests
@@ -116,11 +121,18 @@ jobs:
116121
# make sure the examples run against the current version of go-ipfs
117122
go mod edit -replace github.com/ipfs/go-ipfs=./../../..
118123
go mod tidy
124+
125+
# use the internal config package when we test the current version of go-ipfs
126+
sed -i.bak 's;"github.com/ipfs/go-ipfs-config";"github.com/ipfs/go-ipfs/config";' ./main.go
127+
119128
go test -v ./...
120129
121130
# restore the go.mod and go.sum files to their original state
122131
mv go.mod.bak go.mod
123132
mv go.sum.bak go.sum
133+
134+
# restore the main.go to its original state
135+
mv main.go.bak main.go
124136
working_directory: ~/ipfs/go-ipfs/docs/examples/go-ipfs-as-a-library
125137

126138
- run:
@@ -143,15 +155,15 @@ jobs:
143155
working_directory: ~/ipfs/go-ipfs
144156
environment:
145157
<<: *default_environment
146-
TEST_NO_DOCKER: 1
158+
TEST_NO_DOCKER: 0
147159
TEST_NO_FUSE: 1
148160
TEST_VERBOSE: 1
149161
steps:
150162
- run: sudo apt update
151163
- run: |
152164
mkdir ~/localgo && cd ~/localgo
153-
wget https://golang.org/dl/go1.16.15.linux-amd64.tar.gz
154-
tar xfz go1.16.15.linux-amd64.tar.gz
165+
wget https://golang.org/dl/go1.18.3.linux-amd64.tar.gz
166+
tar xfz go1.18.3.linux-amd64.tar.gz
155167
echo "export PATH=$(pwd)/go/bin:\$PATH" >> ~/.bashrc
156168
- run: go version
157169
- run: sudo apt install socat net-tools
@@ -166,7 +178,7 @@ jobs:
166178
git checkout FETCH_HEAD
167179
- run:
168180
cd rb-pinning-service-api &&
169-
docker-compose pull &&
181+
(for i in {1..3}; do docker-compose pull && break || sleep 5; done) &&
170182
docker-compose up -d
171183

172184
- *make_out_dirs
@@ -217,33 +229,43 @@ jobs:
217229
- *store_gomod
218230
interop:
219231
docker:
220-
- image: cimg/go:1.16-node
232+
- image: cimg/go:1.18.3-node
221233
parallelism: 4
234+
resource_class: large
222235
steps:
223236
- *make_out_dirs
224237
- attach_workspace:
225238
at: /tmp/circleci-workspace
239+
- restore_cache:
240+
keys:
241+
- v1-interop-{{ .Branch }}-{{ .Revision }}
242+
- v1-interop-{{ .Branch }}-
243+
- v1-interop-
226244
- run:
227245
name: Installing dependencies
228246
command: |
229247
npm init -y
230248
npm install ipfs@^0.61.0
231-
npm install ipfs-interop@^8.0.0
249+
npm install ipfs-interop@^8.0.10
232250
npm install [email protected]
233251
working_directory: ~/ipfs/go-ipfs/interop
234252
- run:
235253
name: Running tests
236254
command: |
237255
mkdir -p /tmp/test-results/interop/
238256
export MOCHA_FILE="$(mktemp /tmp/test-results/interop/unit.XXXXXX.xml)"
239-
npx ipfs-interop -- -t node -f $(sed -n -e "s|^require('\(.*\)')$|test/\1|p" node_modules/ipfs-interop/test/node.js | circleci tests split) -- --reporter mocha-circleci-reporter
257+
npx ipfs-interop -- -t node -f $(sed -n -e "s|^import '\(.*\)'$|test/\1|p" node_modules/ipfs-interop/test/node.js | circleci tests split --split-by=timings) -- --reporter mocha-circleci-reporter
240258
working_directory: ~/ipfs/go-ipfs/interop
241259
environment:
242260
LIBP2P_TCP_REUSEPORT: false
243261
LIBP2P_ALLOW_WEAK_RSA_KEYS: 1
244262
IPFS_GO_EXEC: /tmp/circleci-workspace/bin/ipfs
245263
- store_test_results:
246264
path: /tmp/test-results
265+
- save_cache:
266+
key: v1-interop-{{ .Branch }}-{{ .Revision }}
267+
paths:
268+
- ~/ipfs/go-ipfs/interop/node_modules
247269
go-ipfs-api:
248270
executor: golang
249271
steps:
@@ -271,7 +293,7 @@ jobs:
271293
- v1-go-api-{{ checksum "~/ipfs/go-ipfs/go-ipfs-api/go.sum" }}
272294
- v1-go-api-
273295
- run:
274-
command: go test -v ./...
296+
command: go test -count=1 -v ./...
275297
working_directory: ~/ipfs/go-ipfs/go-ipfs-api
276298
- save_cache:
277299
key: v1-go-api-{{ checksum "~/ipfs/go-ipfs/go-ipfs-api/go.sum" }}
@@ -292,18 +314,15 @@ jobs:
292314
command: |
293315
git clone https://github.com/ipfs/go-ipfs-http-client.git
294316
git -C go-ipfs-http-client log -1
295-
cd go-ipfs-http-client
296-
git checkout v0.2.0
297-
cd ..
298317
- restore_cache:
299318
keys:
300319
- v1-http-client-{{ checksum "~/ipfs/go-ipfs/go-ipfs-http-client/go.sum" }}
301320
- v1-http-client-
302321
- run:
303-
name: go test -v ./...
322+
name: go test -count=1 -v ./...
304323
command: |
305324
export PATH=/tmp/circleci-workspace/bin:$PATH
306-
go test -v ./...
325+
go test -count=1 -v ./...
307326
working_directory: ~/ipfs/go-ipfs/go-ipfs-http-client
308327
- save_cache:
309328
key: v1-http-client-{{ checksum "~/ipfs/go-ipfs/go-ipfs-http-client/go.sum" }}
@@ -329,6 +348,7 @@ jobs:
329348
name: Installing dependencies
330349
command: |
331350
npm install
351+
npx playwright install
332352
working_directory: ~/ipfs/go-ipfs/ipfs-webui
333353
- run:
334354
name: Running upstream tests (finish early if they fail)
@@ -344,6 +364,7 @@ jobs:
344364
- save_cache:
345365
key: v1-ipfs-webui-{{ checksum "~/ipfs/go-ipfs/ipfs-webui/package-lock.json" }}
346366
paths:
367+
- ~/.cache/ms-playwright
347368
- ~/ipfs/go-ipfs/ipfs-webui/node_modules
348369
# We only run build as a test here. DockerHub images are built and published
349370
# by Github Action now: https://github.com/ipfs/go-ipfs/pull/8467

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Dockerfile.fast
55
!.git/refs/
66
!.git/packed-refs
77
test/sharness/lib/sharness/
8+
test/sharness/trash*
9+
rb-pinning-service-api/
810

911
# The Docker client might not be running on Linux
1012
# so delete any compiled binaries

.github/CODEOWNERS

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Code owners are automatically requested for review when someone opens a pull
2+
# request that modifies code that they own. Code owners are not automatically
3+
# requested to review draft pull requests.
4+
5+
# HTTP Gateway
6+
core/corehttp/ @lidel
7+
test/sharness/*gateway*.sh @lidel

.github/ISSUE_TEMPLATE/config.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ contact_links:
44
url: https://ipfs.io/help
55
about: All information about how and where to get help on IPFS.
66
- name: Go-ipfs configuration reference
7-
url: https://github.com/ipfs/go-ipfs/blob/master/docs/config.md
7+
url: https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#readme
88
about: Documentation on the different configuration settings
99
- name: Go-ipfs experimental features docs
10-
url: https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md
10+
url: https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#readme
1111
about: Documentation on Private Networks, Filestore and other experimental features.
12-
- name: HTTP API Reference
13-
url: https://docs.ipfs.io/reference/http/api/#api-v0-add
14-
about: Documentation of all go-ipfs HTTP API endpoints.
12+
- name: RPC API Reference
13+
url: https://docs.ipfs.io/reference/http/api/
14+
about: Documentation of all go-ipfs RPC API endpoints.
1515
- name: IPFS Official Forum
1616
url: https://discuss.ipfs.io
1717
about: Please post general questions, support requests, and discussions here.

.github/workflows/codeql-analysis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name: "CodeQL"
33

44
on:
5+
workflow_dispatch:
56
push:
67
branches: [ master ]
78
pull_request:
@@ -12,6 +13,7 @@ on:
1213

1314
jobs:
1415
analyze:
16+
if: github.repository == 'ipfs/go-ipfs' || github.event_name == 'workflow_dispatch'
1517
name: Analyze
1618
runs-on: ubuntu-latest
1719

.github/workflows/docker-image.yml

+22-6
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,40 @@ on:
1111

1212
jobs:
1313
push_to_registry:
14+
if: github.repository == 'ipfs/go-ipfs' || github.event_name == 'workflow_dispatch'
1415
name: Push Docker image to Docker Hub
1516
runs-on: ubuntu-latest
1617
env:
1718
IMAGE_NAME: ipfs/go-ipfs
18-
WIP_IMAGE_TAG: wip
1919
steps:
2020
- name: Check out the repo
2121
uses: actions/checkout@v2
2222

23-
- name: Build wip Docker image
24-
run: docker build -t $IMAGE_NAME:$WIP_IMAGE_TAG .
23+
- name: Set up QEMU
24+
uses: docker/setup-qemu-action@v1
25+
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v1
28+
29+
- name: Get tags
30+
id: tags
31+
run: |
32+
TAGS="$(./bin/get-docker-tags.sh $(date -u +%F))"
33+
TAGS="${TAGS//$'\n'/'%0A'}"
34+
echo "::set-output name=value::$(echo $TAGS)"
35+
shell: bash
2536

2637
- name: Log in to Docker Hub
2738
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
2839
with:
2940
username: ${{ secrets.DOCKER_USERNAME }}
3041
password: ${{ secrets.DOCKER_PASSWORD }}
3142

32-
- name: Publish Docker Image to Docker Hub
33-
run: ./bin/push-docker-tags.sh $(date -u +%F)
34-
43+
- name: Build Docker image and publish to Docker Hub
44+
uses: docker/build-push-action@v2
45+
with:
46+
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
47+
context: .
48+
push: true
49+
file: ./Dockerfile
50+
tags: "${{ steps.tags.outputs.value }}"

.github/workflows/golang-analysis.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on: [push, pull_request]
2+
name: Go Checks
3+
4+
jobs:
5+
unit:
6+
runs-on: ubuntu-latest
7+
name: All
8+
steps:
9+
- uses: actions/checkout@v2
10+
with:
11+
submodules: recursive
12+
- uses: actions/setup-go@v2
13+
with:
14+
go-version: "1.18.x"
15+
- name: Check that go.mod is tidy
16+
uses: protocol/[email protected]
17+
with:
18+
run: |
19+
go mod tidy
20+
if [[ -n $(git ls-files --other --exclude-standard --directory -- go.sum) ]]; then
21+
echo "go.sum was added by go mod tidy"
22+
exit 1
23+
fi
24+
git diff --exit-code -- go.sum go.mod
25+
- name: gofmt
26+
if: always() # run this step even if the previous one failed
27+
run: |
28+
out=$(gofmt -s -l .)
29+
if [[ -n "$out" ]]; then
30+
echo $out | awk '{print "::error file=" $0 ",line=0,col=0::File is not gofmt-ed."}'
31+
exit 1
32+
fi
33+
- name: go vet
34+
if: always() # run this step even if the previous one failed
35+
uses: protocol/[email protected]
36+
with:
37+
run: go vet ./...

.github/workflows/sync-release-assets.yml

+4-31
Original file line numberDiff line numberDiff line change
@@ -11,40 +11,13 @@ concurrency:
1111

1212
jobs:
1313
sync-github-and-dist-ipfs-io:
14+
if: github.repository == 'ipfs/go-ipfs' || github.event_name == 'workflow_dispatch'
1415
runs-on: "ubuntu-latest"
1516
steps:
16-
- name: Setup go
17-
uses: actions/setup-go@v2
17+
- uses: ipfs/download-ipfs-distribution-action@v1
18+
- uses: ipfs/start-ipfs-daemon-action@v1
1819
with:
19-
go-version: '1.16'
20-
- uses: actions/cache@v2
21-
with:
22-
path: |
23-
~/.cache/go-build
24-
~/go/pkg/mod
25-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
26-
restore-keys: |
27-
${{ runner.os }}-go-
28-
- name: Build go-ipfs binary
29-
run: go install github.com/ipfs/go-ipfs/cmd/ipfs@latest
30-
- name: Initialize go-ipfs and start daemon
31-
run: |
32-
sudo sysctl -w net.core.rmem_max=2500000
33-
ipfs init --profile flatfs,server
34-
ipfs daemon --enable-gc=false &
35-
while (! ipfs id --api "/ip4/127.0.0.1/tcp/5001"); do sleep 1; done
36-
- name: Wait for go-ipfs to be ready
37-
shell: pwsh
38-
run: |
39-
for ($i = 0; $i -lt 10; $i++) {
40-
$addrs = ipfs id | jq .Addresses;
41-
if ($addrs -eq "null") {
42-
sleep 1
43-
} else {
44-
echo "Successfully started the daemon"
45-
exit 0
46-
}
47-
}
20+
args: --init --init-profile=flatfs,server --enable-gc=false
4821
- uses: actions/setup-node@v2
4922
with:
5023
node-version: 14

.github/workflows/testground-on-push.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
---
22
name: Testground PR Checker
33

4-
on: [push]
4+
on:
5+
workflow_dispatch:
6+
push:
7+
58

69
jobs:
710
testground:
11+
if: github.repository == 'ipfs/go-ipfs' || github.event_name == 'workflow_dispatch'
812
runs-on: ubuntu-latest
913
name: ${{ matrix.composition_file }}
1014
strategy:
@@ -25,7 +29,8 @@ jobs:
2529
steps:
2630
- uses: actions/checkout@v2
2731
- name: testground run
28-
uses: coryschwartz/[email protected]
32+
uses: testground/testground-github-action@v1
33+
timeout-minutes: 5
2934
with:
3035
backend_addr: ${{ matrix.backend_addr }}
3136
backend_proto: ${{ matrix.backend_proto }}

0 commit comments

Comments
 (0)