Commit 6af75b8
authored
Replace remaining real-domain test hosts with .test (#5189)
## Summary
Follow-up to #5125 (Replace bar.com with bar.test in tests). The same
footgun lived in many other test fixtures using real-resolving `.com`
domains in `Config.Host`, `databricks.yml`'s `workspace.host`, and
`.databrickscfg`: `foo.com`, `test.com`, `test2.com`, `myhost.com`,
`myworkspace.com`, `x.com`, `a.com`, `www.host[12].com`,
`other.host.com`.
## Why this surfaced now
The SDK started calling `resolveHostMetadata` on every `Config` init in
[databricks/databricks-sdk-go#1542](databricks/databricks-sdk-go#1542)
(released in SDK v0.123.0). The CLI pulled this in via #4799 (bump
v0.120.0 → v0.126.0). The resolver performs an HTTP fetch against the
host's well-known endpoint with a retry loop. For non-resolving hosts
(`.test`, `.invalid`, etc.) it fails fast. For real domains it depends
on the network: a quick TCP RST or 404 also returns fast; a slow
handshake or silent drop triggers a 5-minute retry window.
Timeline of `task test (linux, direct)` job duration:
| Date | SHA | Duration | Notable |
|--------|-----------|----------|-------------------------------|
| Apr 16 | f711183 | 497s | SDK 0.127.0 bump |
| Apr 21 | a409f3d | 466s | SDK 0.128.0 bump |
| Apr 28 | 82aa1b9 | 494s | last fast run |
| Apr 29 | e84ed42 | 1077s | #5125 (bar.com -> bar.test) |
| Apr 30 | 2867a0e | 1205s | +10min vs baseline |
| May 6 | ec76b2e | 1178s | |
The 0.127.0 / 0.128.0 bumps did not move the needle — the resolver was
already live since the v0.126.0 bump in #4799. The +10min jump appeared
on Apr 29, which lines up with the GitHub Actions runner network
changing behavior toward these external domains — most likely a firewall
or egress-filtering change that stopped fast-failing the lookups,
turning every test that set a real-domain `Config.Host` into a 5-minute
stall.
#5125 fixed the bar.com family and recovered most of the regression.
`foo.com` lived in a separate file with a slightly different naming
convention and missed that sweep, leaving `TestFilesToSync_Everything*`
bleeding ~10min combined — the residual still visible above.
## What this PR does
- Mechanical `.com` → `.test` swap across all remaining test fixtures
that set a host. Same low-risk pattern as #5125.
- Includes the `cmd/root/bundle_test.go` set (`x.com` / `a.com` — both
real domains), the schema testdata pass files (`myworkspace.com`), and
the `cmd/auth` testdata fixture plus its consumers.
- Adds a rule to `AGENTS.md` / `CLAUDE.md` citing [RFC 2606
§2](https://datatracker.ietf.org/doc/html/rfc2606#section-2) so future
test fixtures use a non-resolving TLD by default.
## Test plan
- [x] `go build ./...` clean
- [x] Targeted packages pass: `bundle/config/validate`, `bundle/run`,
`libs/auth`, `libs/cmdctx`, `libs/template`, `cmd/auth`, `cmd/root`,
`bundle/deploy/terraform`, `bundle/internal/schema`
- [x] Watch `task test (linux, direct)` duration on this PR — expect
recovery to the ~470s baseline1 parent d64d08b commit 6af75b8
19 files changed
Lines changed: 66 additions & 64 deletions
File tree
- bundle
- config/validate
- deploy/terraform
- internal/schema/testdata/pass
- run
- cmd
- auth
- testdata
- root
- libs
- auth
- cmdctx
- template
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
| 285 | + | |
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| |||
0 commit comments