Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "Go Dev Container",
"build": {
"context": "..",
"dockerfile": "../dev/docker/devcontainer.Dockerfile"
},
"remoteEnv": {
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}",
"HOST_DOCKER_DEV_FOLDER": "${localWorkspaceFolder}/dev/docker"
},
"customizations": {
"vscode": {
"settings": {
"go.gopath": "/go",
"go.useLanguageServer": true
},
"extensions": [
"golang.go",
"ms-azuretools.vscode-docker"
]
}
},
"postCreateCommand": "go mod tidy",
"forwardPorts": [],
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/common-utils:2": {
"username": "vscode",
"installZsh": true
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": false
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Have you verified that docker commands succeed from inside the devcontainer in this repo?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ping on this

}
}
}
12 changes: 12 additions & 0 deletions dev/docker/devcontainer.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM golang:1.25

# Install golangci-lint
RUN curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.1.6

# Install buf CLI
RUN go install github.com/bufbuild/buf/cmd/buf@latest
Comment on lines +6 to +7
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

What is the latest stable version of buf CLI in March 2026?

💡 Result:

The latest stable version of the buf CLI in March 2026 is v1.66.1, released on 2026-03-09.

Citations:


🏁 Script executed:

# Check if the Dockerfile exists and examine the relevant lines
if [ -f "dev/docker/devcontainer.Dockerfile" ]; then
  echo "=== dev/docker/devcontainer.Dockerfile exists ==="
  head -20 dev/docker/devcontainer.Dockerfile
else
  echo "File not found: dev/docker/devcontainer.Dockerfile"
fi

Repository: xmtp/example-notification-server-go

Length of output: 429


🏁 Script executed:

# Check if proto/buf.gen.yaml exists and examine its content
if [ -f "proto/buf.gen.yaml" ]; then
  echo "=== proto/buf.gen.yaml exists ==="
  cat proto/buf.gen.yaml
else
  echo "File not found: proto/buf.gen.yaml"
fi

Repository: xmtp/example-notification-server-go

Length of output: 869


Pin the buf CLI version for reproducibility.

Using @latest risks breaking the build if buf CLI introduces breaking changes. The proto/buf.gen.yaml already pins specific plugin versions (e.g., buf.build/protocolbuffers/go:v1.36.6, buf.build/connectrpc/go:v1.19.1), so the CLI should also be pinned for consistency and reproducibility.

Proposed fix
 # Install buf CLI
-RUN go install github.com/bufbuild/buf/cmd/buf@latest
+RUN go install github.com/bufbuild/buf/cmd/buf@v1.66.1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Install buf CLI
RUN go install github.com/bufbuild/buf/cmd/buf@latest
# Install buf CLI
RUN go install github.com/bufbuild/buf/cmd/buf@v1.66.1
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@dev/docker/devcontainer.Dockerfile` around lines 6 - 7, Replace the
non-deterministic installation of buf (RUN go install
github.com/bufbuild/buf/cmd/buf@latest) with a pinned released tag; update the
Dockerfile line to use a specific buf CLI version (for example replace `@latest`
with `@vX.Y.Z`) so the build is reproducible and consistent with the pinned plugin
versions (identify the RUN line installing buf in the Dockerfile to change).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good call

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

How about now?


# Add shellcheck and jq
RUN apt-get update && apt-get install -y \
shellcheck \
jq
Loading