Commit 87b3390
authored
fix: Make init backend messages JSON-compatible (#37920)
* fix: Make all init backend messages JSON-compatible
Fixes #37911 by converting all backend configuration messages to use the
View abstraction, which properly formats output as JSON when the -json flag
is used. Previously, certain messages were output directly using the legacy
Ui abstraction, bypassing JSON formatting.
Changes:
- Added 11 new message codes to init.go MessageRegistry with both human
and JSON formatted values
- Replaced 11 direct m.Ui.Output() calls in meta_backend.go with View
abstraction calls
- Fixed output in backend_C_r_s(), backend_C_r_S_changed(), backend_c_r_S(),
and stateStore_c_S() functions
All init tests pass successfully.
* docs: Add changelog entry for init JSON backend messages fix
* cleanup: Remove unused backend output constants
The following constants were moved to init.go as message registry entries
and are no longer used in meta_backend.go:
- outputBackendMigrateChange
- outputBackendMigrateLocal
- outputStateStoreMigrateLocal
- outputBackendReconfigure
- successBackendUnset
- successBackendSet1 parent 65a23ed commit 87b3390
File tree
3 files changed
+118
-48
lines changed- .changes/v1.15
- internal/command
- views
3 files changed
+118
-48
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1132 | 1132 | | |
1133 | 1133 | | |
1134 | 1134 | | |
| 1135 | + | |
1135 | 1136 | | |
1136 | | - | |
| 1137 | + | |
1137 | 1138 | | |
1138 | | - | |
| 1139 | + | |
1139 | 1140 | | |
1140 | 1141 | | |
1141 | 1142 | | |
| |||
1177 | 1178 | | |
1178 | 1179 | | |
1179 | 1180 | | |
1180 | | - | |
1181 | | - | |
1182 | | - | |
| 1181 | + | |
1183 | 1182 | | |
1184 | 1183 | | |
1185 | 1184 | | |
| |||
1348 | 1347 | | |
1349 | 1348 | | |
1350 | 1349 | | |
1351 | | - | |
1352 | | - | |
| 1350 | + | |
| 1351 | + | |
1353 | 1352 | | |
1354 | 1353 | | |
1355 | 1354 | | |
| |||
1377 | 1376 | | |
1378 | 1377 | | |
1379 | 1378 | | |
| 1379 | + | |
1380 | 1380 | | |
1381 | 1381 | | |
1382 | | - | |
| 1382 | + | |
1383 | 1383 | | |
1384 | | - | |
| 1384 | + | |
1385 | 1385 | | |
1386 | | - | |
| 1386 | + | |
1387 | 1387 | | |
1388 | 1388 | | |
1389 | | - | |
1390 | | - | |
1391 | | - | |
1392 | | - | |
| 1389 | + | |
1393 | 1390 | | |
1394 | | - | |
1395 | | - | |
1396 | | - | |
| 1391 | + | |
1397 | 1392 | | |
1398 | 1393 | | |
1399 | 1394 | | |
| |||
1479 | 1474 | | |
1480 | 1475 | | |
1481 | 1476 | | |
1482 | | - | |
1483 | | - | |
| 1477 | + | |
| 1478 | + | |
1484 | 1479 | | |
1485 | 1480 | | |
1486 | 1481 | | |
| |||
1866 | 1861 | | |
1867 | 1862 | | |
1868 | 1863 | | |
1869 | | - | |
| 1864 | + | |
| 1865 | + | |
1870 | 1866 | | |
1871 | 1867 | | |
1872 | 1868 | | |
| |||
2625 | 2621 | | |
2626 | 2622 | | |
2627 | 2623 | | |
2628 | | - | |
2629 | | - | |
2630 | | - | |
2631 | | - | |
2632 | | - | |
2633 | | - | |
2634 | | - | |
2635 | | - | |
2636 | | - | |
2637 | | - | |
2638 | | - | |
2639 | | - | |
2640 | | - | |
2641 | | - | |
2642 | | - | |
2643 | | - | |
2644 | | - | |
2645 | | - | |
2646 | | - | |
2647 | 2624 | | |
2648 | 2625 | | |
2649 | 2626 | | |
| |||
2652 | 2629 | | |
2653 | 2630 | | |
2654 | 2631 | | |
2655 | | - | |
2656 | | - | |
2657 | | - | |
2658 | | - | |
2659 | | - | |
2660 | | - | |
2661 | | - | |
2662 | | - | |
2663 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
266 | 306 | | |
267 | 307 | | |
268 | 308 | | |
| |||
303 | 343 | | |
304 | 344 | | |
305 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
306 | 366 | | |
307 | 367 | | |
308 | 368 | | |
| |||
434 | 494 | | |
435 | 495 | | |
436 | 496 | | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
0 commit comments