Skip to content

Commit 226a4d3

Browse files
authored
Merge pull request #1 from filecoin-project/feat/update-v0.13.x-deps
update v0.13.x deps
2 parents 4108327 + d13108b commit 226a4d3

File tree

101 files changed

+1577
-1114
lines changed

Some content is hidden

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

101 files changed

+1577
-1114
lines changed

.github/workflows/automerge.yml

Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,11 @@
11
# File managed by web3-bot. DO NOT EDIT.
22
# See https://github.com/protocol/.github/ for details.
33

4-
# Automatically merge pull requests opened by web3-bot, as soon as (and only if) all tests pass.
5-
# This reduces the friction associated with updating with our workflows.
6-
7-
on: [ pull_request ]
84
name: Automerge
5+
on: [ pull_request ]
96

107
jobs:
11-
automerge-check:
12-
if: github.event.pull_request.user.login == 'web3-bot'
13-
runs-on: ubuntu-latest
14-
outputs:
15-
status: ${{ steps.should-automerge.outputs.status }}
16-
steps:
17-
- uses: actions/checkout@v2
18-
with:
19-
fetch-depth: 0
20-
- name: Check if we should automerge
21-
id: should-automerge
22-
run: |
23-
for commit in $(git rev-list --first-parent origin/${{ github.event.pull_request.base.ref }}..${{ github.event.pull_request.head.sha }}); do
24-
committer=$(git show --format=$'%ce' -s $commit)
25-
echo "Committer: $committer"
26-
if [[ "$committer" != "web3-bot@users.noreply.github.com" ]]; then
27-
echo "Commit $commit wasn't committed by web3-bot, but by $committer."
28-
echo "::set-output name=status::false"
29-
exit
30-
fi
31-
done
32-
echo "::set-output name=status::true"
338
automerge:
34-
needs: automerge-check
35-
runs-on: ubuntu-latest
36-
# The check for the user is redundant here, as this job depends on the automerge-check job,
37-
# but it prevents this job from spinning up, just to be skipped shortly after.
38-
if: github.event.pull_request.user.login == 'web3-bot' && needs.automerge-check.outputs.status == 'true'
39-
steps:
40-
- name: Wait on tests
41-
uses: lewagon/wait-on-check-action@bafe56a6863672c681c3cf671f5e10b20abf2eaa # v0.2
42-
with:
43-
ref: ${{ github.event.pull_request.head.sha }}
44-
repo-token: ${{ secrets.GITHUB_TOKEN }}
45-
wait-interval: 10
46-
running-workflow-name: 'automerge' # the name of this job
47-
- name: Merge PR
48-
uses: pascalgn/automerge-action@741c311a47881be9625932b0a0de1b0937aab1ae # v0.13.1
49-
env:
50-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
51-
MERGE_LABELS: ""
52-
MERGE_METHOD: "squash"
53-
MERGE_DELETE_BRANCH: true
9+
uses: protocol/.github/.github/workflows/automerge.yml@master
10+
with:
11+
job: 'automerge'

.github/workflows/go-check.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111
env:
1212
RUNGOGENERATE: false
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515
with:
1616
submodules: recursive
17-
- uses: actions/setup-go@v2
17+
- uses: actions/setup-go@v3
1818
with:
19-
go-version: "1.17.x"
19+
go-version: "1.19.x"
2020
- name: Run repo-specific setup
2121
uses: ./.github/actions/go-check-setup
2222
if: hashFiles('./.github/actions/go-check-setup') != ''
@@ -27,7 +27,7 @@ jobs:
2727
echo "RUNGOGENERATE=true" >> $GITHUB_ENV
2828
fi
2929
- name: Install staticcheck
30-
run: go install honnef.co/go/tools/cmd/staticcheck@c8caa92bad8c27ae734c6725b8a04932d54a147b # 2021.1.2 (v0.2.2)
30+
run: go install honnef.co/go/tools/cmd/staticcheck@376210a89477dedbe6fdc4484b233998650d7b3c # 2022.1.3 (v0.3.3)
3131
- name: Check that go.mod is tidy
3232
uses: protocol/multiple-go-modules@v1.2
3333
with:
@@ -71,4 +71,3 @@ jobs:
7171
git status --short
7272
exit 1
7373
fi
74-

.github/workflows/go-test.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
os: [ "ubuntu", "windows", "macos" ]
13-
go: [ "1.16.x", "1.17.x" ]
13+
go: [ "1.18.x", "1.19.x" ]
1414
env:
1515
COVERAGES: ""
16-
runs-on: ${{ matrix.os }}-latest
17-
name: ${{ matrix.os}} (go ${{ matrix.go }})
16+
runs-on: ${{ format('{0}-latest', matrix.os) }}
17+
name: ${{ matrix.os }} (go ${{ matrix.go }})
1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v3
2020
with:
2121
submodules: recursive
22-
- uses: actions/setup-go@v2
22+
- uses: actions/setup-go@v3
2323
with:
2424
go-version: ${{ matrix.go }}
2525
- name: Go information
@@ -43,14 +43,16 @@ jobs:
4343
# Use -coverpkg=./..., so that we include cross-package coverage.
4444
# If package ./A imports ./B, and ./A's tests also cover ./B,
4545
# this means ./B's coverage will be significantly higher than 0%.
46-
run: go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./...
46+
run: go test -v -shuffle=on -coverprofile=module-coverage.txt -coverpkg=./... ./...
4747
- name: Run tests (32 bit)
4848
if: ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX.
4949
uses: protocol/multiple-go-modules@v1.2
5050
env:
5151
GOARCH: 386
5252
with:
53-
run: go test -v ./...
53+
run: |
54+
export "PATH=${{ env.PATH_386 }}:$PATH"
55+
go test -v -shuffle=on ./...
5456
- name: Run tests with race detector
5557
if: ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow
5658
uses: protocol/multiple-go-modules@v1.2
@@ -60,7 +62,7 @@ jobs:
6062
shell: bash
6163
run: echo "COVERAGES=$(find . -type f -name 'module-coverage.txt' | tr -s '\n' ',' | sed 's/,$//')" >> $GITHUB_ENV
6264
- name: Upload coverage to Codecov
63-
uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
65+
uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
6466
with:
6567
files: '${{ env.COVERAGES }}'
6668
env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }}

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ If your existing library (i.e. `go-ipfs` or `go-filecoin`) uses these other olde
5151

5252
```golang
5353
import (
54-
graphsync "github.com/ipfs/go-graphsync/impl"
55-
gsnet "github.com/ipfs/go-graphsync/network"
54+
graphsync "github.com/filecoin-project/boost-graphsync/impl"
55+
gsnet "github.com/filecoin-project/boost-graphsync/network"
5656
ipld "github.com/ipld/go-ipld-prime"
5757
)
5858

@@ -78,9 +78,9 @@ integrating with BlockStore's from IPFS.
7878

7979
```golang
8080
import (
81-
graphsync "github.com/ipfs/go-graphsync/impl"
82-
gsnet "github.com/ipfs/go-graphsync/network"
83-
storeutil "github.com/ipfs/go-graphsync/storeutil"
81+
graphsync "github.com/filecoin-project/boost-graphsync/impl"
82+
gsnet "github.com/filecoin-project/boost-graphsync/network"
83+
storeutil "github.com/filecoin-project/boost-graphsync/storeutil"
8484
ipld "github.com/ipld/go-ipld-prime"
8585
blockstore "github.com/ipfs/go-ipfs-blockstore"
8686
)

allocator/allocator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66

77
pq "github.com/ipfs/go-ipfs-pq"
88
logging "github.com/ipfs/go-log/v2"
9-
peer "github.com/libp2p/go-libp2p-core/peer"
9+
peer "github.com/libp2p/go-libp2p/core/peer"
1010

11-
"github.com/ipfs/go-graphsync"
11+
graphsync "github.com/filecoin-project/boost-graphsync"
1212
)
1313

1414
var log = logging.Logger("graphsync_allocator")

allocator/allocator_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ package allocator_test
33
import (
44
"testing"
55

6-
"github.com/libp2p/go-libp2p-core/peer"
6+
"github.com/libp2p/go-libp2p/core/peer"
77
"github.com/stretchr/testify/assert"
88
"github.com/stretchr/testify/require"
99

10-
"github.com/ipfs/go-graphsync/allocator"
11-
"github.com/ipfs/go-graphsync/testutil"
10+
"github.com/filecoin-project/boost-graphsync/allocator"
11+
"github.com/filecoin-project/boost-graphsync/testutil"
1212
)
1313

1414
func TestAllocator(t *testing.T) {

benchmarks/benchmark_test.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"bytes"
55
"context"
66
"fmt"
7-
"io/ioutil"
87
"math/rand"
98
"os"
109
"runtime"
@@ -33,9 +32,9 @@ import (
3332
"github.com/stretchr/testify/require"
3433
"golang.org/x/sync/errgroup"
3534

36-
"github.com/ipfs/go-graphsync/benchmarks/testinstance"
37-
tn "github.com/ipfs/go-graphsync/benchmarks/testnet"
38-
graphsync "github.com/ipfs/go-graphsync/impl"
35+
"github.com/filecoin-project/boost-graphsync/benchmarks/testinstance"
36+
tn "github.com/filecoin-project/boost-graphsync/benchmarks/testnet"
37+
graphsync "github.com/filecoin-project/boost-graphsync/impl"
3938
)
4039

4140
type runStats struct {
@@ -337,15 +336,15 @@ var tempDirReplacer struct {
337336
// and modified as needed due to https://github.com/golang/go/issues/41062
338337
func newTempDirMaker(b *testing.B) (*tempDirMaker, error) {
339338
c := &tempDirMaker{}
340-
// ioutil.TempDir doesn't like path separators in its pattern,
339+
// os.MkdirTemp doesn't like path separators in its pattern,
341340
// so mangle the name to accommodate subtests.
342341
tempDirReplacer.Do(func() {
343342
tempDirReplacer.r = strings.NewReplacer("/", "_", "\\", "_", ":", "_")
344343
})
345344
pattern := tempDirReplacer.r.Replace(b.Name())
346345

347346
var err error
348-
c.tdm, err = ioutil.TempDir("", pattern)
347+
c.tdm, err = os.MkdirTemp("", pattern)
349348
if err != nil {
350349
return nil, err
351350
}

benchmarks/testinstance/testinstance.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import (
1111
blockstore "github.com/ipfs/go-ipfs-blockstore"
1212
delay "github.com/ipfs/go-ipfs-delay"
1313
"github.com/ipld/go-ipld-prime"
14-
peer "github.com/libp2p/go-libp2p-core/peer"
15-
p2ptestutil "github.com/libp2p/go-libp2p-netutil"
1614
tnet "github.com/libp2p/go-libp2p-testing/net"
17-
18-
graphsync "github.com/ipfs/go-graphsync"
19-
tn "github.com/ipfs/go-graphsync/benchmarks/testnet"
20-
gsimpl "github.com/ipfs/go-graphsync/impl"
21-
gsnet "github.com/ipfs/go-graphsync/network"
22-
"github.com/ipfs/go-graphsync/storeutil"
15+
p2ptestutil "github.com/libp2p/go-libp2p-testing/netutil"
16+
peer "github.com/libp2p/go-libp2p/core/peer"
17+
18+
graphsync "github.com/filecoin-project/boost-graphsync"
19+
tn "github.com/filecoin-project/boost-graphsync/benchmarks/testnet"
20+
gsimpl "github.com/filecoin-project/boost-graphsync/impl"
21+
gsnet "github.com/filecoin-project/boost-graphsync/network"
22+
"github.com/filecoin-project/boost-graphsync/storeutil"
2323
)
2424

2525
// TempDirGenerator is any interface that can generate temporary directories

benchmarks/testnet/interface.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package testnet
22

33
import (
4-
"github.com/libp2p/go-libp2p-core/peer"
54
tnet "github.com/libp2p/go-libp2p-testing/net"
5+
"github.com/libp2p/go-libp2p/core/peer"
66

7-
gsnet "github.com/ipfs/go-graphsync/network"
7+
gsnet "github.com/filecoin-project/boost-graphsync/network"
88
)
99

1010
// Network is an interface for generating graphsync network interfaces

benchmarks/testnet/internet_latency_delay_generator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
"github.com/stretchr/testify/require"
1010

11-
"github.com/ipfs/go-graphsync/benchmarks/testnet"
11+
"github.com/filecoin-project/boost-graphsync/benchmarks/testnet"
1212
)
1313

1414
const testSeed = 99

0 commit comments

Comments
 (0)