Commit a1f5923
authored
clickhouse(depstore): return error instead of panic in GetDependencies (#8172)
### Motivation
- The ClickHouse storage backend is selectable and its dependency reader
previously used `panic("not implemented")`, which can crash the query
service when invoked and cause a DoS. This change prevents process
termination by returning an error.
### Description
- Replace the panic in `(*Reader).GetDependencies` with a returned
error.
- Update the unit test in
`internal/storage/v2/clickhouse/depstore/reader_test.go` to assert a
`nil` result and the expected error instead of expecting a panic.
### Testing
- `make fmt`
- `make lint`
- `make test`
Signed-off-by: Jonah Kowall <jkowall@kowall.net>1 parent a272adc commit a1f5923
2 files changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
23 | 24 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
0 commit comments