Skip to content

Replace bar.com with bar.test in tests#5125

Merged
denik merged 1 commit intomainfrom
denik/bar-com
Apr 29, 2026
Merged

Replace bar.com with bar.test in tests#5125
denik merged 1 commit intomainfrom
denik/bar-com

Conversation

@denik
Copy link
Copy Markdown
Contributor

@denik denik commented Apr 29, 2026

bar.com is a real domain, so we have tests fetching databricks-config from it.

It is also faster to use non-existing domain.

bar.com is a real domain, so we have tests fetching databricks-config from it.

It is also faster to use non-existing domain.
@denik denik temporarily deployed to test-trigger-is April 29, 2026 14:06 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is April 29, 2026 14:06 — with GitHub Actions Inactive
@denik denik enabled auto-merge April 29, 2026 14:11
@denik denik disabled auto-merge April 29, 2026 14:55
@denik denik merged commit 4ad6ba3 into main Apr 29, 2026
24 of 25 checks passed
@denik denik deleted the denik/bar-com branch April 29, 2026 14:55
pietern added a commit that referenced this pull request May 6, 2026
## 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 | 4909238 | 497s     | SDK 0.127.0 bump              |
| Apr 21 | f2443de | 466s     | SDK 0.128.0 bump              |
| Apr 28 | 987c2d9 | 494s     | last fast run                 |
| Apr 29 | 4ad6ba3 | 1077s    | #5125 (bar.com -> bar.test)   |
| Apr 30 | 22be781 | 1205s    | +10min vs baseline            |
| May 6  | 9fc1f8d | 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 baseline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants