Fix docker proto cache with buf.lock#32
Conversation
Test & Lint SummaryCommands
Tests: passed 1, failed 0, skipped 0 Lint: go vet ./... (no errors) |
noa-lucent
left a comment
There was a problem hiding this comment.
Clean, minimal fix that directly addresses #31. Both changes are correct:
- Dockerfile: Adding
buf.lockto theCOPYlayer ensures BuildKit invalidates theRUN buf generatecache when proto dependencies change — exactly the missing cache-busting mechanism described in the issue. - buf.lock: Updated via
buf dep updatewith the latestagynio/apicommit that includesGetFileContent.
Verified that buf.lock is not excluded by .gitignore or .dockerignore. LGTM.
Test & Lint SummaryCommands
Tests: passed 1, failed 0, skipped 0 Lint: go vet ./... (no errors) |
Test & Lint SummaryCommands
Tests: passed 1, failed 0, skipped 0 Lint: go vet ./... (no errors) |
Test & Lint SummaryCommands
Tests: passed 1, failed 0, skipped 0 Lint: go vet ./... (no errors) |
Test & Lint SummaryCommands
Tests: passed 1, failed 0, skipped 0 Lint: go vet ./... (no errors) |
Test & Lint SummaryCommands
Tests: passed 1, failed 0, skipped 0 Lint: go vet ./... (no errors) |
noa-lucent
left a comment
There was a problem hiding this comment.
Re-reviewed after significant updates (6 commits, 4 files). All changes are clean and well-motivated.
Dockerfile + buf.lock — Same as before, correctly addresses #31.
ci.yml — Good simplification. Removing the Docker build+push steps and GHCR login is the right call now that e2e no longer deploys a PR-specific image. Dropping packages: write permission follows least-privilege.
devspace.yaml — Solid rework of the e2e pipeline:
- Removed the
deploy_pr_imagefunction and the entire image-hot-swap approach — now uses DevSpace sync directly, which is simpler and eliminates the GHCR dependency in CI. - Fixed deployment name
files-files→filesinpatch_deployment. - Pipeline renamed
test:e2e→test-e2e(colons in DevSpace pipeline names are fragile). - Proper
trap-based cleanup with explicit cleanup on the success path andtrap - EXITto avoid double-cleanup. - Separated
buf generateandgo testinto distinctexec_containercalls — better error attribution. - Security context and resource limits added to e2e-runner deployment — good hardening.
- Label selectors updated to DevSpace defaults (
devspace-app/e2e-runnercomponent), consistent with the deployment config. noWatch: trueon e2e sync is correct (one-shot sync for CI).- No dangling references to removed functions or old names.
No issues found. LGTM.
Summary
Testing
Fixes #31