Commit 1b7fecd
Fail fast on QWP token-provider failures
Address three review follow-ups in the OIDC device-flow client.
QwpQueryClient resolved the bearer token inside the per-endpoint
upgrade, so a token-provider failure (not signed in, a failed silent
refresh, a rejected token) was caught as a per-endpoint transport
error and reported as "all QWP endpoints unreachable", and the
provider was queried once per endpoint. Resolve the header once
before the endpoint walk in connect() and reconnectViaTracker() and
thread it through connectToEndpoint/runUpgradeWithTimeout, so a
provider failure - which is cluster-wide - propagates directly with
the provider's own message and the provider is queried once per
connect/reconnect. Strengthen testThrowingProviderFailsConnect to
assert the provider's own exception surfaces, not a wrapped
"unreachable" error.
Validate Builder.httpTimeoutMillis: a non-positive value gave an
already-expired read deadline and an unbounded recv(int), so reject
it like Sender.Builder already does. Add a test.
Drop the always-true scopeEncoded null check in tryRefresh: build()
defaults scope to DEFAULT_SCOPE, so append it unconditionally like
runDeviceFlow().
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 272d704 commit 1b7fecd
4 files changed
Lines changed: 52 additions & 20 deletions
File tree
- core/src
- main/java/io/questdb/client/cutlass
- auth
- qwp/client
- test/java/io/questdb/client/test/cutlass
- auth
- qwp/client
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1294 | 1294 | | |
1295 | 1295 | | |
1296 | 1296 | | |
1297 | | - | |
1298 | | - | |
1299 | | - | |
| 1297 | + | |
1300 | 1298 | | |
1301 | 1299 | | |
1302 | 1300 | | |
| |||
1421 | 1419 | | |
1422 | 1420 | | |
1423 | 1421 | | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
1424 | 1425 | | |
1425 | 1426 | | |
1426 | 1427 | | |
| |||
Lines changed: 25 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
684 | 684 | | |
685 | 685 | | |
686 | 686 | | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
687 | 692 | | |
688 | 693 | | |
689 | 694 | | |
| |||
702 | 707 | | |
703 | 708 | | |
704 | 709 | | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
705 | 716 | | |
706 | 717 | | |
707 | 718 | | |
708 | 719 | | |
709 | 720 | | |
710 | 721 | | |
711 | 722 | | |
712 | | - | |
| 723 | + | |
713 | 724 | | |
714 | 725 | | |
715 | 726 | | |
| |||
1401 | 1412 | | |
1402 | 1413 | | |
1403 | 1414 | | |
1404 | | - | |
| 1415 | + | |
1405 | 1416 | | |
1406 | 1417 | | |
1407 | 1418 | | |
| |||
1412 | 1423 | | |
1413 | 1424 | | |
1414 | 1425 | | |
1415 | | - | |
| 1426 | + | |
1416 | 1427 | | |
1417 | 1428 | | |
1418 | 1429 | | |
| |||
1730 | 1741 | | |
1731 | 1742 | | |
1732 | 1743 | | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
1733 | 1748 | | |
1734 | 1749 | | |
1735 | 1750 | | |
| |||
1742 | 1757 | | |
1743 | 1758 | | |
1744 | 1759 | | |
1745 | | - | |
| 1760 | + | |
1746 | 1761 | | |
1747 | 1762 | | |
1748 | 1763 | | |
| |||
1788 | 1803 | | |
1789 | 1804 | | |
1790 | 1805 | | |
1791 | | - | |
1792 | | - | |
1793 | | - | |
1794 | | - | |
1795 | | - | |
1796 | | - | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
1797 | 1811 | | |
1798 | 1812 | | |
1799 | 1813 | | |
| |||
1802 | 1816 | | |
1803 | 1817 | | |
1804 | 1818 | | |
1805 | | - | |
| 1819 | + | |
1806 | 1820 | | |
1807 | | - | |
1808 | 1821 | | |
1809 | 1822 | | |
1810 | 1823 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
269 | 283 | | |
270 | 284 | | |
271 | 285 | | |
| |||
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
217 | | - | |
| 216 | + | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
230 | 233 | | |
| 234 | + | |
231 | 235 | | |
232 | 236 | | |
233 | 237 | | |
| |||
0 commit comments