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

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

Build:
DEFAULT BRANCH: main
Ran 01 Nov 2026 09:20AM UTC
Jobs 27
Files 494
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:19AM UTC coverage: 91.489% (-0.003%) from 91.492%
41292654539

push

github

web-flow
feat(node)!: drain running views on shutdown (#2417)

On SIGTERM, SIGINT or `Node.Stop` a node now lets running views finish before it stops, and stops its components in an order where none outlives what it uses. Before, `Node.Stop` cancelled a context and returned, and the web, gRPC and operations servers, the KVS, the Fabric network provider and the comm service each tore down in a goroutine of their own, so the KVS could close under a component still using it.

The shutdown runs in four steps:
- Drain. `/readyz` answers 503 with reason `draining`, the gRPC health service reports `NOT_SERVING` and `fsc_shutdown_draining` is 1. A new view-API command gets gRPC `Unavailable` (HTTP 503, WebSocket close 1013). A new P2P protocol gets `draining: node is draining`, unless the sender already takes part in the responder context it names.
- Wait for running views, for at most `fsc.shutdown.drainTimeout` (default 30s). At the deadline, initiator views still running are cancelled with `view.ErrCancelledByShutdown`, which the view API returns as gRPC `Aborted` (HTTP 409), since such a view may have submitted a transaction that still commits.
- Cancel the node context.
- Call `Stop()` on every SDK in reverse install order, within `fsc.shutdown.teardownTimeout` (default 30s). The Fabric SDK stops its networks, then the view SDK stops its servers, the comm service and the KVS.

A second signal or `Stop` call skips the rest of the drain.

`pkg/node` finds the drain as a `node.Drainer` in the node's registry, where the view SDK registers the view manager. Wrapper SDKs embed the `commondig.SDK` interface, so a method on the SDK itself would not reach `pkg/node` through them. No method is added to an SDK interface.

The view manager counts initiator views, view-API commands and responders from the moment they are admitted, checking for a drain and counting in one step. A view's context is cancelled only at the drain deadline, not when the view returns. The comm servic... (continued)

329 of 362 new or added lines in 19 files covered. (90.88%)

4 existing lines in 2 files now uncovered.

30420 of 33250 relevant lines covered (91.49%)

1283.95 hits per line

Uncovered Changes

Lines Coverage ∆ File
9
91.3
-4.41% pkg/node/node.go
6
87.72
-4.87% platform/view/services/comm/host/websocket/host.go
5
70.8
2.48% platform/view/services/view/client/http.go
5
92.18
-2.09% platform/view/services/view/p2p/service.go
2
86.26
0.43% platform/fabric/sdk/dig/sdk.go
2
80.5
-0.43% platform/view/services/view/grpc/server/server.go
2
93.33
-1.31% platform/view/services/view/grpc/server/view.go
2
91.28
3.04% platform/view/services/view/manager.go

Coverage Regressions

Lines Coverage ∆ File
3
94.82
-0.07% platform/view/services/comm/host/websocket/ws/multiplexed_provider.go
1
93.99
-0.14% platform/view/services/comm/p2p.go
Jobs
ID Job ID Ran Files Coverage
1 itest-fabric-faultrecovery - 41292654539.1 01 Nov 2026 09:22AM UTC 447
40.9
GitHub Action Run
2 itest-fabricx-deployment - 41292654539.2 01 Nov 2026 09:21AM UTC 479
29.81
GitHub Action Run
3 itest-fabric-atsachaincode - 41292654539.3 01 Nov 2026 09:21AM UTC 452
31.71
GitHub Action Run
4 utest-extensions - 41292654539.4 01 Nov 2026 09:20AM UTC 8
52.69
GitHub Action Run
5 itest-fabric-events - 41292654539.5 01 Nov 2026 09:22AM UTC 452
29.91
GitHub Action Run
6 utest-postgres - 41292654539.6 01 Nov 2026 09:21AM UTC 182
27.7
GitHub Action Run
7 itest-fabric-iouhsm - 41292654539.7 01 Nov 2026 09:21AM UTC 457
39.01
GitHub Action Run
8 itest-fabricx-faultrecovery - 41292654539.8 01 Nov 2026 09:22AM UTC 479
30.04
GitHub Action Run
9 itest-fsc-stoprestart - 41292654539.9 01 Nov 2026 09:22AM UTC 248
34.72
GitHub Action Run
10 itest-fabric-iou - 41292654539.10 01 Nov 2026 09:22AM UTC 457
41.82
GitHub Action Run
11 itest-fabric-atsa - 41292654539.11 01 Nov 2026 09:23AM UTC 447
44.99
GitHub Action Run
12 itest-fabricx-multiendorsement - 41292654539.12 01 Nov 2026 09:21AM UTC 479
29.83
GitHub Action Run
13 itest-fabric-faultrecovery-replication - 41292654539.13 01 Nov 2026 09:22AM UTC 447
40.13
GitHub Action Run
14 itest-fabric-configupdate - 41292654539.14 01 Nov 2026 09:21AM UTC 457
39.68
GitHub Action Run
15 itest-fabricx-simple - 41292654539.15 01 Nov 2026 09:21AM UTC 479
29.32
GitHub Action Run
16 utest-root - 41292654539.16 01 Nov 2026 09:22AM UTC 485
89.98
GitHub Action Run
17 itest-fabric-faultrecovery-postgres-outage - 41292654539.17 01 Nov 2026 09:22AM UTC 447
39.87
GitHub Action Run
18 itest-fabricx-atsa - 41292654539.18 01 Nov 2026 09:21AM UTC 479
31.98
GitHub Action Run
19 itest-fabricx-configupdate - 41292654539.19 01 Nov 2026 09:22AM UTC 479
29.89
GitHub Action Run
20 itest-fabric-runtimeconfig - 41292654539.20 01 Nov 2026 09:22AM UTC 457
39.9
GitHub Action Run
21 itest-fabric-iou-libp2p - 41292654539.21 01 Nov 2026 09:22AM UTC 457
37.3
GitHub Action Run
22 itest-fabric-twonets - 41292654539.22 01 Nov 2026 09:21AM UTC 447
37.92
GitHub Action Run
23 itest-fabricx-faultrecovery-replication - 41292654539.23 01 Nov 2026 09:22AM UTC 479
29.32
GitHub Action Run
24 itest-fsc-signedpingpong - 41292654539.24 01 Nov 2026 09:20AM UTC 247
31.33
GitHub Action Run
25 itest-fabricx-iou - 41292654539.25 01 Nov 2026 09:21AM UTC 479
30.63
GitHub Action Run
26 itest-fsc-pingpong - 41292654539.26 01 Nov 2026 09:21AM UTC 252
35.99
GitHub Action Run
27 itest-fabric-faultrecovery-partition - 41292654539.27 01 Nov 2026 09:23AM UTC 447
38.81
GitHub Action Run
Source Files on build 41292654539
  • Tree
  • List 494
  • Changed 44
  • Source Changed 19
  • Coverage Changed 44
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41292654539
  • 539b146e on github
  • Prev Build on main (#41068046242)
  • Next Build on main (#41292780493)
  • 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