acc: make acceptance tests work in Databricks development environments#5662
acc: make acceptance tests work in Databricks development environments#5662pietern wants to merge 1 commit into
Conversation
Waiting for approvalBased on git history, these people are best suited to review:
Eligible reviewers: Suggestions based on git history. See OWNERS for ownership rules. |
149eac3 to
5c5df59
Compare
5c5df59 to
dc7f93b
Compare
dc7f93b to
8f59ba8
Compare
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | ||
| with: | ||
| version: "0.8.9" | ||
|
|
There was a problem hiding this comment.
We now run uv find python from the Taskfile instead of assuming the right version exists.
This means we need to make sure uv is available before using the Taskfile.
Integration test reportCommit: a9da026
6 interesting tests: 5 flaky, 1 KNOWN
Top 1 slowest tests (at least 2 minutes):
|
The acceptance harness blocks external network access during tests. In some Databricks-internal development environments, local tooling issues network calls that trip the sandbox and fail the suite even though CI passes. Ignore the local probes that are not test traffic and disable the background beacons so tests behave the same as on CI. Also assert the external toolchain (jq, uv, ruff) and provision python via uv up front, so a missing or stale tool fails fast with a clear message. Co-authored-by: Isaac
8f59ba8 to
a9da026
Compare
denik
left a comment
There was a problem hiding this comment.
Thanks, failing early and with clear message is going to save a lot of time.
nit: binary version checking & localhost probe thing feel completely unrelated and both deserve each own PRs.
| if h, _, err := net.SplitHostPort(host); err == nil { | ||
| host = h | ||
| } | ||
| return host == "localhost" && r.Method == http.MethodHead && r.URL.Path == "/" |
There was a problem hiding this comment.
We set NO_PROXY=127.0.0.1,localhost in acceptance test runner, does not help?
| internal.RequireModernJq(t) | ||
| internal.RequireModernUv(t) | ||
| internal.RequireModernRuff(t) | ||
| internal.EnsureModernPython(t) |
There was a problem hiding this comment.
suggestion: instead of burying the version configuration (what is "modern"?), bring it to the surface here:
// Scripts use jq 1.7 features (the pick/1 builtin and the `.foo.[]` iteration syntax)
internal.RequireJQ(t, 1, 7)
internal.EnsurePython(t, "3.11")
internal.RequireRuff(t, 0, 9, 1)
internal.RequireUV(t, 0, 4)
This becomes single place to configure the versions, you can also add comments there why a certain version is required.
The acceptance harness blocks external network access during tests. In some Databricks-internal development environments, local tooling makes network calls that trip the sandbox and fail the suite (CI is unaffected), and a stale local toolchain produced confusing diffs instead of clear errors.
localhost) and disable the local background beacons, so behavior matches CI.jq,uv,ruff, andpython >= 3.11(provisioned viauv).Testing: full direct acceptance suite passes locally in a Databricks dev environment; unit tests for the tool checks and python provisioning included.
This pull request and its description were written by Isaac.