Commit 9f25216
fix: [RBAC Migration]Hydrate workspace config at startup (#1575)
* Hydrate workspace config at startup
Add WorkspaceConfigService.hydrate_on_startup() which calls load_config() to eagerly populate the config manager from the DB during application startup. Call this method from the app lifespan (run_startup) and log errors if hydration fails. This prevents a DB-mode restart from leaving the in-memory config unset and causing the frontend onboarding wizard to reappear; load_config() is mode-aware, so invoking it unconditionally is safe.
* lint fix
* style: ruff format (auto)
* fix mypy
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>1 parent 31b746b commit 9f25216
2 files changed
Lines changed: 30 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
179 | 186 | | |
180 | 187 | | |
181 | 188 | | |
| |||
217 | 224 | | |
218 | 225 | | |
219 | 226 | | |
220 | | - | |
221 | | - | |
222 | | - | |
| 227 | + | |
223 | 228 | | |
224 | 229 | | |
225 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
140 | 153 | | |
141 | 154 | | |
142 | 155 | | |
| |||
155 | 168 | | |
156 | 169 | | |
157 | 170 | | |
158 | | - | |
| 171 | + | |
159 | 172 | | |
160 | 173 | | |
161 | 174 | | |
| |||
181 | 194 | | |
182 | 195 | | |
183 | 196 | | |
184 | | - | |
| 197 | + | |
185 | 198 | | |
186 | 199 | | |
187 | | - | |
| 200 | + | |
188 | 201 | | |
189 | 202 | | |
190 | 203 | | |
| |||
217 | 230 | | |
218 | 231 | | |
219 | 232 | | |
220 | | - | |
| 233 | + | |
221 | 234 | | |
222 | 235 | | |
223 | 236 | | |
| |||
278 | 291 | | |
279 | 292 | | |
280 | 293 | | |
281 | | - | |
282 | | - | |
| 294 | + | |
| 295 | + | |
283 | 296 | | |
284 | 297 | | |
285 | 298 | | |
| |||
321 | 334 | | |
322 | 335 | | |
323 | 336 | | |
324 | | - | |
| 337 | + | |
325 | 338 | | |
326 | 339 | | |
327 | 340 | | |
| |||
373 | 386 | | |
374 | 387 | | |
375 | 388 | | |
376 | | - | |
| 389 | + | |
377 | 390 | | |
378 | 391 | | |
379 | 392 | | |
| |||
0 commit comments