Skip to content

Commit

Permalink
Update workflows and dependencies (#439)
Browse files Browse the repository at this point in the history
Update workflows and dependencies

- New workflows location
- Update dependencies to get latest fixes
- Simplify http announce in engine
- Update go version in releaser-snapshot
- Update to use boxo blockstore
  • Loading branch information
gammazero committed May 7, 2024
1 parent 7987b82 commit 2545bb4
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ concurrency:

jobs:
go-check:
uses: pl-strflt/uci/.github/workflows/go-check.yml@v1.0
uses: ipdxco/unified-github-workflows/.github/workflows/go-check.yml@v1.0
2 changes: 1 addition & 1 deletion .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ concurrency:

jobs:
go-test:
uses: pl-strflt/uci/.github/workflows/go-test.yml@v1.0
uses: ipdxco/unified-github-workflows/.github/workflows/go-test.yml@v1.0
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.20.x"
go-version: "1.22.x"
- name: Build Snapshot
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ concurrency:

jobs:
release-check:
uses: pl-strflt/uci/.github/workflows/release-check.yml@v1.0
uses: ipdxco/unified-github-workflows/.github/workflows/release-check.yml@v1.0
2 changes: 1 addition & 1 deletion .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ concurrency:

jobs:
releaser:
uses: pl-strflt/uci/.github/workflows/releaser.yml@v1.0
uses: ipdxco/unified-github-workflows/.github/workflows/releaser.yml@v1.0
2 changes: 1 addition & 1 deletion .github/workflows/tagpush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ concurrency:

jobs:
releaser:
uses: pl-strflt/uci/.github/workflows/tagpush.yml@v1.0
uses: ipdxco/unified-github-workflows/.github/workflows/tagpush.yml@v1.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ see [IPNI Spec - Ingestion](https://github.com/ipni/specs/blob/main/IPNI.md#inge

Prerequisite:

- [Go 1.20+](https://golang.org/doc/install)
- [Go 1.21+](https://golang.org/doc/install)

To use the provider as a Go library, execute:

Expand Down
2 changes: 1 addition & 1 deletion cardatatransfer/cardatatransfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (

datatransfer "github.com/filecoin-project/go-data-transfer/v2"
retrievaltypes "github.com/filecoin-project/go-retrieval-types"
bstore "github.com/ipfs/boxo/blockstore"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-datastore"
dssync "github.com/ipfs/go-datastore/sync"
"github.com/ipfs/go-graphsync/storeutil"
bstore "github.com/ipfs/go-ipfs-blockstore"
dagpb "github.com/ipld/go-codec-dagpb"
"github.com/ipld/go-ipld-prime"
"github.com/ipld/go-ipld-prime/datamodel"
Expand Down
2 changes: 1 addition & 1 deletion cardatatransfer/stores/stores.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"io"
"sync"

bstore "github.com/ipfs/go-ipfs-blockstore"
bstore "github.com/ipfs/boxo/blockstore"
)

var ErrNotFound = errors.New("not found")
Expand Down
2 changes: 1 addition & 1 deletion e2e_retrieve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (

datatransfer "github.com/filecoin-project/go-data-transfer/v2"
retrievaltypes "github.com/filecoin-project/go-retrieval-types"
blockstore "github.com/ipfs/boxo/blockstore"
"github.com/ipfs/go-datastore"
dssync "github.com/ipfs/go-datastore/sync"
"github.com/ipfs/go-graphsync/storeutil"
blockstore "github.com/ipfs/go-ipfs-blockstore"
"github.com/ipld/go-car/v2"
"github.com/ipld/go-ipld-prime"
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
Expand Down
10 changes: 1 addition & 9 deletions engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
"github.com/ipni/go-libipni/announce"
"github.com/ipni/go-libipni/announce/httpsender"
"github.com/ipni/go-libipni/announce/message"
"github.com/ipni/go-libipni/announce/p2psender"
"github.com/ipni/go-libipni/dagsync"
"github.com/ipni/go-libipni/dagsync/ipnisync"
Expand Down Expand Up @@ -381,21 +380,14 @@ func (e *Engine) httpAnnounce(ctx context.Context, adCid cid.Cid, announceURLs [
return nil
}

// Create announce message.
msg := message.Message{
Cid: adCid,
}

msg.SetAddrs(e.pubHttpAnnounceAddrs)

// Create the http announce sender.
httpSender, err := httpsender.New(announceURLs, e.h.ID())
if err != nil {
return fmt.Errorf("cannot create http announce sender: %w", err)
}

log.Infow("Announcing advertisements over HTTP", "urls", announceURLs)
return httpSender.Send(ctx, msg)
return announce.Send(ctx, adCid, e.pubHttpAnnounceAddrs, httpSender)
}

// RegisterMultihashLister registers a provider.MultihashLister that is used to
Expand Down
28 changes: 14 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,27 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
github.com/golang/mock v1.6.0
github.com/hashicorp/go-multierror v1.1.1
github.com/ipfs/boxo v0.18.0
github.com/ipfs/boxo v0.19.0
github.com/ipfs/go-cid v0.4.1
github.com/ipfs/go-datastore v0.6.0
github.com/ipfs/go-ds-leveldb v0.5.0
github.com/ipfs/go-graphsync v0.16.0
github.com/ipfs/go-ipfs-blockstore v1.3.0
github.com/ipfs/go-log/v2 v2.5.1
github.com/ipld/go-car/v2 v2.13.1
github.com/ipld/go-codec-dagpb v1.6.0
github.com/ipld/go-ipld-adl-hamt v0.0.0-20220616142416-9004dbd839e0
github.com/ipld/go-ipld-adl-hamt v0.0.0-20240322071803-376decb85801
github.com/ipld/go-ipld-prime v0.21.0
github.com/ipni/go-libipni v0.6.5
github.com/ipni/go-libipni v0.6.6
github.com/libp2p/go-libp2p v0.33.2
github.com/libp2p/go-libp2p-pubsub v0.10.0
github.com/libp2p/go-libp2p-pubsub v0.10.1
github.com/mitchellh/go-homedir v1.1.0
github.com/multiformats/go-multiaddr v0.12.3
github.com/multiformats/go-multicodec v0.9.0
github.com/multiformats/go-multihash v0.2.3
github.com/prometheus/client_golang v1.18.0
github.com/rogpeppe/go-internal v1.10.0
github.com/stretchr/testify v1.8.4
github.com/urfave/cli/v2 v2.25.7
github.com/rogpeppe/go-internal v1.12.0
github.com/stretchr/testify v1.9.0
github.com/urfave/cli/v2 v2.27.2
go.opentelemetry.io/otel v1.21.0
go.opentelemetry.io/otel/exporters/prometheus v0.39.0
go.opentelemetry.io/otel/metric v1.21.0
Expand All @@ -49,6 +48,7 @@ require (
github.com/hashicorp/go-retryablehttp v0.7.4 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/ipfs/go-bitfield v1.1.0 // indirect
github.com/ipfs/go-ipfs-blockstore v1.3.1 // indirect
github.com/ipfs/go-libipfs v0.7.0 // indirect
github.com/libp2p/go-libp2p-record v0.2.0 // indirect
github.com/libp2p/go-libp2p-routing-helpers v0.7.3 // indirect
Expand All @@ -64,7 +64,7 @@ require (
go.uber.org/fx v1.20.1 // indirect
go.uber.org/mock v0.4.0 // indirect
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
)

Expand All @@ -75,7 +75,7 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
Expand Down Expand Up @@ -160,18 +160,18 @@ require (
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/twmb/murmur3 v1.1.6 // indirect
github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
go.opentelemetry.io/otel/sdk v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/tools v0.18.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit 2545bb4

Please sign in to comment.