MemberJunction / MemberJunction/MJ

Workbench: add python3-venv to claude-dev image; make entrypoint clone-failure loud

Open
#3,167 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TSQL
Stars
29
Forks
6
Avg merge
2d 1h
Merged PRs (30d)
323

Description

## Summary
Two `docker/workbench` friction points cost debugging time during the v5.48 PG conversion. Both are quick hardening fixes.

### 1. `claude-dev` image lacks `python3-venv`
`/pg-migrate-*` needs a sqlglot venv (`python3 -m venv /tmp/sqlglot-venv`). The image ships `python3` but not `python3-venv`, so `python3 -m venv` fails with `ensurepip is not available` **and leaves a broken venv directory behind** — a subsequent `test -x .../bin/python3` can even pass against the stub, so it fails silently later. Workaround in the runbook is `apt-get install -y python3-venv python3-pip && rm -rf /tmp/sqlglot-venv` first.

**Ask:** add `python3-venv` (and `python3-pip`) to the `claude-dev` Dockerfile.

### 2. Entrypoint clone failure is silent
On a fresh container this session, `/workspace/MJ` was never cloned and `docker logs claude-dev` was empty — the entrypoint had reached its `tail -f /dev/null` keep-alive with no repo and no error surfaced. Had to clone manually.

**Ask:** make the clone step in `docker/workbench/entrypoint.sh` fail loudly (log the git error; don't fall through to keep-alive on a failed/absent clone).

### 3 (optional). `docker/workbench/.env.database` isn't created by `start.sh`
`docker-compose.yml` mounts + `env_file`s `.env.database`, but `start.sh` only creates `.env` from `.env.example`. A first-time user hits a missing-file error. Either add a `.env.database.example` + copy it in `start.sh`, or make the mount optional.

## Context
From the v5.48.0 release PG conversion. Runbook mitigations in #3165; these are the image/entrypoint-level fixes.

Contributor guide

Open the contributing guide

Research direction

Start with the claude-dev Dockerfile and docker/workbench/entrypoint.sh, then inspect start.sh and docker-compose.yml for the optional .env.database issue. Run the workbench startup flow and verify the image provides the requested Python packages, clone failures are logged without entering keep-alive, and first-time configuration no longer fails on the database env file.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, shell
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.