Skip to content

Commit

Permalink
Merge branch 'master' into merge-release-v0.26.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias authored Jan 22, 2024
2 parents 096f510 + d1db95c commit c7388b6
Show file tree
Hide file tree
Showing 35 changed files with 287 additions and 352 deletions.
8 changes: 0 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
version: 2
updates:
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
time: "11:00"
open-pull-requests-limit: 10
labels:
- "topic/dependencies"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ jobs:
run:
shell: bash
steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v4
- run: make build
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: kubo
path: cmd/ipfs/ipfs
Expand All @@ -53,10 +53,10 @@ jobs:
run:
shell: bash
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: kubo
path: cmd/ipfs
Expand All @@ -73,13 +73,12 @@ jobs:
- uses: actions/checkout@v4
with:
repository: ipfs/helia
fetch-depth: 1
fetch-depth: 0
path: interop
ref: 'ea5533c794df844c9fb9812e85e2f5e6af09efeb' # temporary while this commit is being released
ref: 'main'
- name: Checkout latest tag
run: |
exit 0 # temporary while ea5533c794df844c9fb9812e85e2f5e6af09efeb is released
export TAG="$(git describe --tags --abbrev=0)"
export TAG="$(git tag | grep "^interop-" | sort --version-sort --reverse | head -n1)"
echo "Running tests against: $TAG"
git checkout "$TAG"
working-directory: interop
Expand Down Expand Up @@ -109,10 +108,10 @@ jobs:
run:
shell: bash
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.14.0
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: kubo
path: cmd/ipfs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run:
shell: bash
steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21.x
- uses: actions/checkout@v4
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ jobs:
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

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

- name: Cache Docker layers
uses: actions/cache@v3
Expand All @@ -63,7 +63,7 @@ jobs:
shell: bash

- name: Log in to Docker Hub
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -72,7 +72,7 @@ jobs:
# builds, only one platform is being loaded into the cache. This would
# prevent us from testing the other platforms.
- name: Build Docker image (linux/amd64)
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
context: .
Expand All @@ -84,7 +84,7 @@ jobs:
cache-to: type=local,dest=/tmp/.buildx-cache-new

- name: Build Docker image (linux/arm/v7)
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
platforms: linux/arm/v7
context: .
Expand All @@ -96,7 +96,7 @@ jobs:
cache-to: type=local,dest=/tmp/.buildx-cache-new

- name: Build Docker image (linux/arm64/v8)
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
platforms: linux/arm64/v8
context: .
Expand All @@ -116,7 +116,7 @@ jobs:
# This will only push the previously built images.
- if: github.event_name != 'workflow_dispatch' || github.event.inputs.push == 'true'
name: Publish to Docker Hub
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
context: .
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/gateway-conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

# 2. Build the kubo-gateway
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- uses: protocol/cache-go-action@v1
Expand Down Expand Up @@ -111,13 +111,13 @@ jobs:
run: cat output.md >> $GITHUB_STEP_SUMMARY
- name: Upload HTML report
if: failure() || success()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: gateway-conformance.html
path: output.html
- name: Upload JSON report
if: failure() || success()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: gateway-conformance.json
path: output.json
Expand All @@ -135,7 +135,7 @@ jobs:

# 2. Build the kubo-gateway
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.20.x
- uses: protocol/cache-go-action@v1
Expand Down Expand Up @@ -217,13 +217,13 @@ jobs:
run: cat output.md >> $GITHUB_STEP_SUMMARY
- name: Upload HTML report
if: failure() || success()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: gateway-conformance-libp2p.html
path: output.html
- name: Upload JSON report
if: failure() || success()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: gateway-conformance-libp2p.json
path: output.json
2 changes: 1 addition & 1 deletion .github/workflows/gobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run:
shell: bash
steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21.x
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golang-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.x"
- name: Check that go.mod is tidy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run:
shell: bash
steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21.x
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/gotest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
shell: bash
steps:
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Check out Kubo
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
output: test/unit/gotest.junit.xml
if: failure() || success()
- name: Archive the JUnit XML report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: unit
path: test/unit/gotest.junit.xml
Expand All @@ -92,7 +92,7 @@ jobs:
output: test/unit/gotest.html
if: failure() || success()
- name: Archive the HTML report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: html
path: test/unit/gotest.html
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sharness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
shell: bash
steps:
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Checkout Kubo
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
destination: sharness.html
- name: Upload one-page HTML report
if: github.repository != 'ipfs/kubo' && (failure() || success())
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: sharness.html
path: kubo/test/sharness/test-results/sharness.html
Expand All @@ -108,7 +108,7 @@ jobs:
destination: sharness-html/
- name: Upload full HTML report
if: github.repository != 'ipfs/kubo' && (failure() || success())
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: sharness-html
path: kubo/test/sharness/test-results/sharness-html
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sync-release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ jobs:
dist-ipfs-tech:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
runs-on: "ubuntu-latest"
timeout-minutes: 5
timeout-minutes: 15
steps:
- uses: ipfs/download-ipfs-distribution-action@v1
- uses: ipfs/start-ipfs-daemon-action@v1
with:
args: --init --init-profile=flatfs,server --enable-gc=false
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 14
- name: Sync the latest 5 github releases
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const fs = require('fs').promises
Expand Down
15 changes: 0 additions & 15 deletions cmd/ipfs/kubo/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ const (
routingOptionAutoClientKwd = "autoclient"
unencryptTransportKwd = "disable-transport-encryption"
unrestrictedAPIAccessKwd = "unrestricted-api"
writableKwd = "writable"
enablePubSubKwd = "enable-pubsub-experiment"
enableIPNSPubSubKwd = "enable-namesys-pubsub"
enableMultiplexKwd = "enable-mplex-experiment"
Expand Down Expand Up @@ -164,7 +163,6 @@ Headers.
cmds.StringOption(initProfileOptionKwd, "Configuration profiles to apply for --init. See ipfs init --help for more"),
cmds.StringOption(routingOptionKwd, "Overrides the routing option").WithDefault(routingOptionDefaultKwd),
cmds.BoolOption(mountKwd, "Mounts IPFS to the filesystem using FUSE (experimental)"),
cmds.BoolOption(writableKwd, "Enable legacy Gateway.Writable (REMOVED)"),
cmds.StringOption(ipfsMountKwd, "Path to the mountpoint for IPFS (if using --mount). Defaults to config setting."),
cmds.StringOption(ipnsMountKwd, "Path to the mountpoint for IPNS (if using --mount). Defaults to config setting."),
cmds.BoolOption(unrestrictedAPIAccessKwd, "Allow API access to unlisted hashes"),
Expand Down Expand Up @@ -803,15 +801,6 @@ func serveHTTPGateway(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, e
return nil, fmt.Errorf("serveHTTPGateway: GetConfig() failed: %s", err)
}

writable, writableOptionFound := req.Options[writableKwd].(bool)
if !writableOptionFound {
writable = cfg.Gateway.Writable.WithDefault(false)
}

if writable {
log.Fatalf("Support for Gateway.Writable and --writable has been REMOVED. Please remove it from your config file or CLI. Modern replacement tracked in https://github.com/ipfs/specs/issues/375")
}

listeners, err := sockets.TakeListeners("io.ipfs.gateway")
if err != nil {
return nil, fmt.Errorf("serveHTTPGateway: socket activation failed: %s", err)
Expand Down Expand Up @@ -876,10 +865,6 @@ func serveHTTPGateway(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, e
opts = append(opts, corehttp.RedirectOption("", cfg.Gateway.RootRedirect))
}

if len(cfg.Gateway.PathPrefixes) > 0 {
log.Fatal("Support for custom Gateway.PathPrefixes was removed: https://github.com/ipfs/go-ipfs/issues/7702")
}

node, err := cctx.ConstructNode()
if err != nil {
return nil, fmt.Errorf("serveHTTPGateway: ConstructNode() failed: %s", err)
Expand Down
4 changes: 0 additions & 4 deletions config/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,4 @@ type Discovery struct {

type MDNS struct {
Enabled bool

// DEPRECATED: the time between discovery rounds is no longer configurable
// See: https://github.com/ipfs/go-ipfs/pull/9048#discussion_r906814717
Interval *OptionalInteger `json:",omitempty"`
}
9 changes: 0 additions & 9 deletions config/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@ type Gateway struct {
// should be redirected.
RootRedirect string

// REMOVED: modern replacement tracked in https://github.com/ipfs/specs/issues/375
Writable Flag `json:",omitempty"`

// PathPrefixes was removed: https://github.com/ipfs/go-ipfs/issues/7702
PathPrefixes []string

// FIXME: Not yet implemented: https://github.com/ipfs/kubo/issues/8059
APICommands []string

// NoFetch configures the gateway to _not_ fetch blocks in response to
// requests.
NoFetch bool
Expand Down
2 changes: 0 additions & 2 deletions config/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ func InitWithIdentity(identity Identity) (*Config, error) {
Gateway: Gateway{
RootRedirect: "",
NoFetch: false,
PathPrefixes: []string{},
HTTPHeaders: map[string][]string{},
APICommands: []string{},
},
Reprovider: Reprovider{
Interval: nil,
Expand Down
Loading

0 comments on commit c7388b6

Please sign in to comment.