Skip to content

[Data] Run HiveServer2 integration tests in premerge CI - #67144

Merged
richardliaw merged 11 commits into
ray-project:masterfrom
Chang-Tong:data/hive-integration-ci
Nov 6, 2026
Merged

richardliaw merged 11 commits into
ray-project:masterfrom
Chang-Tong:data/hive-integration-ci

Conversation

@Chang-Tong

@Chang-Tong Chang-Tong commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds the HiveServer2 integration tests to premerge CI. These tests were previously marked manual.

The job starts Hive 4.2.0, waits for a SQL query to succeed, runs the tests, and cleans up the service. It uses the existing Data integration image with Impyla installed and skips docstring-only PRs.

Related issues

Fixes #67042. Follow-up to #66573. No other open PR was found covering this CI setup.

Testing

  • python -m pytest -q ci/ray_ci/data/test_run_hive_integration.py — 14 passed, including cleanup failures and already absent resources.
  • python -m pytest -q python/ray/data/tests/datasource/test_hive.py — 17 passed.
  • python -m pytest -q python/ray/data/tests/datasource/test_hive_lifecycle.py python/ray/data/tests/datasource/test_hive_no_replay.py — 18 passed.
  • CI routing checks: 166 passed. Pre-commit checks, pipeline YAML parsing, and git diff --check passed.
  • Linux run against Hive 4.2.0: python -m pytest -v -rs python/ray/data/tests/datasource/test_hive_integration.py — 3 passed, 1 skipped. TLS is skipped because the fixture uses PLAIN/NONE authentication without TLS.

Ray tests used this branch's Python code with nightly Ray Core wheels. The linked Linux run used host pytest and Dockerized Hive; it did not exercise the full Buildkite Docker/Bazel path.

AI tools assisted with the code and tests.

@Chang-Tong
Chang-Tong marked this pull request as ready for review October 19, 2026 08:47
@Chang-Tong
Chang-Tong requested review from a team as code owners October 19, 2026 08:47

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces HiveServer2 integration tests to the Data pipeline by adding a new bash script (run_hive_integration.sh) to orchestrate a disposable HiveServer2 Docker container, along with a Python test suite (test_run_hive_integration.py) to verify its behavior. It also updates Buildkite configurations, Bazel targets, and dependencies (adding impyla). Feedback on the changes suggests running the timeout command on the host rather than inside the container to avoid relying on container utilities, and using textwrap.dedent to improve the readability of the inline Python script in the test file.

Comment thread ci/ray_ci/data/run_hive_integration.sh Resolved
@ray-gardener ray-gardener Bot added data Ray Data-related issues devprod community-contribution Contributed by the community labels Oct 19, 2026
Comment thread ci/ray_ci/data/run_hive_integration.sh Resolved
Comment thread ci/ray_ci/data/run_hive_integration.sh Resolved
RayCI mounts the host's /tmp/artifacts at /artifact-mount in the Forge job
container, so the previous default wrote the Hive server and readiness logs
outside the artifact mount and they were lost after the build. Default to
/artifact-mount/hive so a failing run's logs are retained as downloadable
build artifacts; RAY_HIVE_LOG_DIR still overrides the location for local
debugging.

Signed-off-by: Silas <[email protected]>
@jiangxt2

Copy link
Copy Markdown
Contributor

No further concerns from my side. LGTM.

@abhishekverma-ray

Copy link
Copy Markdown
Contributor

This looks good — the cleanup verification is thorough, the orchestration tests are a nice
touch, and I agree with keeping timeout inside the container given what you found about
docker exec.

One thing before merging: the new Hive step hasn't actually run in Ray's CI yet. The PR's only
Buildkite run (microcheck 56757) has no Hive jobs and didn't build the datamongobuild image, so
the impyla change hasn't been compiled either. Looks like the full premerge pipeline just hasn't
been triggered on this PR — I'll kick it off so we can see the step pass for real. Once it's
green I'm happy to approve.

(FYI for later: #67114's direct-read tests need HDFS/S3, so they'll stay manual even with this
fixture — no conflict, just noting it.)

Comment thread ci/ray_ci/data/run_hive_integration.sh Resolved
@abhishekverma-ray abhishekverma-ray added the go add ONLY when ready to merge, run all tests label Oct 22, 2026
apache/hive:4.2.0 could be republished upstream, and the Beeline readiness
probe depends on the image's exact JDK. Pin the manifest list digest so the
fixture stays reproducible, and assert the pin in the orchestration tests.

Signed-off-by: Silas <[email protected]>
@Chang-Tong

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough look. The image is now pinned by digest in 7c85f4e, which triggered a fresh premerge run — the Hive step will be exercised with the exact pinned image. Good to know about #67114's HDFS/S3 tests staying manual; no overlap with this fixture.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 7c85f4e. Configure here.

Comment thread ci/ray_ci/data/run_hive_integration.sh Resolved

Copy link
Copy Markdown
Contributor

(FYI for later: #67114's direct-read tests need HDFS/S3, so they'll stay manual even with this fixture — no conflict, just noting it.)

Thanks for the clarification. Once #67114 and the follow-up PRs tracked by #67182 (Hive partitions) and #67183 (Iceberg/Delta tables) are merged, I'll add CI coverage for direct mode.

@abhishekverma-ray abhishekverma-ray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved!

@Chang-Tong

Copy link
Copy Markdown
Contributor Author

Premerge #75397 is fully green, including the new data: HiveServer2 integration tests step — it ran with the pinned Hive image and its logs were retained as build artifacts. @abhishekverma-ray @jiangxt2 — I believe this covers everything you flagged; could you take another look when you have a moment?

@richardliaw

Copy link
Copy Markdown
Contributor

hmm, i'm not sure this is the right way to do this. Is the main thing that you need to start a hive server during the testing?

cc @elliot-barn for review

@jiangxt2

Copy link
Copy Markdown
Contributor

hmm, i'm not sure this is the right way to do this. Is the main thing that you need to start a hive server during the testing?

cc @elliot-barn for review

Hi @richardliaw I think the main requirement is to make a real HS2 service available in CI so the existing read_hive integration tests can run automatically. Mocks alone cannot validate actual query execution and type conversion through the Hive client. The isolated, disposable service in this PR seems reasonable for that purpose and could also support follow-up projection, filter, and limit pushdown tests. With additional storage setup, it could also support direct-read tests.

@richardliaw

Copy link
Copy Markdown
Contributor

OK got it.

@richardliaw
richardliaw merged commit 752ed93 into ray-project:master Nov 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community data Ray Data-related issues devprod go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Data] Run HiveServer2 integration tests in CI

5 participants