Repository navigation
Commit acdb9be
CHORE: Flaky Setup - Fail SQL Server setup loudly and dump container logs on every CI leg (#722)
### Work Item / Issue Reference
> ADO Work Item: Fixed
[AB#47310](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/47310)
-------------------------------------------------------------------
### Summary
when SQL Server fails to come up in CI, the pipeline either does not
fail at all or fails without saying why. this makes all eight readiness
loops behave the same way.
two of the eight never failed. the macOS one and the CodeCoverageReport
one polled in a loop whose exit status is the final `sleep 2`, so the
step reported success even when every probe failed. build 166760 hit
this on macOS: the container died on startup, all 30 probes logged
`container ... is not running`, the step went green, and pytest then ran
32.6 minutes against a database that did not exist, erroring on every
db-backed test from the 1% mark while the non-db tests passed. #723 has
since fixed the macOS half as part of the setup parallelization, so what
is left here is CodeCoverageReport.
the other six linux distro legs do fail, through `CREATE DATABASE
TestDB` right after the loop, but you only get a sqlcmd connect error.
nothing anywhere in the pipeline captures `docker logs`, so when the
container exits on its own (SA password policy, EULA, OOM, port already
bound) the reason is never recorded. that is why 166760's root cause is
still unknown.
every site now tracks readiness in a flag, probes once more after the
loop, and on failure prints the attempt count followed by `docker logs
--tail 200` before exiting non-zero. the extra probe matters because the
loop sleeps after its final attempt, so SQL can become reachable in that
window and would otherwise be called a hard failure.
verified locally against real containers: a container that prints a
startup error and exits now surfaces that error instead of only the
connect failure, a healthy container is unaffected, and a container that
becomes reachable only after the loop is rescued by the re-probe.
healthy macOS runs use 3 to 6 of the 30 attempts, so the gate keeps
roughly 5x headroom and no green run changes behaviour.
---------
Co-authored-by: Gaurav Sharma <223556219+Copilot@users.noreply.github.com>1 parent 8a9cdcb commit acdb9be
1 file changed
Lines changed: 144 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
562 | 576 | | |
| 577 | + | |
| 578 | + | |
563 | 579 | | |
564 | 580 | | |
565 | 581 | | |
| |||
768 | 784 | | |
769 | 785 | | |
770 | 786 | | |
| 787 | + | |
771 | 788 | | |
772 | 789 | | |
773 | 790 | | |
| |||
776 | 793 | | |
777 | 794 | | |
778 | 795 | | |
| 796 | + | |
779 | 797 | | |
780 | 798 | | |
781 | 799 | | |
782 | 800 | | |
783 | 801 | | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
784 | 818 | | |
785 | 819 | | |
786 | 820 | | |
| |||
1097 | 1131 | | |
1098 | 1132 | | |
1099 | 1133 | | |
| 1134 | + | |
1100 | 1135 | | |
1101 | 1136 | | |
1102 | 1137 | | |
| |||
1105 | 1140 | | |
1106 | 1141 | | |
1107 | 1142 | | |
| 1143 | + | |
1108 | 1144 | | |
1109 | 1145 | | |
1110 | 1146 | | |
1111 | 1147 | | |
1112 | 1148 | | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
1113 | 1165 | | |
1114 | 1166 | | |
1115 | 1167 | | |
| |||
1327 | 1379 | | |
1328 | 1380 | | |
1329 | 1381 | | |
| 1382 | + | |
1330 | 1383 | | |
1331 | 1384 | | |
1332 | 1385 | | |
| |||
1335 | 1388 | | |
1336 | 1389 | | |
1337 | 1390 | | |
| 1391 | + | |
1338 | 1392 | | |
1339 | 1393 | | |
1340 | 1394 | | |
1341 | 1395 | | |
1342 | 1396 | | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
1343 | 1413 | | |
1344 | 1414 | | |
1345 | 1415 | | |
| |||
1554 | 1624 | | |
1555 | 1625 | | |
1556 | 1626 | | |
| 1627 | + | |
1557 | 1628 | | |
1558 | 1629 | | |
1559 | 1630 | | |
| |||
1562 | 1633 | | |
1563 | 1634 | | |
1564 | 1635 | | |
| 1636 | + | |
1565 | 1637 | | |
1566 | 1638 | | |
1567 | 1639 | | |
1568 | 1640 | | |
1569 | 1641 | | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
1570 | 1658 | | |
1571 | 1659 | | |
1572 | 1660 | | |
| |||
1785 | 1873 | | |
1786 | 1874 | | |
1787 | 1875 | | |
| 1876 | + | |
1788 | 1877 | | |
1789 | 1878 | | |
1790 | 1879 | | |
| |||
1793 | 1882 | | |
1794 | 1883 | | |
1795 | 1884 | | |
| 1885 | + | |
1796 | 1886 | | |
1797 | 1887 | | |
1798 | 1888 | | |
1799 | 1889 | | |
1800 | 1890 | | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
1801 | 1907 | | |
1802 | 1908 | | |
1803 | 1909 | | |
| |||
2041 | 2147 | | |
2042 | 2148 | | |
2043 | 2149 | | |
| 2150 | + | |
2044 | 2151 | | |
2045 | 2152 | | |
2046 | 2153 | | |
| |||
2049 | 2156 | | |
2050 | 2157 | | |
2051 | 2158 | | |
| 2159 | + | |
2052 | 2160 | | |
2053 | 2161 | | |
2054 | 2162 | | |
2055 | 2163 | | |
2056 | 2164 | | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
2057 | 2181 | | |
2058 | 2182 | | |
2059 | 2183 | | |
| |||
2510 | 2634 | | |
2511 | 2635 | | |
2512 | 2636 | | |
| 2637 | + | |
2513 | 2638 | | |
2514 | | - | |
| 2639 | + | |
2515 | 2640 | | |
2516 | 2641 | | |
2517 | 2642 | | |
2518 | 2643 | | |
2519 | | - | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
2520 | 2648 | | |
2521 | 2649 | | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
2522 | 2664 | | |
2523 | 2665 | | |
2524 | 2666 | | |
| |||
0 commit comments