Skip to content
Open
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
4 changes: 2 additions & 2 deletions go/helper-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ARG GOVERSION=1.24
ARG GOVERSION=1.26
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

Go version 1.26 is not a valid or existing version. The current stable release is 1.24. This will cause the build to fail as the base image golang:1.26 cannot be pulled.

FROM --platform=$BUILDPLATFORM golang:${GOVERSION} AS delve
ARG BUILDPLATFORM
ARG TARGETOS
ARG TARGETARCH

ARG DELVE_VERSION=1.24.1
ARG DELVE_VERSION=1.26.1
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

Delve version 1.26.1 does not exist (current versions are ~1.24.x). The build will fail at line 19 when attempting to download the source archive from GitHub.


# Patch delve to make defaults for --check-go-version and --only-same-user
# to be set at build time. We must install patch(1) to apply the patch.
Expand Down
9 changes: 9 additions & 0 deletions go/skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ profiles:
docker:
buildArgs:
GOVERSION: '1.24'
- op: add
path: /build/artifacts/-
value:
image: go126app
context: test/goapp
docker:
buildArgs:
GOVERSION: '1.26'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Using Go version 1.26 here is inconsistent with available Go releases and skips version 1.25. If the intention was to add the next supported version, it should likely be 1.25 or a patch update for 1.24.


deploy:
kubectl:
Expand All @@ -105,6 +113,7 @@ profiles:
- test/k8s-test-go122.yaml
- test/k8s-test-go123.yaml
- test/k8s-test-go124.yaml
- test/k8s-test-go126.yaml

# release: pushes images to production with :latest
- name: release
Expand Down
89 changes: 89 additions & 0 deletions go/test/k8s-test-go126.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# This test approximates `skaffold debug` for a go app.
apiVersion: v1
kind: Pod
metadata:
name: go126pod
labels:
app: hello
protocol: dlv
runtime: go126
Comment on lines +1 to +9
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The naming convention and labels throughout this file use go126, which corresponds to the non-existent Go version 1.26. This file should be updated to reflect a valid Go version.

spec:
containers:
- name: go126app
image: go126app
args:
- /dbg/go/bin/dlv
- exec
- --log
- --headless
- --continue
- --accept-multiclient
# listen on 0.0.0.0 as it is exposed as a service
- --listen=0.0.0.0:56286
- --api-version=2
- ./app
ports:
- containerPort: 8080
- containerPort: 56286
name: dlv
readinessProbe:
httpGet:
path: /
port: 8080
volumeMounts:
- mountPath: /dbg
name: go-debugging-support
initContainers:
- image: skaffold-debug-go
name: install-go-support
resources: {}
volumeMounts:
- mountPath: /dbg
name: go-debugging-support
volumes:
- emptyDir: {}
name: go-debugging-support

---
apiVersion: v1
kind: Service
metadata:
name: hello-dlv-go126
spec:
ports:
- name: http
port: 8080
protocol: TCP
- name: dlv
port: 56286
protocol: TCP
selector:
app: hello
protocol: dlv
runtime: go126

---
apiVersion: batch/v1
kind: Job
metadata:
name: connect-to-go126
labels:
project: container-debug-support
type: integration-test
spec:
ttlSecondsAfterFinished: 10
backoffLimit: 1
template:
spec:
restartPolicy: Never
initContainers:
- name: wait-for-go126
image: kubectl
command: [sh, -c, "while ! curl -s hello-dlv-go126:8080 2>/dev/null; do echo waiting for app; sleep 1; done"]
containers:
- name: dlv-to-go126
image: skaffold-debug-go
command: [sh, -c, '
(echo bt; echo exit -c) > init.txt;
set -x;
/duct-tape/go/bin/dlv connect --init init.txt hello-dlv-go126:56286']