• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hyperledger-labs / fabric-smart-client / 41292780493
92%

Build:
DEFAULT BRANCH: main
Ran 01 Nov 2026 09:22AM UTC
Jobs 27
Files 495
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Nov 2026 09:21AM UTC coverage: 91.472% (-0.02%) from 91.489%
41292780493

push

github

web-flow
feat(storage): add versioned schema migrations (#2416)

The new package platform/view/services/storage/driver/sql/common/migrate records a schema version per SQL store and runs ordered schema steps. A store opts in by implementing migrate.Versioned (StoreName and Steps). Each table prefix gets one <prefix>_schema_versions table with a row per store holding version and readable_by. No FSC store implements Versioned yet, so nothing changes at runtime.

A step holds SQL statements and an optional Go function, which runs after the SQL in the same transaction, for changes SQL cannot express such as a backfill computed in Go. The function runs statements through migrate.Execer, the ExecContext/QueryContext/QueryRowContext subset shared by *sql.Tx, *sql.Conn and *sql.DB. It does not receive a *sql.Tx because SQLite steps run in BEGIN IMMEDIATE on a raw connection, and the modernc driver sets the begin mode only per pool.

Migrate reads the store's row without taking the migration lock and returns if nothing is pending. A readable_by above the binary's latest step returns ErrSchemaTooNew, a corrupt row returns an error, and WithCheckOnly returns ErrPending instead of running steps. When steps are pending:
- Postgres migrators of one prefix exclude each other with a session advisory lock on a dedicated connection. The waiter polls pg_try_advisory_lock, logs every 10s and has no timeout, so lock_timeout does not apply.
- SQLite runs each step in BEGIN IMMEDIATE on the write connection; across processes the wait is bounded by busy_timeout.
Each step runs in its own transaction, re-reads the row, skips a step another migrator applied meanwhile, and records the new version. A failed step rolls back, SQL and Go function together, and names the store and the step. A different Go type claiming the same store row in the same database is rejected.

The six driver constructors (sqlite, postgres and memory, for view and fabric stores) call migrate.CreateSchema, which run... (continued)

141 of 171 new or added lines in 7 files covered. (82.46%)

8 existing lines in 5 files now uncovered.

30558 of 33407 relevant lines covered (91.47%)

1276.19 hits per line

Uncovered Changes

Lines Coverage ∆ File
25
82.76
platform/view/services/storage/driver/sql/common/migrate/migrate.go
3
76.92
-2.67% platform/fabric/services/db/driver/sql/sqlite/driver.go
1
95.35
0.35% platform/fabric/services/db/driver/sql/postgres/driver.go
1
77.78
1.59% platform/view/services/storage/driver/sql/postgres/driver.go

Coverage Regressions

Lines Coverage ∆ File
3
85.05
-1.55% platform/fabric/core/generic/events/listenermanager.go
2
92.61
-1.14% platform/fabric/core/generic/ordering/bft.go
1
76.92
-2.67% platform/fabric/services/db/driver/sql/sqlite/driver.go
1
95.35
0.35% platform/fabric/services/db/driver/sql/postgres/driver.go
1
77.78
1.59% platform/view/services/storage/driver/sql/postgres/driver.go
Jobs
ID Job ID Ran Files Coverage
1 itest-fabric-atsachaincode - 41292780493.1 01 Nov 2026 09:23AM UTC 453
31.62
GitHub Action Run
2 itest-fabricx-multiendorsement - 41292780493.2 01 Nov 2026 09:23AM UTC 480
29.71
GitHub Action Run
3 utest-extensions - 41292780493.3 01 Nov 2026 09:22AM UTC 8
52.69
GitHub Action Run
4 itest-fabricx-simple - 41292780493.4 01 Nov 2026 09:22AM UTC 480
29.17
GitHub Action Run
5 itest-fsc-stoprestart - 41292780493.5 01 Nov 2026 09:23AM UTC 249
34.35
GitHub Action Run
6 itest-fabric-faultrecovery-postgres-outage - 41292780493.6 01 Nov 2026 09:24AM UTC 448
39.68
GitHub Action Run
7 itest-fabric-faultrecovery - 41292780493.7 01 Nov 2026 09:24AM UTC 448
40.7
GitHub Action Run
8 itest-fabric-faultrecovery-partition - 41292780493.8 01 Nov 2026 09:25AM UTC 448
38.58
GitHub Action Run
9 itest-fabric-events - 41292780493.9 01 Nov 2026 09:23AM UTC 453
29.79
GitHub Action Run
10 itest-fabricx-configupdate - 41292780493.10 01 Nov 2026 09:23AM UTC 480
29.75
GitHub Action Run
11 utest-postgres - 41292780493.11 01 Nov 2026 09:23AM UTC 183
28.49
GitHub Action Run
12 itest-fabric-iouhsm - 41292780493.12 01 Nov 2026 09:23AM UTC 458
38.83
GitHub Action Run
13 itest-fabricx-faultrecovery - 41292780493.13 01 Nov 2026 09:24AM UTC 480
29.92
GitHub Action Run
14 itest-fabricx-deployment - 41292780493.14 01 Nov 2026 09:23AM UTC 480
29.73
GitHub Action Run
15 itest-fabricx-atsa - 41292780493.15 01 Nov 2026 09:23AM UTC 480
31.94
GitHub Action Run
16 itest-fabric-iou - 41292780493.16 01 Nov 2026 09:24AM UTC 458
41.67
GitHub Action Run
17 itest-fabric-configupdate - 41292780493.17 01 Nov 2026 09:23AM UTC 458
39.5
GitHub Action Run
18 itest-fabric-faultrecovery-replication - 41292780493.18 01 Nov 2026 09:23AM UTC 448
39.68
GitHub Action Run
19 itest-fabric-atsa - 41292780493.19 01 Nov 2026 09:24AM UTC 448
44.73
GitHub Action Run
20 utest-root - 41292780493.20 01 Nov 2026 09:24AM UTC 486
89.9
GitHub Action Run
21 itest-fabric-iou-libp2p - 41292780493.21 01 Nov 2026 09:23AM UTC 458
37.16
GitHub Action Run
22 itest-fabric-runtimeconfig - 41292780493.22 01 Nov 2026 09:23AM UTC 458
39.88
GitHub Action Run
23 itest-fabric-twonets - 41292780493.23 01 Nov 2026 09:22AM UTC 448
37.75
GitHub Action Run
24 itest-fabricx-iou - 41292780493.24 01 Nov 2026 09:23AM UTC 480
30.5
GitHub Action Run
25 itest-fsc-pingpong - 41292780493.25 01 Nov 2026 09:23AM UTC 253
35.68
GitHub Action Run
26 itest-fsc-signedpingpong - 41292780493.26 01 Nov 2026 09:22AM UTC 248
31.07
GitHub Action Run
27 itest-fabricx-faultrecovery-replication - 41292780493.27 01 Nov 2026 09:23AM UTC 480
29.26
GitHub Action Run
Source Files on build 41292780493
  • Tree
  • List 495
  • Changed 38
  • Source Changed 6
  • Coverage Changed 38
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41292780493
  • 8d2662ca on github
  • Prev Build on main (#41292654539)
  • Next Build on main (#41295042981)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc