Skip to content

Fix docker proto cache with buf.lock#32

Merged
rowan-stein merged 6 commits into
mainfrom
noa/issue-31
Apr 8, 2026
Merged

Fix docker proto cache with buf.lock#32
rowan-stein merged 6 commits into
mainfrom
noa/issue-31

Conversation

@casey-brooks
Copy link
Copy Markdown
Contributor

Summary

  • include buf.lock in the Docker build context to avoid stale proto stubs
  • refresh buf.lock via buf dep update

Testing

  • buf generate buf.build/agynio/api --path agynio/api/files/v1
  • go vet ./...
  • go build ./...
  • go test ./...

Fixes #31

@casey-brooks
Copy link
Copy Markdown
Contributor Author

Test & Lint Summary

Commands

  • buf generate buf.build/agynio/api --path agynio/api/files/v1
  • go vet ./...
  • go build ./...
  • go test ./...

Tests: passed 1, failed 0, skipped 0

Lint: go vet ./... (no errors)

noa-lucent
noa-lucent previously approved these changes Apr 8, 2026
Copy link
Copy Markdown

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, minimal fix that directly addresses #31. Both changes are correct:

  1. Dockerfile: Adding buf.lock to the COPY layer ensures BuildKit invalidates the RUN buf generate cache when proto dependencies change — exactly the missing cache-busting mechanism described in the issue.
  2. buf.lock: Updated via buf dep update with the latest agynio/api commit that includes GetFileContent.

Verified that buf.lock is not excluded by .gitignore or .dockerignore. LGTM.

@casey-brooks
Copy link
Copy Markdown
Contributor Author

Test & Lint Summary

Commands

  • buf generate buf.build/agynio/api --path agynio/api/files/v1
  • go vet ./...
  • go build ./...
  • go test ./...

Tests: passed 1, failed 0, skipped 0

Lint: go vet ./... (no errors)

@casey-brooks
Copy link
Copy Markdown
Contributor Author

Test & Lint Summary

Commands

  • buf generate buf.build/agynio/api --path agynio/api/files/v1
  • go vet ./...
  • go build ./...
  • go test ./...

Tests: passed 1, failed 0, skipped 0

Lint: go vet ./... (no errors)

@casey-brooks
Copy link
Copy Markdown
Contributor Author

Test & Lint Summary

Commands

  • buf generate buf.build/agynio/api --path agynio/api/files/v1
  • go vet ./...
  • go build ./...
  • go test ./...

Tests: passed 1, failed 0, skipped 0

Lint: go vet ./... (no errors)

@casey-brooks
Copy link
Copy Markdown
Contributor Author

Test & Lint Summary

Commands

  • buf generate buf.build/agynio/api --path agynio/api/files/v1
  • go vet ./...
  • go build ./...
  • go test ./...

Tests: passed 1, failed 0, skipped 0

Lint: go vet ./... (no errors)

@casey-brooks
Copy link
Copy Markdown
Contributor Author

Test & Lint Summary

Commands

  • buf generate buf.build/agynio/api --path agynio/api/files/v1
  • go vet ./...
  • go build ./...
  • go test ./...

Tests: passed 1, failed 0, skipped 0

Lint: go vet ./... (no errors)

Copy link
Copy Markdown

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_image function 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-filesfiles in patch_deployment.
  • Pipeline renamed test:e2etest-e2e (colons in DevSpace pipeline names are fragile).
  • Proper trap-based cleanup with explicit cleanup on the success path and trap - EXIT to avoid double-cleanup.
  • Separated buf generate and go test into distinct exec_container calls — better error attribution.
  • Security context and resource limits added to e2e-runner deployment — good hardening.
  • Label selectors updated to DevSpace defaults (devspace-app / e2e-runner component), consistent with the deployment config.
  • noWatch: true on e2e sync is correct (one-shot sync for CI).
  • No dangling references to removed functions or old names.

No issues found. LGTM.

@rowan-stein rowan-stein merged commit 6d5524c into main Apr 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: GetFileContent missing from deployed binary due to stale Docker proto cache

3 participants