Commit a3bf764
authored
feat: unify yamlconfig and hash and do not store hash if failed (#1299)
* feat: unify yamlconfig and hash in a new Remote Config values and don't store a failed hash.
* feat: Modify LocalConfig enum to use custom type
* feat: Modify update_hash method to upda_hash_state because a hash should never be updated, only the state
* feat: Improve Update Hash state error message
* feat: Correct wrong comment in config_repository
* feat: Simplify loading a file if it's present for Config Repository File
* feat: Remove hash apply and fail and call update_state from remote_config instead
* feat: Rename yaml_config_repository tests file to match the code
* feat: Rename opamp->RemoteConfig to opamp->OpampRemoteConfig to avoid collision and confusion with value's RemoteConfig
* feat: Add new case and test when we receive an empty remote config that forces to use local but local fails. In that case the remote config should still be reported as applied.
* feat: Return a reference in get_yaml_config
* feat: Modify fmt for imports in agent_control
* feat: parse remote before creating supervisor to be able to distinguish between a failed supervisor from remote or local
* feat: Add effective config reporting for reset to local and stop old supervisor if resetting to local fails
* feat: Add comments explaining error procedence1 parent c842031 commit a3bf764
File tree
48 files changed
+1597
-1542
lines changed- agent-control
- src
- agent_control
- config_storer
- event_handler/opamp
- run
- bin
- config_migrate/migration
- k8s
- opamp
- effective_config
- hash_repository
- remote_config
- validators
- signature
- sub_agent
- k8s
- on_host
- values
- tests
- common
- k8s
- on_host
- scenarios
- tools
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
48 files changed
+1597
-1542
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
71 | | - | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
Lines changed: 38 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
15 | 33 | | |
16 | 34 | | |
17 | 35 | | |
| |||
20 | 38 | | |
21 | 39 | | |
22 | 40 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | 41 | | |
29 | 42 | | |
30 | | - | |
31 | 43 | | |
32 | | - | |
33 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
34 | 47 | | |
35 | 48 | | |
36 | | - | |
| 49 | + | |
| 50 | + | |
37 | 51 | | |
38 | 52 | | |
39 | 53 | | |
40 | 54 | | |
41 | 55 | | |
42 | | - | |
43 | | - | |
| 56 | + | |
| 57 | + | |
44 | 58 | | |
45 | 59 | | |
46 | 60 | | |
47 | 61 | | |
48 | | - | |
| 62 | + | |
49 | 63 | | |
50 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
51 | 71 | | |
52 | 72 | | |
53 | 73 | | |
| |||
58 | 78 | | |
59 | 79 | | |
60 | 80 | | |
61 | | - | |
62 | | - | |
| 81 | + | |
63 | 82 | | |
64 | 83 | | |
65 | | - | |
| 84 | + | |
66 | 85 | | |
67 | 86 | | |
68 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
19 | | - | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | | - | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
38 | | - | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
45 | | - | |
| 48 | + | |
46 | 49 | | |
47 | | - | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
56 | | - | |
| 59 | + | |
57 | 60 | | |
58 | | - | |
| 61 | + | |
59 | 62 | | |
60 | | - | |
| 63 | + | |
61 | 64 | | |
62 | | - | |
| 65 | + | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
67 | 90 | | |
68 | 91 | | |
69 | | - | |
| 92 | + | |
70 | 93 | | |
71 | 94 | | |
72 | 95 | | |
| |||
89 | 112 | | |
90 | 113 | | |
91 | 114 | | |
| 115 | + | |
| 116 | + | |
92 | 117 | | |
93 | 118 | | |
94 | 119 | | |
| |||
114 | 139 | | |
115 | 140 | | |
116 | 141 | | |
117 | | - | |
| 142 | + | |
| 143 | + | |
118 | 144 | | |
119 | 145 | | |
120 | 146 | | |
121 | 147 | | |
122 | 148 | | |
123 | 149 | | |
124 | 150 | | |
125 | | - | |
126 | | - | |
| 151 | + | |
| 152 | + | |
127 | 153 | | |
128 | | - | |
129 | | - | |
130 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
131 | 158 | | |
132 | 159 | | |
133 | 160 | | |
| |||
138 | 165 | | |
139 | 166 | | |
140 | 167 | | |
141 | | - | |
| 168 | + | |
142 | 169 | | |
143 | 170 | | |
144 | 171 | | |
| |||
162 | 189 | | |
163 | 190 | | |
164 | 191 | | |
165 | | - | |
166 | | - | |
167 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
168 | 198 | | |
169 | 199 | | |
170 | 200 | | |
171 | | - | |
| 201 | + | |
172 | 202 | | |
173 | 203 | | |
174 | 204 | | |
| |||
215 | 245 | | |
216 | 246 | | |
217 | 247 | | |
218 | | - | |
| 248 | + | |
219 | 249 | | |
220 | 250 | | |
221 | 251 | | |
| |||
264 | 294 | | |
265 | 295 | | |
266 | 296 | | |
267 | | - | |
| 297 | + | |
268 | 298 | | |
269 | 299 | | |
270 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
| 12 | + | |
14 | 13 | | |
15 | 14 | | |
| 15 | + | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | 73 | | |
78 | 74 | | |
79 | 75 | | |
80 | 76 | | |
81 | | - | |
| 77 | + | |
82 | 78 | | |
83 | 79 | | |
84 | | - | |
| 80 | + | |
85 | 81 | | |
86 | 82 | | |
87 | 83 | | |
| |||
0 commit comments