Skip to content

[Tech Debt] Harden Ollama install and bound runtime for integration-test CI jobs #889

Description

@weiqingy

Search before asking

  • I searched in the issues and found nothing similar.

Description

The it-java and it-python CI jobs fail intermittently for reasons unrelated to the code under test. A recent run shows both failure modes at once, with every unit-test job green.

1. The Ollama install step fails on a transient network blip. tools/start_ollama_server.sh pipes https://ollama.com/install.sh into sh. That upstream script probes for ollama-linux-${ARCH}.tar.zst with a curl --fail --silent --head, and on any failure of that single probe it falls through to a .tgz asset. Current releases publish only .tar.zst.tgz returns 404. So one flaky HEAD request turns into a hard failure:

>>> Downloading ollama-linux-amd64.tgz
curl: (22) The requested URL returned error: 404

gzip: stdin: unexpected end of file
tar: Child returned status 1
##[error]Process completed with exit code 2.

Two it-java jobs failed this way, before compiling or running a single test. Retrying the install would recover, since the underlying asset does exist.

2. The wrapper masks a failed download. In tools/start_ollama_server.sh, ret=$? is read after curl -fsSL ... | sh, so it captures the exit status of sh, not curl. Without pipefail, a failed curl leaves sh reading empty stdin and exiting 0 — CI then proceeds with no Ollama installed and fails later somewhere less obvious.

3. Integration jobs have no runtime bound. No job in ci.yml sets timeout-minutes. In the run above, it-python [python-3.12] [flink-2.2] hung and was killed at GitHub's 6-hour ceiling (6h0m16s), consuming shared runner capacity for a result that was knowable in minutes. A timeout-minutes on the integration jobs would surface the same failure far sooner.

Open question — the hang itself. In that job Ollama installed correctly, then llama-server crashed while serving qwen3:1.7b:

ollama._types.ResponseError: llama-server process has terminated: signal: segmentation fault (core dumped)

Every failing test there is Ollama-backed; the py4j errors are downstream of the dead model server. I don't yet have evidence for the root cause (upstream regression, runner memory, or model artifact). One option is pinning OLLAMA_VERSIONinstall.sh supports it, and the workflow already pins uv to 0.11.0 in the adjacent step — which would at least make the toolchain deterministic. I'd welcome opinions on whether that's worth doing, and on how the project wants to handle bumping such a pin.

If this direction sounds right, I'd propose splitting the work into two independent PRs: the retry plus pipefail fix in tools/start_ollama_server.sh, and the timeout-minutes addition in ci.yml.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

Labels

tech debt[Issue Type] User-unaware issues, such as code refactor and infrastructure maintenance.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions