Commit 3eee9c5
committed
fix: harden host-device plugin invocation path
The host-device plugin invocation path had three deficiencies that made it
fragile and hard to debug: no binary existence check, no timeout on
ExecPlugin, and discarded return values. This commit addresses all three
issues to improve reliability and error reporting.
- Return an error from hostDeviceExecutable when the binary cannot be
located or does not exist on disk
- Apply a 5-second timeout to ExecPlugin calls to prevent indefinite hangs
- Validate that ExecPlugin returns a non-nil result before proceeding
- Wrap all host-device errors with context identifying the plugin as
the source
fixes #1551 parent 9f1f783 commit 3eee9c5
1 file changed
Lines changed: 27 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
25 | 34 | | |
26 | 35 | | |
27 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
28 | 42 | | |
29 | 43 | | |
30 | 44 | | |
| |||
49 | 63 | | |
50 | 64 | | |
51 | 65 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
57 | 74 | | |
| 75 | + | |
58 | 76 | | |
59 | 77 | | |
0 commit comments