GoogleContainerTools / GoogleContainerTools/skaffold

`debug` should provide some notice that file changes are ignored

Open
#4,445 12 comments 0 reactions 0 assignees View on GitHub
area/deploy area/dev area/portforward help wanted kind/bug kind/friction priority/p3
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

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:

```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:
```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

1. run `skaffold dev`
2. make some code changes
3. check the logs to see that skaffold detected the change
4. run part of the code to see that the output is the newly changes code

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.