Commit 669b770
authored
Centralize protobuf scalar initialization (#1313)
## Why
Built-in scalar defaults and final protobuf validation are split between
the factory and scalar extension.
## What
- Centralize built-in protobuf mappings and initialization in
`ScalarTypeExtension`.
- Keep the factory responsible only for extending the scalar and
forwarding its configuration block.
- Preserve the existing default, user configuration, and validation
order, including renamed built-in scalars.
## Validation
- `script/run_gem_specs elasticgraph-proto_ingestion`
- `script/lint elasticgraph-proto_ingestion`
- `script/type_check`
## Risk assessment
Low. This is a structural refactor that preserves existing scalar
configuration behavior.
## References
- #1080 (comment)
- Follow-up to #10801 parent 48add3e commit 669b770
5 files changed
Lines changed: 36 additions & 33 deletions
File tree
- elasticgraph-proto_ingestion
- lib/elastic_graph/proto_ingestion/schema_definition
- schema_elements
- sig/elastic_graph/proto_ingestion/schema_definition
- schema_elements
- spec/unit/elastic_graph/proto_ingestion/schema_definition
Lines changed: 2 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 21 | | |
39 | 22 | | |
40 | 23 | | |
| |||
92 | 75 | | |
93 | 76 | | |
94 | 77 | | |
95 | | - | |
96 | | - | |
97 | | - | |
| 78 | + | |
| 79 | + | |
98 | 80 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 81 | | |
103 | 82 | | |
104 | 83 | | |
| |||
Lines changed: 28 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
17 | 34 | | |
18 | 35 | | |
19 | 36 | | |
| |||
26 | 43 | | |
27 | 44 | | |
28 | 45 | | |
29 | | - | |
30 | | - | |
| 46 | + | |
31 | 47 | | |
| 48 | + | |
32 | 49 | | |
33 | | - | |
34 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
35 | 58 | | |
| 59 | + | |
36 | 60 | | |
37 | 61 | | |
38 | 62 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | | - | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
0 commit comments