1
0
Fork 0
mirror of https://github.com/imjasonh/terraform-playground synced 2026-07-17 06:32:47 +00:00
Commit graph

9 commits

Author SHA1 Message Date
Cursor Agent
971e955c35
wheelhouse: don't build sdists; fail fast and direct to --find-links pre-built wheels
Building sdists runs dependency build code on the host (RCE surface, no
sandbox), is non-hermetic/non-reproducible, needs a toolchain, and is
host-arch-only for compiled packages -- all at odds with pymage's guarantees.
Remove the builder and --build-sdists opt-in; keep sdist parsing only so the
error can explain the package is sdist-only and point at the --find-links
pre-build workflow.

Co-authored-by: Jason Hall <imjasonh@users.noreply.github.com>
2026-06-11 01:50:41 +00:00
Cursor Agent
872abd1ef7
wheelhouse: gate sdist building behind --build-sdists opt-in (RCE risk, single-arch)
Co-authored-by: Jason Hall <imjasonh@users.noreply.github.com>
2026-06-11 01:42:11 +00:00
Cursor Agent
7e8e2261a7
lock: evaluate PEP 508 markers and support --extra/--package in uv.lock closure
Co-authored-by: Jason Hall <imjasonh@users.noreply.github.com>
2026-06-11 01:30:45 +00:00
Cursor Agent
1f0ade9788
cache: make caching opt-out (default on) with --no-cache
Caching (layer blobs, downloaded wheels, base interpreter detection) is now
enabled by default at the per-user cache dir (or --cache-dir / $PYMAGE_CACHE_DIR).
--no-cache disables it: layer/meta caches off and wheels downloaded into an
ephemeral temp dir that's cleaned up after the build.

- setupCaches centralizes cache wiring (one cache.Cache serves layers + meta);
  --no-cache uses a temp wheel dir with cleanup
- DefaultCacheDir honors $PYMAGE_CACHE_DIR; cli tests point it at a temp dir so
  the on-by-default cache doesn't touch the user's cache
- tests: setupCaches (default + --no-cache cleanup); README/config updated

Co-authored-by: Jason Hall <imjasonh@users.noreply.github.com>
2026-06-11 00:42:36 +00:00
Cursor Agent
4100e12b20
perf: speed up no-op builds (resolve base once, cache interpreter detection)
A no-op build's ~2-3s was almost all registry I/O:
- the base index was fetched 3x (BasePlatforms + remote.Image per platform)
- the base's top layer was downloaded once per platform every build to read
  /etc/apko.json for interpreter detection (Chainguard has no PYTHON_VERSION)

Changes:
- build.BaseSet resolves the base reference once and serves per-platform child
  images memoized (index fetched once; verified by TestBaseSet)
- cache the detected interpreter version by base digest in a default per-user
  metadata cache (cache.GetText/PutText), so repeat builds skip the apko layer
  download
- lazy wheel-cache dir creation; wheelhouse.Resolve defaults to the per-user
  cache dir

Tests: TestBaseSet (index fetched once + per-platform memoized), TestCachedInterpreter
(write + cache-hit short-circuit), cache text round-trip.

Co-authored-by: Jason Hall <imjasonh@users.noreply.github.com>
2026-06-11 00:34:16 +00:00
Cursor Agent
a62051afb8
Address Copilot review: workdir-derived PYTHONPATH, wheel cache default, accurate messages
- src-layout PYTHONPATH is now derived from --workdir (project exposes SrcLayout;
  CLI computes <workdir>/src) instead of hard-coding /app/src
- wheelhouse.Resolve defaults to the per-user wheel cache dir so lock-based
  downloads work; cache dir creation is lazy so local-only resolution is hermetic
- --max-layers error message matches the accepted range (>= 0)
- DiscoverLock error lists requirements.lock too
- tests for the workdir-derived PYTHONPATH and python-prefix

Co-authored-by: Jason Hall <imjasonh@users.noreply.github.com>
2026-06-11 00:16:30 +00:00
Cursor Agent
1df0e423c5
push: set explicit, tunable concurrent layer uploads
go-containerregistry already uploads layers (and index children) concurrently,
but only at its default of 4. Set remote.WithJobs explicitly with an auto
default that scales with CPU count (floor 4), plus a --push-concurrency flag and
[tool.pymage] push-concurrency config to tune it.

Co-authored-by: Jason Hall <imjasonh@users.noreply.github.com>
2026-06-10 23:55:43 +00:00
Cursor Agent
8fa761a6b3
cli/config: --max-layers and --max-wheel-layers (TOML [tool.pymage]); docs
Default --layer-strategy is now 'auto'. Adds max-layers (default 127) and
max-wheel-layers config keys/flags with validation. Documents the layer budget
and reuse-stable bin packing in README and DESIGN.

Co-authored-by: Jason Hall <imjasonh@users.noreply.github.com>
2026-06-10 23:47:57 +00:00
Jason Hall
d587263759 lots of changes
Signed-off-by: Jason Hall <jason.hall@anysphere.co>
2026-06-10 17:05:36 -04:00