diff --git a/.github/workflows/go-check.yml b/.github/workflows/go-check.yml new file mode 100644 index 0000000..9ce6260 --- /dev/null +++ b/.github/workflows/go-check.yml @@ -0,0 +1,18 @@ +name: Go Checks + +on: + pull_request: + push: + branches: ["master"] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }} + cancel-in-progress: true + +jobs: + go-check: + uses: pl-strflt/uci/.github/workflows/go-check.yml@v0.0 diff --git a/.github/workflows/go-test-config.json b/.github/workflows/go-test-config.json new file mode 100644 index 0000000..27aa672 --- /dev/null +++ b/.github/workflows/go-test-config.json @@ -0,0 +1,5 @@ +{ + "skip32bit": true, + "skipOSes": ["macos", "windows"], + "skipRace": true +} diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml new file mode 100644 index 0000000..d4ca588 --- /dev/null +++ b/.github/workflows/go-test.yml @@ -0,0 +1,18 @@ +name: Go Test + +on: + pull_request: + push: + branches: ["master"] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }} + cancel-in-progress: true + +jobs: + go-test: + uses: pl-strflt/uci/.github/workflows/go-test.yml@v0.0 diff --git a/.github/workflows/release-check.yml b/.github/workflows/release-check.yml new file mode 100644 index 0000000..bda6160 --- /dev/null +++ b/.github/workflows/release-check.yml @@ -0,0 +1,19 @@ +name: Release Checker + +on: + pull_request_target: + paths: [ 'version.json' ] + types: [ opened, synchronize, reopened, labeled, unlabeled ] + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + release-check: + uses: pl-strflt/uci/.github/workflows/release-check.yml@v0.0 diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml new file mode 100644 index 0000000..dd8081b --- /dev/null +++ b/.github/workflows/releaser.yml @@ -0,0 +1,17 @@ +name: Releaser + +on: + push: + paths: [ 'version.json' ] + workflow_dispatch: + +permissions: + contents: write + +concurrency: + group: ${{ github.workflow }}-${{ github.sha }} + cancel-in-progress: true + +jobs: + releaser: + uses: pl-strflt/uci/.github/workflows/releaser.yml@v0.0 diff --git a/.github/workflows/tagpush.yml b/.github/workflows/tagpush.yml new file mode 100644 index 0000000..59de8cb --- /dev/null +++ b/.github/workflows/tagpush.yml @@ -0,0 +1,18 @@ +name: Tag Push Checker + +on: + push: + tags: + - v* + +permissions: + contents: read + issues: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + releaser: + uses: pl-strflt/uci/.github/workflows/tagpush.yml@v0.0 diff --git a/go.mod b/go.mod index d842342..36c0f32 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,6 @@ require ( github.com/libp2p/go-libp2p v0.24.1 github.com/libp2p/go-libp2p-kad-dht v0.20.0 github.com/libp2p/go-libp2p-kbucket v0.5.0 - github.com/libp2p/go-libp2p-peerstore v0.8.0 github.com/libp2p/go-libp2p-record v0.2.0 github.com/multiformats/go-multiaddr v0.8.0 github.com/multiformats/go-multicodec v0.7.0 diff --git a/go.sum b/go.sum index 8d04820..a037ab2 100644 --- a/go.sum +++ b/go.sum @@ -556,8 +556,6 @@ github.com/libp2p/go-libp2p-kad-dht v0.20.0 h1:1bcMa74JFwExCHZMFEmjtHzxX5DovhJ07 github.com/libp2p/go-libp2p-kad-dht v0.20.0/go.mod h1:qPIXdiZsLczhV4/+4EO1jE8ae0YCW4ZOogc4WVIyTEU= github.com/libp2p/go-libp2p-kbucket v0.5.0 h1:g/7tVm8ACHDxH29BGrpsQlnNeu+6OF1A9bno/4/U1oA= github.com/libp2p/go-libp2p-kbucket v0.5.0/go.mod h1:zGzGCpQd78b5BNTDGHNDLaTt9aDK/A02xeZp9QeFC4U= -github.com/libp2p/go-libp2p-peerstore v0.8.0 h1:bzTG693TA1Ju/zKmUCQzDLSqiJnyRFVwPpuloZ/OZtI= -github.com/libp2p/go-libp2p-peerstore v0.8.0/go.mod h1:9geHWmNA3YDlQBjL/uPEJD6vpDK12aDNlUNHJ6kio/s= github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0= github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk= github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= diff --git a/head/head.go b/head/head.go index 7b3b498..9d44b14 100644 --- a/head/head.go +++ b/head/head.go @@ -11,7 +11,6 @@ import ( "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" "github.com/ipfs/go-ipns" - logging "github.com/ipfs/go-log" "github.com/libp2p/go-libp2p" dht "github.com/libp2p/go-libp2p-kad-dht" "github.com/libp2p/go-libp2p-kad-dht/providers" @@ -44,8 +43,6 @@ const ( provCacheExpiry = time.Hour ) -var log = logging.Logger("hydra/hydra") - // BootstrapStatus describes the status of connecting to a bootstrap node. type BootstrapStatus struct { Done bool diff --git a/head/head_test.go b/head/head_test.go index 8bfcb11..172ab2b 100644 --- a/head/head_test.go +++ b/head/head_test.go @@ -7,7 +7,7 @@ import ( "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/sync" - "github.com/libp2p/go-libp2p-peerstore/pstoreds" + "github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoreds" "github.com/libp2p/hydra-booster/head/opts" hydratesting "github.com/libp2p/hydra-booster/testing" ) diff --git a/httpapi/httpapi.go b/httpapi/httpapi.go index f866448..a919a11 100644 --- a/httpapi/httpapi.go +++ b/httpapi/httpapi.go @@ -15,10 +15,10 @@ import ( cid "github.com/ipfs/go-cid" dsq "github.com/ipfs/go-datastore/query" + "github.com/libp2p/go-libp2p-kad-dht/providers" "github.com/libp2p/go-libp2p/core/crypto" "github.com/libp2p/go-libp2p/core/network" "github.com/libp2p/go-libp2p/core/peer" - "github.com/libp2p/go-libp2p-kad-dht/providers" "github.com/libp2p/hydra-booster/hydra" "github.com/libp2p/hydra-booster/idgen" ) diff --git a/hydra/hydra.go b/hydra/hydra.go index 94672fe..56a9011 100644 --- a/hydra/hydra.go +++ b/hydra/hydra.go @@ -23,10 +23,10 @@ import ( leveldb "github.com/ipfs/go-ds-leveldb" "github.com/ipfs/go-libipfs/routing/http/client" "github.com/libp2p/go-libp2p-kad-dht/providers" - "github.com/libp2p/go-libp2p-peerstore/pstoreds" "github.com/libp2p/go-libp2p/core/host" "github.com/libp2p/go-libp2p/core/network" "github.com/libp2p/go-libp2p/core/protocol" + "github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoreds" hyds "github.com/libp2p/hydra-booster/datastore" "github.com/libp2p/hydra-booster/head" "github.com/libp2p/hydra-booster/head/opts" diff --git a/idgen/idgen.go b/idgen/idgen.go index 2e640a9..b97adf2 100644 --- a/idgen/idgen.go +++ b/idgen/idgen.go @@ -9,9 +9,9 @@ import ( "sync" "sync/atomic" + kbucket "github.com/libp2p/go-libp2p-kbucket" "github.com/libp2p/go-libp2p/core/crypto" "github.com/libp2p/go-libp2p/core/peer" - kbucket "github.com/libp2p/go-libp2p-kbucket" "golang.org/x/crypto/hkdf" ) diff --git a/metrics/aws.go b/metrics/aws.go index 03b51a6..0f8777f 100644 --- a/metrics/aws.go +++ b/metrics/aws.go @@ -67,8 +67,7 @@ var _ smithymiddle.FinalizeMiddleware = (*AWSMetricsMiddleware)(nil) // Install the AWS metrics middleware onto an SDK stack. // Typically you use this on a config object like this: // -// awsCfg.APIOptions = append(awsCfg.APIOptions, metrics.AddAWSSDKMiddleware) -// +// awsCfg.APIOptions = append(awsCfg.APIOptions, metrics.AddAWSSDKMiddleware) func AddAWSSDKMiddleware(stack *smithymiddle.Stack) error { m := &AWSMetricsMiddleware{} return stack.Finalize.Add(m, smithymiddle.Before) diff --git a/metrics/metrics.go b/metrics/metrics.go index 01af466..afdb223 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -13,6 +13,7 @@ import ( "github.com/ncabatoff/process-exporter/collector" "github.com/ncabatoff/process-exporter/config" prom "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/collectors" necoll "github.com/prometheus/node_exporter/collector" "go.opencensus.io/stats/view" "go.opencensus.io/tag" @@ -47,8 +48,8 @@ func buildProcCollector() (*collector.NamedProcessCollector, error) { func ListenAndServe(address string) error { // setup Prometheus registry := prom.NewRegistry() - goCollector := prom.NewGoCollector() - procCollector := prom.NewProcessCollector(prom.ProcessCollectorOpts{}) + goCollector := collectors.NewGoCollector() + procCollector := collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}) nodeCollector, err := necoll.NewNodeCollector(log.NewNopLogger()) if err != nil { diff --git a/providers/unsupported.go b/providers/unsupported.go index add9d3b..f61c47e 100644 --- a/providers/unsupported.go +++ b/providers/unsupported.go @@ -3,8 +3,8 @@ package providers import ( "context" - "github.com/libp2p/go-libp2p/core/peer" "github.com/libp2p/go-libp2p-kad-dht/providers" + "github.com/libp2p/go-libp2p/core/peer" ) func AddProviderNotSupported(backend providers.ProviderStore) providers.ProviderStore { diff --git a/version.json b/version.json new file mode 100644 index 0000000..923b3ab --- /dev/null +++ b/version.json @@ -0,0 +1,3 @@ +{ + "version": "v0.7.4" +}