feat(dev): add container dev runner - #1962
Conversation
961beaf to
e42dbf8
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #1962 +/- ##
============================================
+ Coverage 96.79% 96.82% +0.02%
============================================
Files 306 307 +1
Lines 17051 17182 +131
============================================
+ Hits 16505 16636 +131
Misses 546 546 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
e42dbf8 to
853e311
Compare
3f4e482 to
5caac75
Compare
5caac75 to
10cea59
Compare
10cea59 to
c6dd19b
Compare
c6dd19b to
cb1915e
Compare
cb1915e to
69d7548
Compare
|
|
||
| const runtimeName = input.runtime.name.toLowerCase(); | ||
| const projectId = hashString(resolve(input.projectRoot)); | ||
| const imageTag = `agentcore-dev/${runtimeName}-${projectId}`; |
There was a problem hiding this comment.
can we sanitize underscores when creating the image name, docker has rules here like only 2 consecutive underscore (runtimename can have many).
| input.signal.throwIfAborted(); | ||
|
|
||
| const buildArgs = input.runtime.customDockerBuildArgs ?? {}; | ||
| const buildArgFlags = Object.keys(buildArgs).flatMap((key) => ["--build-arg", key]); |
There was a problem hiding this comment.
finch does not forward arbitrary env vars into its VM, so --build-arg KEY loses the value.
should probably be --build-arg KEY=value
| ], | ||
| { | ||
| cwd: context, | ||
| env: { ...process.env, ...forwardedEnv }, |
There was a problem hiding this comment.
for docker specifically, build args and app env vars are passed into Docker’s own environment. names like DOCKER_HOST can change which Docker daemon is used so can we keep these values separate?
| signal.throwIfAborted(); | ||
| if (!hasVersion) continue; | ||
|
|
||
| const canBuild = await this.toolAvailable(tool, ["build", "--help"]); |
There was a problem hiding this comment.
while I was trying on my own system, it seems like this treats a failed finch build --help as an unavailable binary. it was installed but not initialized. It should instead suggest running finch vm init. this is also likely a bug in the current CLI but I would like to have it fixed here if possible!
Summary
ContainerDevRunnerfor Docker, Podman, and Finch builds.dockerignore, and map protocol-specific loopback portsStack
feat/dev-server-core; retarget torefactorafter feat(dev): CodeZip dev runner and process lifecycle core #1883 mergesVerification
bun test(1013 tests)bun test src/core/dev/(30 tests)bun run typecheckbun run lint:checkbun run format:checkbun run build