GoogleContainerTools / GoogleContainerTools/skaffold

With buildpack & auto sync a full re-build happens unpredictably

Open
#5,140 7 comments 0 reactions 0 assignees View on GitHub
help wanted kind/feature-request kind/friction planning/Q4-21 priority/p2
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

Tested using skaffold `1.17.2`

1) Clone the Cloud Code Go hello-world k8s sample: https://github.com/GoogleCloudPlatform/cloud-code-samples/tree/master/golang/go-hello-world
2) Configure your build to use buildpacks:
```
build:
tagPolicy:
sha256: {}
artifacts:
- image: go-hello-world
context: .
buildpack:
builder: gcr.io/buildpacks/builder:v1
```
3) Run skaffold dev
4) Make a change in `main.go`

**Expected**: Skaffolds auto-sync for buildpacks would automtically sync the change without performing a full container rebuild.

**Actual**: The full build happens.

**Note**: This only seems to happen unpredictably; in my tests, some changes sync, others trigger a full rebuild (the changes are identical each time - e.g. a simple `fmt.Println` string modification in this case).

[Example output](https://paste.googleplex.com/6448961318551552) (the first couple changes did a full rebuild, the last change synced).

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.