Skip to content

Commit 6bf52ae

Browse files
authored
Merge pull request #11018 from ipfs/release-v0.38.1
Release v0.38.1
2 parents 34debcb + fb14754 commit 6bf52ae

File tree

23 files changed

+775
-317
lines changed

23 files changed

+775
-317
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Migrations
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths:
7+
# Migration implementation files
8+
- 'repo/fsrepo/migrations/**'
9+
- 'test/cli/migrations/**'
10+
# Config and repo handling
11+
- 'repo/fsrepo/**'
12+
# This workflow file itself
13+
- '.github/workflows/test-migrations.yml'
14+
push:
15+
branches:
16+
- 'master'
17+
- 'release-*'
18+
paths:
19+
- 'repo/fsrepo/migrations/**'
20+
- 'test/cli/migrations/**'
21+
- 'repo/fsrepo/**'
22+
- '.github/workflows/test-migrations.yml'
23+
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
26+
cancel-in-progress: true
27+
28+
jobs:
29+
test:
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
os: [ubuntu-latest, windows-latest, macos-latest]
34+
runs-on: ${{ matrix.os }}
35+
timeout-minutes: 20
36+
env:
37+
TEST_VERBOSE: 1
38+
IPFS_CHECK_RCMGR_DEFAULTS: 1
39+
defaults:
40+
run:
41+
shell: bash
42+
steps:
43+
- name: Check out Kubo
44+
uses: actions/checkout@v5
45+
46+
- name: Set up Go
47+
uses: actions/setup-go@v6
48+
with:
49+
go-version-file: 'go.mod'
50+
51+
- name: Build kubo binary
52+
run: |
53+
make build
54+
echo "Built ipfs binary at $(pwd)/cmd/ipfs/"
55+
56+
- name: Add kubo to PATH
57+
run: |
58+
echo "$(pwd)/cmd/ipfs" >> $GITHUB_PATH
59+
60+
- name: Verify ipfs in PATH
61+
run: |
62+
which ipfs || echo "ipfs not in PATH"
63+
ipfs version || echo "Failed to run ipfs version"
64+
65+
- name: Run migration unit tests
66+
run: |
67+
go test ./repo/fsrepo/migrations/...
68+
69+
- name: Run CLI migration tests
70+
env:
71+
IPFS_PATH: ${{ runner.temp }}/ipfs-test
72+
run: |
73+
export PATH="${{ github.workspace }}/cmd/ipfs:$PATH"
74+
which ipfs || echo "ipfs not found in PATH"
75+
ipfs version || echo "Failed to run ipfs version"
76+
go test ./test/cli/migrations/...
77+
78+
- name: Upload test results
79+
if: always()
80+
uses: actions/upload-artifact@v4
81+
with:
82+
name: ${{ matrix.os }}-test-results
83+
path: |
84+
test/**/*.log
85+
${{ runner.temp }}/ipfs-test/

bin/check_go_version

Lines changed: 0 additions & 44 deletions
This file was deleted.

bin/check_version

Lines changed: 0 additions & 77 deletions
This file was deleted.

cmd/ipfs/kubo/daemon.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
334334
}
335335

336336
// Use hybrid migration strategy that intelligently combines external and embedded migrations
337-
err = migrations.RunHybridMigrations(cctx.Context(), version.RepoVersion, cctx.ConfigRoot, false)
337+
// Use req.Context instead of cctx.Context() to avoid attempting repo open before migrations complete
338+
err = migrations.RunHybridMigrations(req.Context, version.RepoVersion, cctx.ConfigRoot, false)
338339
if err != nil {
339340
fmt.Println("Repository migration failed:")
340341
fmt.Printf(" %s\n", err)
@@ -387,7 +388,8 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
387388
log.Errorf("failed to create autoconf client: %v", err)
388389
} else {
389390
// Start primes cache and starts background updater
390-
if _, err := client.Start(cctx.Context()); err != nil {
391+
// Use req.Context for background updater lifecycle (node doesn't exist yet)
392+
if _, err := client.Start(req.Context); err != nil {
391393
log.Errorf("failed to start autoconf updater: %v", err)
392394
}
393395
}

core/commands/repo.go

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -423,19 +423,12 @@ migration. Versions below 16 require external migration tools.
423423
return fmt.Errorf("downgrade from version %d to %d requires --allow-downgrade flag", currentVersion, targetVersion)
424424
}
425425

426-
// Check if repo is locked by daemon before running migration
427-
locked, err := fsrepo.LockedByOtherProcess(cctx.ConfigRoot)
428-
if err != nil {
429-
return fmt.Errorf("could not check repo lock: %w", err)
430-
}
431-
if locked {
432-
return fmt.Errorf("cannot run migration while daemon is running (repo.lock exists)")
433-
}
434-
435426
fmt.Printf("Migrating repository from version %d to %d...\n", currentVersion, targetVersion)
436427

437428
// Use hybrid migration strategy that intelligently combines external and embedded migrations
438-
err = migrations.RunHybridMigrations(cctx.Context(), targetVersion, cctx.ConfigRoot, allowDowngrade)
429+
// Use req.Context instead of cctx.Context() to avoid opening the repo before migrations run,
430+
// which would acquire the lock that migrations need
431+
err = migrations.RunHybridMigrations(req.Context, targetVersion, cctx.ConfigRoot, allowDowngrade)
439432
if err != nil {
440433
fmt.Println("Repository migration failed:")
441434
fmt.Printf(" %s\n", err)

docs/changelogs/v0.38.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
This release was brought to you by the [Shipyard](https://ipshipyard.com/) team.
66

77
- [v0.38.0](#v0380)
8+
- [v0.38.1](#v0381)
89

910
## v0.38.0
1011

@@ -290,3 +291,34 @@ The new [`Internal.MFSNoFlushLimit`](https://github.com/ipfs/kubo/blob/master/do
290291
| Jakub Sztandera | 1 | +67/-15 | 3 |
291292
| Masih H. Derkani | 1 | +1/-2 | 2 |
292293
| Dominic Della Valle | 1 | +2/-1 | 1 |
294+
295+
## v0.38.1
296+
297+
Fixes migration panic on Windows when upgrading from v0.37 to v0.38 ("panic: error can't be dealt with transactionally: Access is denied").
298+
299+
Updates go-ds-pebble to v0.5.3 (pebble v2.1.0).
300+
301+
### 📝 Changelog
302+
303+
<details><summary>Full Changelog</summary>
304+
305+
- github.com/ipfs/kubo:
306+
- chore: v0.38.1
307+
- fix: migrations for Windows (#11010) ([ipfs/kubo#11010](https://github.com/ipfs/kubo/pull/11010))
308+
- Upgrade go-ds-pebble to v0.5.3 (#11011) ([ipfs/kubo#11011](https://github.com/ipfs/kubo/pull/11011))
309+
- upgrade go-ds-pebble to v0.5.2 (#11000) ([ipfs/kubo#11000](https://github.com/ipfs/kubo/pull/11000))
310+
- github.com/ipfs/go-ds-pebble (v0.5.1 -> v0.5.3):
311+
- new version (#62) ([ipfs/go-ds-pebble#62](https://github.com/ipfs/go-ds-pebble/pull/62))
312+
- fix panic when batch is reused after commit (#61) ([ipfs/go-ds-pebble#61](https://github.com/ipfs/go-ds-pebble/pull/61))
313+
- new version (#60) ([ipfs/go-ds-pebble#60](https://github.com/ipfs/go-ds-pebble/pull/60))
314+
- Upgrade to pebble v2.1.0 (#59) ([ipfs/go-ds-pebble#59](https://github.com/ipfs/go-ds-pebble/pull/59))
315+
- update readme (#57) ([ipfs/go-ds-pebble#57](https://github.com/ipfs/go-ds-pebble/pull/57))
316+
317+
</details>
318+
319+
### 👨‍👩‍👧‍👦 Contributors
320+
321+
| Contributor | Commits | Lines ± | Files Changed |
322+
|-------------|---------|---------|---------------|
323+
| Marcin Rataj | 2 | +613/-267 | 15 |
324+
| Andrew Gillis | 6 | +148/-22 | 8 |

docs/examples/kubo-as-a-library/go.mod

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ require (
1616
require (
1717
bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc // indirect
1818
github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect
19-
github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e // indirect
19+
github.com/DataDog/zstd v1.5.7 // indirect
2020
github.com/Jorropo/jsync v1.0.1 // indirect
21+
github.com/RaduBerinde/axisds v0.0.0-20250419182453-5135a0650657 // indirect
22+
github.com/RaduBerinde/btreemap v0.0.0-20250419174037-3d62b7205d54 // indirect
2123
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect
2224
github.com/alexbrainman/goissue34681 v0.0.0-20191006012335-3fc7a47baff5 // indirect
2325
github.com/benbjohnson/clock v1.3.5 // indirect
@@ -29,11 +31,10 @@ require (
2931
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
3032
github.com/ceramicnetwork/go-dag-jose v0.1.1 // indirect
3133
github.com/cespare/xxhash/v2 v2.3.0 // indirect
32-
github.com/cockroachdb/crlib v0.0.0-20241015224233-894974b3ad94 // indirect
34+
github.com/cockroachdb/crlib v0.0.0-20241112164430-1264a2edc35b // indirect
3335
github.com/cockroachdb/errors v1.11.3 // indirect
34-
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect
3536
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
36-
github.com/cockroachdb/pebble/v2 v2.0.6 // indirect
37+
github.com/cockroachdb/pebble/v2 v2.1.0 // indirect
3738
github.com/cockroachdb/redact v1.1.5 // indirect
3839
github.com/cockroachdb/swiss v0.0.0-20250624142022-d6e517c1d961 // indirect
3940
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
@@ -81,7 +82,7 @@ require (
8182
github.com/ipfs/go-ds-flatfs v0.5.5 // indirect
8283
github.com/ipfs/go-ds-leveldb v0.5.2 // indirect
8384
github.com/ipfs/go-ds-measure v0.2.2 // indirect
84-
github.com/ipfs/go-ds-pebble v0.5.1 // indirect
85+
github.com/ipfs/go-ds-pebble v0.5.3 // indirect
8586
github.com/ipfs/go-dsqueue v0.0.5 // indirect
8687
github.com/ipfs/go-fs-lock v0.1.1 // indirect
8788
github.com/ipfs/go-ipfs-cmds v0.15.0 // indirect
@@ -132,6 +133,7 @@ require (
132133
github.com/miekg/dns v1.1.68 // indirect
133134
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
134135
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
136+
github.com/minio/minlz v1.0.1-0.20250507153514-87eb42fe8882 // indirect
135137
github.com/minio/sha256-simd v1.0.1 // indirect
136138
github.com/mr-tron/base58 v1.2.0 // indirect
137139
github.com/multiformats/go-base32 v0.1.0 // indirect

0 commit comments

Comments
 (0)