Skip to content

Commit

Permalink
Merge branch 'master' into docs/release-checklist-0.33
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel authored Jan 31, 2025
2 parents 9f0d38c + b355559 commit 9482e91
Show file tree
Hide file tree
Showing 54 changed files with 498 additions and 131 deletions.
21 changes: 21 additions & 0 deletions .codespell-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Adin
nd
Nd
afile
thirdparty
receivedFrom
origN
hel
TotalIn
childs
userA
AssignT
OT
AssignT
fo
recusive
raison
Boddy
ressource
achin
re-using
2 changes: 1 addition & 1 deletion .github/workflows/gotest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
make -j "$PARALLEL" test/unit/gotest.junit.xml &&
[[ ! $(jq -s -c 'map(select(.Action == "fail")) | .[]' test/unit/gotest.json) ]]
- name: Upload coverage to Codecov
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
if: failure() || success()
with:
name: unittests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sharness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
# increasing parallelism beyond 10 doesn't speed up the tests much
PARALLEL: ${{ github.repository == 'ipfs/kubo' && 10 || 3 }}
- name: Upload coverage report
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
if: failure() || success()
with:
name: sharness
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Spell Check

on: [push, pull_request]

jobs:
spellcheck:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Codespell
run: pip install codespell==2.4.0

- name: Run Codespell
uses: codespell-project/actions-codespell@v2
with:
only_warn: 1
ignore_words_file: .codespell-ignore
skip: "*.mod,*.sum,*.pdf,./docs/AUTHORS,./test/sharness/t0275-cid-security-data,./test/sharness/t0280-plugin-dag-jose-data,./bin"
2 changes: 1 addition & 1 deletion .github/workflows/sync-release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: "ubuntu-latest"
timeout-minutes: 15
steps:
- uses: ipfs/download-ipfs-distribution-action@ffe03c1ad9e44c51b90e9bc342a3646a925b2923 # TODO: swith to v1 once https://github.com/ipfs/download-ipfs-distribution-action/pull/36/ is released
- uses: ipfs/download-ipfs-distribution-action@v1
- uses: ipfs/start-ipfs-daemon-action@v1
with:
args: --init --init-profile=flatfs,server --enable-gc=false
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Kubo Changelogs

- [v0.34](docs/changelogs/v0.34.md)
- [v0.33](docs/changelogs/v0.33.md)
- [v0.32](docs/changelogs/v0.32.md)
- [v0.31](docs/changelogs/v0.31.md)
Expand Down
2 changes: 1 addition & 1 deletion config/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package config

const DefaultSwarmCheckPercentThreshold = 5

// Version allows controling things like custom user agent and update checks.
// Version allows controlling things like custom user agent and update checks.
type Version struct {
// Optional suffix to the AgentVersion presented by `ipfs id` and exposed
// via libp2p identify protocol.
Expand Down
33 changes: 3 additions & 30 deletions core/commands/bitswap.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ var BitswapCmd = &cmds.Command{
},

Subcommands: map[string]*cmds.Command{
"stat": bitswapStatCmd,
"wantlist": showWantlistCmd,
"ledger": ledgerCmd,
"reprovide": reprovideCmd,
"stat": bitswapStatCmd,
"wantlist": showWantlistCmd,
"ledger": ledgerCmd,
},
}

Expand Down Expand Up @@ -200,29 +199,3 @@ prints the ledger associated with a given peer.
}),
},
}

var reprovideCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Trigger reprovider.",
ShortDescription: `
Trigger reprovider to announce our data to network.
`,
},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
nd, err := cmdenv.GetNode(env)
if err != nil {
return err
}

if !nd.IsOnline {
return ErrNotOnline
}

err = nd.Provider.Reprovide(req.Context)
if err != nil {
return err
}

return nil
},
}
2 changes: 1 addition & 1 deletion core/commands/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func TestCommands(t *testing.T) {
"/add",
"/bitswap",
"/bitswap/ledger",
"/bitswap/reprovide",
"/bitswap/stat",
"/bitswap/wantlist",
"/block",
Expand Down Expand Up @@ -72,6 +71,7 @@ func TestCommands(t *testing.T) {
"/routing/findpeer",
"/routing/findprovs",
"/routing/provide",
"/routing/reprovide",
"/diag",
"/diag/cmds",
"/diag/cmds/clear",
Expand Down
8 changes: 4 additions & 4 deletions core/commands/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ file inside your IPFS repository (IPFS_PATH).
Examples:
Get the value of the 'Datastore.Path' key:
Get the value of the 'Routing.Type' key:
$ ipfs config Datastore.Path
$ ipfs config Routing.Type
Set the value of the 'Datastore.Path' key:
Set the value of the 'Routing.Type' key:
$ ipfs config Datastore.Path ~/.ipfs/datastore
$ ipfs config Routing.Type auto
Set multiple values in the 'Addresses.AppendAnnounce' array:
Expand Down
28 changes: 28 additions & 0 deletions core/commands/routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ var RoutingCmd = &cmds.Command{
"get": getValueRoutingCmd,
"put": putValueRoutingCmd,
"provide": provideRefRoutingCmd,
"reprovide": reprovideRoutingCmd,
},
}

Expand Down Expand Up @@ -235,6 +236,33 @@ var provideRefRoutingCmd = &cmds.Command{
Type: routing.QueryEvent{},
}

var reprovideRoutingCmd = &cmds.Command{
Status: cmds.Experimental,
Helptext: cmds.HelpText{
Tagline: "Trigger reprovider.",
ShortDescription: `
Trigger reprovider to announce our data to network.
`,
},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
nd, err := cmdenv.GetNode(env)
if err != nil {
return err
}

if !nd.IsOnline {
return ErrNotOnline
}

err = nd.Provider.Reprovide(req.Context)
if err != nil {
return err
}

return nil
},
}

func provideKeys(ctx context.Context, r routing.Routing, cids []cid.Cid) error {
for _, c := range cids {
err := r.Provide(ctx, c, true)
Expand Down
24 changes: 20 additions & 4 deletions core/commands/stat_provide.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ import (
"github.com/ipfs/boxo/provider"
cmds "github.com/ipfs/go-ipfs-cmds"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/libp2p/go-libp2p-kad-dht/fullrt"
"golang.org/x/exp/constraints"
)

type reprovideStats struct {
provider.ReproviderStats
fullRT bool
}

var statProvideCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Returns statistics about the node's (re)provider system.",
Expand All @@ -38,32 +44,42 @@ This interface is not stable and may change from release to release.
if err != nil {
return err
}
_, fullRT := nd.DHTClient.(*fullrt.FullRT)

if err := res.Emit(stats); err != nil {
if err := res.Emit(reprovideStats{stats, fullRT}); err != nil {
return err
}

return nil
},
Encoders: cmds.EncoderMap{
cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, s *provider.ReproviderStats) error {
cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, s reprovideStats) error {
wtr := tabwriter.NewWriter(w, 1, 2, 1, ' ', 0)
defer wtr.Flush()

fmt.Fprintf(wtr, "TotalProvides:\t%s\n", humanNumber(s.TotalProvides))
fmt.Fprintf(wtr, "AvgProvideDuration:\t%s\n", humanDuration(s.AvgProvideDuration))
fmt.Fprintf(wtr, "LastReprovideDuration:\t%s\n", humanDuration(s.LastReprovideDuration))
fmt.Fprintf(wtr, "LastReprovideBatchSize:\t%s\n", humanNumber(s.LastReprovideBatchSize))
if !s.LastRun.IsZero() {
fmt.Fprintf(wtr, "LastRun:\t%s\n", humanTime(s.LastRun))
if s.fullRT {
fmt.Fprintf(wtr, "NextRun:\t%s\n", humanTime(s.LastRun.Add(s.ReprovideInterval)))
}
}
return nil
}),
},
Type: provider.ReproviderStats{},
Type: reprovideStats{},
}

func humanDuration(val time.Duration) string {
return val.Truncate(time.Microsecond).String()
}

func humanTime(val time.Time) string {
return val.Format("2006-01-02 15:04:05")
}

func humanNumber[T constraints.Float | constraints.Integer](n T) string {
nf := float64(n)
str := humanSI(nf, 0)
Expand Down
2 changes: 1 addition & 1 deletion core/commands/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func DetectNewKuboVersion(nd *core.IpfsNode, minPercent int64) (VersionCheckOutp
return
}

// Ignore prerelases and development releases (-dev, -rcX)
// Ignore prereleases and development releases (-dev, -rcX)
if peerVersion.Metadata() != "" || peerVersion.Prerelease() != "" {
return
}
Expand Down
4 changes: 2 additions & 2 deletions docs/changelogs/v0.10.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ See `ipfs swarm peering --help` for more details.
- More changelog grooming.
- Changelog grooming.
- node/tests: put most of the schema test cases here
- Add more explicit discussion of indicies to ListIterator.
- Add more explicit discussion of indices to ListIterator.
- node/bindnode: start of a reflect-based Node implementation
- add DeepEqual and start using it in tests
- Add enumerate methods to the multicodec registries. ([ipld/go-ipld-prime#176](https://github.com/ipld/go-ipld-prime/pull/176))
Expand Down Expand Up @@ -390,7 +390,7 @@ See `ipfs swarm peering --help` for more details.
- remove note about go modules in README ([libp2p/go-libp2p-noise#100](https://github.com/libp2p/go-libp2p-noise/pull/100))
- fix: remove deprecated call to pk.Bytes ([libp2p/go-libp2p-noise#99](https://github.com/libp2p/go-libp2p-noise/pull/99))
- github.com/libp2p/go-libp2p-peerstore (v0.2.7 -> v0.2.8):
- Fix perfomance issue in updating addr book ([libp2p/go-libp2p-peerstore#141](https://github.com/libp2p/go-libp2p-peerstore/pull/141))
- Fix performance issue in updating addr book ([libp2p/go-libp2p-peerstore#141](https://github.com/libp2p/go-libp2p-peerstore/pull/141))
- Fix test flakes ([libp2p/go-libp2p-peerstore#164](https://github.com/libp2p/go-libp2p-peerstore/pull/164))
- Only remove records during GC ([libp2p/go-libp2p-peerstore#135](https://github.com/libp2p/go-libp2p-peerstore/pull/135))
- sync: update CI config files ([libp2p/go-libp2p-peerstore#160](https://github.com/libp2p/go-libp2p-peerstore/pull/160))
Expand Down
2 changes: 1 addition & 1 deletion docs/changelogs/v0.11.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ This work was [contributed](https://github.com/ipfs/go-ipfs/pull/8569) by [Ceram
- fix(graphsync): make sure linkcontext is passed (#207) ([ipfs/go-graphsync#207](https://github.com/ipfs/go-graphsync/pull/207))
- Merge final v0.6.x commit history, and 0.8.0 changelog (#205) ([ipfs/go-graphsync#205](https://github.com/ipfs/go-graphsync/pull/205))
- Fix broken link to IPLD selector documentation (#189) ([ipfs/go-graphsync#189](https://github.com/ipfs/go-graphsync/pull/189))
- fix: check errors before defering a close (#200) ([ipfs/go-graphsync#200](https://github.com/ipfs/go-graphsync/pull/200))
- fix: check errors before deferring a close (#200) ([ipfs/go-graphsync#200](https://github.com/ipfs/go-graphsync/pull/200))
- chore: fix checks (#197) ([ipfs/go-graphsync#197](https://github.com/ipfs/go-graphsync/pull/197))
- Merge the v0.6.x commit history (#190) ([ipfs/go-graphsync#190](https://github.com/ipfs/go-graphsync/pull/190))
- Ready for universal CI (#187) ([ipfs/go-graphsync#187](https://github.com/ipfs/go-graphsync/pull/187))
Expand Down
2 changes: 1 addition & 1 deletion docs/changelogs/v0.12.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ As usual, this release includes important fixes, some of which may be critical f

- `ipfs refs local` will now list all blocks as if they were [raw]() CIDv1 instead of with whatever CID version and IPLD codecs they were stored with. All other functionality should remain the same.

Note: This change also effects [ipfs-update](https://github.com/ipfs/ipfs-update) so if you use that tool to mange your go-ipfs installation then grab ipfs-update v1.8.0 from [dist](https://dist.ipfs.tech/#ipfs-update).
Note: This change also effects [ipfs-update](https://github.com/ipfs/ipfs-update) so if you use that tool to manage your go-ipfs installation then grab ipfs-update v1.8.0 from [dist](https://dist.ipfs.tech/#ipfs-update).

Keep reading to learn more details.

Expand Down
2 changes: 1 addition & 1 deletion docs/changelogs/v0.14.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ $ ipfs cid format -v 1 -b base256emoji bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylq
- swarm: fix flaky TestDialExistingConnection test (#1509) ([libp2p/go-libp2p#1509](https://github.com/libp2p/go-libp2p/pull/1509))
- tcp: limit the number of connections in tcp suite test on non-linux hosts (#1507) ([libp2p/go-libp2p#1507](https://github.com/libp2p/go-libp2p/pull/1507))
- increase overly short require.Eventually intervals (#1501) ([libp2p/go-libp2p#1501](https://github.com/libp2p/go-libp2p/pull/1501))
- tls: fix flaky handshake cancelation test (#1503) ([libp2p/go-libp2p#1503](https://github.com/libp2p/go-libp2p/pull/1503))
- tls: fix flaky handshake cancellation test (#1503) ([libp2p/go-libp2p#1503](https://github.com/libp2p/go-libp2p/pull/1503))
- merge the transport test suite from go-libp2p-testing here ([libp2p/go-libp2p#1496](https://github.com/libp2p/go-libp2p/pull/1496))
- fix racy connection comparison in TestDialWorkerLoopBasic (#1499) ([libp2p/go-libp2p#1499](https://github.com/libp2p/go-libp2p/pull/1499))
- swarm: fix race condition in TestFailFirst (#1490) ([libp2p/go-libp2p#1490](https://github.com/libp2p/go-libp2p/pull/1490))
Expand Down
6 changes: 3 additions & 3 deletions docs/changelogs/v0.16.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ The previous alternative is websocket secure, which require installing a reverse

#### How to enable WebTransport

Thoses steps are temporary and wont be needed once we make it enabled by default.
Those steps are temporary and won't be needed once we make it enabled by default.

1. Enable the WebTransport transport:
`ipfs config Swarm.Transports.Network.WebTransport --json true`
Expand Down Expand Up @@ -191,7 +191,7 @@ For more information, see `ipfs add --help` and `ipfs files --help`.
- docs: add WebTransport docs ([ipfs/kubo#9308](https://github.com/ipfs/kubo/pull/9308))
- chore: bump version to 0.16.0-rc1
- fix: ensure hasher is registered when using a hashing function
- feat: add webtransport as an optin transport ([ipfs/kubo#9293](https://github.com/ipfs/kubo/pull/9293))
- feat: add webtransport as an option transport ([ipfs/kubo#9293](https://github.com/ipfs/kubo/pull/9293))
- feat(gateway): _redirects file support (#8890) ([ipfs/kubo#8890](https://github.com/ipfs/kubo/pull/8890))
- docs: fix typo in changelog-v0.16.0.md
- Readme: Rewrite introduction and featureset (#9211) ([ipfs/kubo#9211](https://github.com/ipfs/kubo/pull/9211))
Expand Down Expand Up @@ -265,7 +265,7 @@ For more information, see `ipfs add --help` and `ipfs files --help`.
- sync: update CI config files ([ipfs/go-pinning-service-http-client#21](https://github.com/ipfs/go-pinning-service-http-client/pull/21))
- github.com/ipld/edelweiss (v0.1.4 -> v0.2.0):
- Release v0.2.0 (#60) ([ipld/edelweiss#60](https://github.com/ipld/edelweiss/pull/60))
- feat: add cachable modifier to methods (#48) ([ipld/edelweiss#48](https://github.com/ipld/edelweiss/pull/48))
- feat: add cacheable modifier to methods (#48) ([ipld/edelweiss#48](https://github.com/ipld/edelweiss/pull/48))
- adding licenses (#52) ([ipld/edelweiss#52](https://github.com/ipld/edelweiss/pull/52))
- sync: update CI config files ([ipld/edelweiss#56](https://github.com/ipld/edelweiss/pull/56))
- chore: replace deprecated ioutil with io/os ([ipld/edelweiss#59](https://github.com/ipld/edelweiss/pull/59))
Expand Down
10 changes: 5 additions & 5 deletions docs/changelogs/v0.18.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ As much as possible, the aim is for a user to only think about how much memory t
and not need to think about translating that to hard numbers for connections, streams, etc.
More updates are likely in future Kubo releases, but with this release:
1. ``System.StreamsInbound`` is no longer bounded directly
2. ``System.ConnsInbound``, ``Transient.Memory``, ``Transiet.ConnsInbound`` have higher default computed values.
2. ``System.ConnsInbound``, ``Transient.Memory``, ``Transient.ConnsInbound`` have higher default computed values.

### 📝 Changelog

Expand Down Expand Up @@ -312,11 +312,11 @@ and various improvements have been made to improve the UX including:
- github.com/ipfs/kubo:
- fix: clarity: no user supplied rcmgr limits of 0 (#9563) ([ipfs/kubo#9563](https://github.com/ipfs/kubo/pull/9563))
- fix(gateway): undesired conversions to dag-json and friends (#9566) ([ipfs/kubo#9566](https://github.com/ipfs/kubo/pull/9566))
- fix: ensure connmgr is smaller then autoscalled ressource limits
- fix: ensure connmgr is smaller then autoscalled resource limits
- fix: typo in ensureConnMgrMakeSenseVsResourcesMgr
- docs: clarify browser descriptions for webtransport
- fix: update saxon download path
- fix: refuse to start if connmgr is smaller than ressource limits and not using none connmgr
- fix: refuse to start if connmgr is smaller than resource limits and not using none connmgr
- fix: User-Agent sent to HTTP routers
- test: port gateway sharness tests to Go tests
- fix: do not download saxon in parallel
Expand All @@ -338,7 +338,7 @@ and various improvements have been made to improve the UX including:
- fix: disable provide over HTTP with Routing.Type=auto (#9511) ([ipfs/kubo#9511](https://github.com/ipfs/kubo/pull/9511))
- Update version.go
- 'chore: update version.go'
- Clened up 0.18 changelog for release ([ipfs/kubo#9497](https://github.com/ipfs/kubo/pull/9497))
- Cleaned up 0.18 changelog for release ([ipfs/kubo#9497](https://github.com/ipfs/kubo/pull/9497))
- feat: turn on WebTransport by default ([ipfs/kubo#9492](https://github.com/ipfs/kubo/pull/9492))
- feat: fast directory listings with DAG Size column (#9481) ([ipfs/kubo#9481](https://github.com/ipfs/kubo/pull/9481))
- feat: add basic CLI tests using Go Test
Expand Down Expand Up @@ -484,7 +484,7 @@ and various improvements have been made to improve the UX including:
- run gofmt -s
- bump go.mod to Go 1.18 and run go fix
- test for reader / sizing behavior on large files ([ipfs/go-unixfsnode#34](https://github.com/ipfs/go-unixfsnode/pull/34))
- add helper to approximate test creation patter from ipfs-files ([ipfs/go-unixfsnode#32](https://github.com/ipfs/go-unixfsnode/pull/32))
- add helper to approximate test creation pattern from ipfs-files ([ipfs/go-unixfsnode#32](https://github.com/ipfs/go-unixfsnode/pull/32))
- chore: remove Stebalien/go-bitfield in favour of ipfs/go-bitfield
- github.com/ipfs/interface-go-ipfs-core (v0.7.0 -> v0.8.2):
- chore: version 0.8.2 (#100) ([ipfs/interface-go-ipfs-core#100](https://github.com/ipfs/interface-go-ipfs-core/pull/100))
Expand Down
Loading

0 comments on commit 9482e91

Please sign in to comment.