Compare commits

...
Author SHA1 Message Date
Emil SimeonovandDevin <158243242+devin-ai-integration[bot]@users.noreply.github.com> 0f6866b4ce fix: use exec in setup-image to prevent subprocess hang
Replace shell pip invocation with exec so the shell process is replaced
by pip. When pip exits, the runner detects completion immediately,
avoiding hangs where pip's PEP 517 build subprocess holds the stdout
pipe open after pip itself has finished.

Also drops the 2>/dev/null redirect (errors should be visible) and uses
/opt/venv/bin/pip directly instead of sourcing activate.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-07 23:14:55 +02:00
emilandemil edd9d070df perf: skip dep resolution in setup-image with --no-deps
CI / validate (pull_request) Successful in 1m2s
CI / auto-merge (pull_request) Failing after 14m11s
CI images (ci-base, ci-quality, ci-full) already have all dependencies
pre-installed. The setup-image target was running 'pip install -e .[extras]'
which rechecks and reinstalls deps on every CI job, taking 25-30s.

With --no-deps, only the project itself is installed in editable mode (~1s).
Dependencies stay as-is from the image.

Also aligns devx[deploy] versions with infra's pyproject.toml pins
(boto3 1.43.44, cryptography 50.0.0) and adds bcrypt + PyJWT to the
deploy extra so the CI image has all infra deps pre-installed.
2026-08-07 20:59:32 +00:00
4 changed files with 15 additions and 4 deletions
+4 -1
View File
@@ -65,8 +65,11 @@ setup-release: $(VENV)/bin/activate .env
# Note: Not aliased to devx-setup-image because devx's own CI images may have
# an older devx.mak that doesn't yet define devx-setup-image. Consumer repos
# (grm, infra) can safely alias to devx-setup-image since they install devx from PyPI.
# Uses exec so the shell is replaced by pip — when pip exits, the step exits
# immediately, avoiding hangs from pip subprocesses holding the stdout pipe open.
setup-image:
@if [ -d /opt/venv ]; then ln -sf /opt/venv $(VENV); . $(VENV)/bin/activate && pip install --no-cache-dir -e . 2>/dev/null; \
@if [ -d /opt/venv ]; then ln -sf /opt/venv $(VENV); \
exec /opt/venv/bin/pip install --no-cache-dir --no-deps -e .; \
else echo "[setup-image] /opt/venv not found — falling back to setup-ci"; $(MAKE) setup-ci; fi
install-hooks:
+7 -2
View File
@@ -64,11 +64,16 @@ molecule = [
"ansible-core==2.21.1",
]
# Deploy tools (for infra staging/production deployments)
# Versions aligned with infra's pyproject.toml to avoid reinstalls on every CI job.
# bcrypt and PyJWT are infra deps not in devx core — included here so the CI
# image has them and setup-image can use --no-deps (skip dep resolution).
deploy = [
"ansible-core==2.21.1",
"boto3==1.43.37",
"boto3==1.43.44",
"docker==7.1.0",
"cryptography==49.0.0",
"cryptography==50.0.0",
"bcrypt==5.0.0",
"PyJWT==2.13.0",
]
# Full dev environment (local development)
dev = [
+3 -1
View File
@@ -64,9 +64,11 @@ def _install_in_image(
link.symlink_to(opt_venv)
# Build pip install command
# --no-deps: the CI image already has all dependencies pre-installed.
# We only need to install the project itself in editable mode.
spec = f".[{extras}]" if extras else "."
pip_bin = str(Path(venv_link) / "bin" / "pip")
cmd = [pip_bin, "install", "--no-cache-dir", "-e", spec]
cmd = [pip_bin, "install", "--no-cache-dir", "--no-deps", "-e", spec]
env = os.environ.copy()
try:
+1
View File
@@ -52,6 +52,7 @@ class TestInstallInImage:
mock_run.assert_called_once()
cmd = mock_run.call_args[0][0]
assert "--no-cache-dir" in cmd
assert "--no-deps" in cmd
assert "-e" in cmd
assert "." in cmd
# No extras → spec is "."