GoogleContainerTools/skaffold
View on GitHub`debug` should provide some notice that file changes are ignored
Open
#4,445 opened on Jul 6, 2020
area/deployarea/devarea/portforwardhelp wantedkind/bugkind/frictionpriority/p3
Description
Expected behavior
When code change, a code reload is made and the changed code reflects in the output.
Actual behavior
by running skaffold with verbosity DEBUG, I can see that skaffold detected some file changed but the result of the code doesn't appear as if the changes were applied.
Information
- Skaffold version: 1.12.0
- Operating system: Ubuntu 20.04 with minikube 1.11and kubectl 1.18
- Contents of skaffold.yaml:
apiVersion: skaffold/v2beta5
kind: Config
metadata:
name: url-shortener
build:
artifacts:
- image: url_shortener
context: shortener
docker:
dockerfile: build/docker/Dockerfile.dev
noCache: false
deploy:
kubectl:
manifests:
- shortener/deployments/kubernetes/shortener.yaml
- Contents of Dockerfile.dev:
FROM golang:1.14 AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o /app.o ./cmd/shortener/shortener.go
FROM alpine:3.12
COPY --from=builder /app.o ./
COPY --from=builder /app ./
EXPOSE 3000
ENV GOTRACEBACK=all
CMD ["./app.o"]
- Contents of shortener.yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: url-shortener-deployment
spec:
selector:
matchLabels:
app: url-shortener
template:
metadata:
labels:
app: url-shortener
spec:
containers:
- name: url-shortener
image: url_shortener
ports:
- containerPort: 3000
---
apiVersion: v1
kind: Service
metadata:
name: url-shortener-service
spec:
selector:
app: url-shortener
ports:
- port: 3000
nodePort: 30000
type: NodePort
skaffold debug message output
time="2020-07-05T22:51:08+02:00" level=debug msg="Found dependencies for dockerfile: [{go.mod /app true} {go.sum /app true} {. /app true}]"
time="2020-07-05T22:51:08+02:00" level=info msg="files modified: [shortener/internal/handler/rest/rest.go]"
Steps to reproduce the behavior
- run
skaffold dev - make some code changes
- check the logs to see that skaffold detected the change
- run part of the code to see that the output is the newly changes code