Skip to content

fix(runtime): surface pip bootstrap errors in llm runtime setup - #3253

Merged
Daniel Meppiel (danielmeppiel) merged 1 commit into
mainfrom
danielmeppiel/fix-llm-venv-bootstrap
Oct 16, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 1 commit into
mainfrom
danielmeppiel/fix-llm-venv-bootstrap

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

Description

apm runtime setup llm still fails in the release-gate test_dual_runtime_installation on Linux arm64/x86_64 and macOS arm64 (dispatch run 38900193538, after #3251) with only ensurepip ... returned non-zero exit status 1, because python3 -m venv captures ensurepip's output. It does not reproduce locally with the same CI-built binary.

setup-llm.sh now creates the venv with --without-pip, then runs ensurepip --upgrade --default-pip as its own visible step and names the python3 in use. Users get the actual cause; the next release-gate dispatch will show it if the failure persists.

Issue and approved scope

Issue: N/A -- maintainer-directed CI repair blocking the v0.34.0 release (#3250); follow-up to #3251.

Human scope-approval comment: Daniel Meppiel (@danielmeppiel) directed in-session: "loop and bypass merge PRs until they're fixed and we know that the release workflow would pass".

Does this PR complete the issue, or what remains? Diagnostic + equivalent bootstrap; a post-merge manual-build-release dispatch verifies.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally

  • All existing tests pass

  • Added tests for new functionality (if applicable)

  • bash -n scripts/runtime/setup-llm.sh; ran the script twice against a fresh temp HOME -- both exit 0 (fresh and re-run).

  • uv run --extra dev pytest tests/integration/test_tls_r3_verify.py tests/unit -k "llm or setup_llm or runtime" -- pass.

Spec conformance (OpenAPM v0.1)

  • Spec edit: docs/src/content/docs/specs/openapm-v0.1.md updated
    (new/changed <a id="req-XXX"></a> anchor + prose + Appendix C
    row).
  • Manifest edit: docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.yml
    updated.
  • Test edit: a @pytest.mark.req("req-XXX") test under
    tests/spec_conformance/ added or extended.
  • CONFORMANCE.{md,json} regenerated via
    uv run --extra dev python -m tests.spec_conformance.gen_statement
    and committed.
  • N/A -- this PR does not change OpenAPM-observable behaviour.

`python3 -m venv` captures ensurepip output, so `apm runtime setup llm`
failures only reported "returned non-zero exit status 1". Create the venv
without pip and bootstrap pip as a visible step that names the python3 in
use, so the real cause reaches users and the release-gate CI log.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 761bf207-57da-41d0-bd3f-ffecbb97b83a

Copilot AI 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.

🟢 Approval recommended

The narrow diagnostic change preserves immediate failure handling, with no blocking issues identified.

0 open findings

What changed in this PR

Improves LLM runtime setup diagnostics to help investigate the release-gate failure remaining after #3251.

Changes:

  • Separates virtual environment creation from pip bootstrapping so ensurepip errors remain visible.
  • Reports the selected Python executable and exits explicitly when either step fails.
File Description
scripts/​runtime/​setup-llm.sh Adds a visible pip bootstrap step and contextual failure messages.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 0495ced into main Oct 16, 2026
21 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel/fix-llm-venv-bootstrap branch October 16, 2026 13:07
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