Commit d843097
Remove deprecated namespace concept from Cassandra storage options (jaegertracing#7719)
## Remove namespace concept from Cassandra options
Since v1 binaries have been deprecated, the namespace concept is no
longer needed. This PR simplifies the configuration structs.
### Changes Made:
- [x] Understand current structure and usage
- [x] Simplify Options struct by removing NamespaceConfig wrapper
- [x] Replace namespace field with explicit ArchiveEnabled field
- [x] Update NewOptions to not require namespace parameter
- [x] Update IsArchiveCapable to use ArchiveEnabled field
- [x] Update all callers of NewOptions in v1 tests
- [x] Update storageconfig to use simplified Options
- [x] Update v2 cassandra factory to use Configuration.Validate()
- [x] Update v2 cassandra tests to use simplified Options
- [x] Update integration test to use simplified Options
- [x] Run fmt and fix formatting
- [x] All tests passing
- [x] Code review completed (no issues)
- [x] Lint passes
- [x] make fmt, make lint, and make test all successful
### Summary:
This PR successfully removes the deprecated namespace concept from the
Cassandra storage options:
- Removed `NamespaceConfig` struct that unnecessarily wrapped
`config.Configuration`
- Removed the unused `namespace` string field (was only used for
distinguishing archive storage)
- Replaced with explicit `ArchiveEnabled` bool field for clarity
- Simplified `NewOptions()` constructor to take no parameters
- Updated `IsArchiveCapable()` to simply check the `ArchiveEnabled`
field
- Reduced nesting and complexity in the Options struct
- Updated all test files across v1 and v2 cassandra packages and
integration tests
- Updated storageconfig to use the simplified structure
All tests pass successfully. The changes are backward compatible as they
only affect internal implementation details.
<!-- START COPILOT CODING AGENT SUFFIX -->
<!-- START COPILOT ORIGINAL PROMPT -->
<details>
<summary>Original prompt</summary>
> in internal/storage/v1/cassandra/options.go we still have the notion
of the "namespace" like NamespaceConfig etc, but since v1 binaries have
been deprecated I don't think there is any use for this concept anymore.
Please see if we can remove it and simplify the configuration structs,
reduce unnecessary nesting, and remove unnecessary functions.
</details>
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: yurishkuro <[email protected]>1 parent b728d61 commit d843097
File tree
8 files changed
+30
-66
lines changed- cmd/internal/storageconfig
- internal/storage
- integration
- v1/cassandra
- v2/cassandra
8 files changed
+30
-66
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 79 | + | |
83 | 80 | | |
84 | 81 | | |
85 | 82 | | |
86 | 83 | | |
87 | 84 | | |
88 | 85 | | |
| 86 | + | |
89 | 87 | | |
90 | 88 | | |
91 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 35 | | |
41 | 36 | | |
42 | 37 | | |
| |||
66 | 61 | | |
67 | 62 | | |
68 | 63 | | |
69 | | - | |
| 64 | + | |
70 | 65 | | |
71 | 66 | | |
72 | 67 | | |
| |||
231 | 226 | | |
232 | 227 | | |
233 | 228 | | |
234 | | - | |
235 | | - | |
| 229 | + | |
236 | 230 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
119 | 118 | | |
120 | 119 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
125 | 123 | | |
126 | 124 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
137 | 128 | | |
138 | 129 | | |
139 | 130 | | |
140 | 131 | | |
141 | 132 | | |
142 | 133 | | |
143 | 134 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 135 | + | |
148 | 136 | | |
149 | 137 | | |
150 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 34 | | |
43 | | - | |
| 35 | + | |
44 | 36 | | |
45 | 37 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 38 | + | |
51 | 39 | | |
| 40 | + | |
52 | 41 | | |
53 | 42 | | |
54 | 43 | | |
55 | 44 | | |
56 | 45 | | |
57 | 46 | | |
58 | | - | |
| 47 | + | |
59 | 48 | | |
60 | 49 | | |
61 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
| 23 | + | |
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
| |||
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 39 | + | |
44 | 40 | | |
45 | 41 | | |
46 | 42 | | |
| |||
62 | 58 | | |
63 | 59 | | |
64 | 60 | | |
65 | | - | |
| 61 | + | |
66 | 62 | | |
67 | 63 | | |
68 | 64 | | |
| |||
113 | 109 | | |
114 | 110 | | |
115 | 111 | | |
116 | | - | |
117 | | - | |
118 | | - | |
| 112 | + | |
119 | 113 | | |
120 | 114 | | |
121 | 115 | | |
| |||
0 commit comments