Commit 79f0500
feat: add telemetry, documentation, and edge case handling for extension upgrade (#7853)
* feat: add telemetry, documentation, and edge case handling for extension upgrade
- Add per-extension telemetry events (ext.upgrade) with name, version
from/to, source, duration_ms, and outcome attributes
- Add distinct promotion telemetry events (ext.promote) with source.from
and source.to attributes for tracking registry promotion adoption
- Update azd extension upgrade help text to document default registry
behavior, auto-promotion, --source override, continue-on-error in
--all mode, and --output json for structured reports
- Handle delisted extensions as skipped (not failed) so batch continues
- Detect network errors from FindExtensions/Upgrade and show retry
suggestion distinguishing connectivity issues from missing extensions
- Implement atomic config writes (write-to-temp-then-rename) to prevent
corruption during interrupted batch upgrades
- Add telemetry field constants for extension upgrade tracking
- Update snapshot tests for new help text
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: address review findings for telemetry and config atomicity
- Verify atomic write already uses os.CreateTemp (no code change needed)
- Add tests for temp file cleanup: success path, directory creation
failure with clear error, and original file preservation on write
failure
- Add doc comments on upgradeOneExtension and emitPromotionEvent
documenting the telemetry testing strategy
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: simplify network error detection and address review feedback
Remove redundant net.DNSError and net.OpError type assertions from
isNetworkError - both implement net.Error, which is already checked.
Keep the interface check and string-matching fallback.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent d14ecbe commit 79f0500
9 files changed
Lines changed: 445 additions & 25 deletions
File tree
- cli/azd
- .vscode
- cmd
- testdata
- internal/tracing
- events
- fields
- pkg/config
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| 29 | + | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
| |||
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
87 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
88 | 106 | | |
89 | 107 | | |
90 | 108 | | |
| |||
1079 | 1097 | | |
1080 | 1098 | | |
1081 | 1099 | | |
1082 | | - | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
1083 | 1106 | | |
1084 | 1107 | | |
1085 | 1108 | | |
1086 | 1109 | | |
1087 | 1110 | | |
1088 | 1111 | | |
1089 | 1112 | | |
| 1113 | + | |
1090 | 1114 | | |
1091 | 1115 | | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
1092 | 1144 | | |
1093 | 1145 | | |
1094 | 1146 | | |
| |||
1148 | 1200 | | |
1149 | 1201 | | |
1150 | 1202 | | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
1151 | 1210 | | |
1152 | 1211 | | |
1153 | 1212 | | |
1154 | 1213 | | |
1155 | 1214 | | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
1159 | | - | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
1160 | 1232 | | |
1161 | 1233 | | |
1162 | 1234 | | |
| |||
1287 | 1359 | | |
1288 | 1360 | | |
1289 | 1361 | | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
1290 | 1369 | | |
1291 | 1370 | | |
1292 | 1371 | | |
1293 | 1372 | | |
1294 | 1373 | | |
1295 | 1374 | | |
1296 | | - | |
| 1375 | + | |
1297 | 1376 | | |
1298 | 1377 | | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
1299 | 1383 | | |
1300 | 1384 | | |
1301 | 1385 | | |
| |||
1439 | 1523 | | |
1440 | 1524 | | |
1441 | 1525 | | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
1442 | 1585 | | |
1443 | 1586 | | |
1444 | 1587 | | |
| |||
0 commit comments