GoogleContainerTools / GoogleContainerTools/skaffold
File sync is not triggered after re-deploying
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
### Expected behavior
I have a relatively large docker container that is expensive to build. The tagging policy is setup for just the commit sha as so:
```yaml
tagPolicy:
gitCommit:
variant: 'CommitSha'
```
This ensures that the container will only rebuild when I commit my changes.
The problem is if I kill my `dev` environment and restart it for any number of reasons, the incremental changes in my uncommitted git history are not synced after the deployment. Is it possible to do today or is this a new feature request?
### Actual behavior
`skaffold dev` starts the cached images but does not resync any local changes from my git commit history
### Information
- Skaffold version: `v2.5.1`
- Operating system: `MacOS v13.4` - M1
- Installed via: `Homebrew`
- Contents of skaffold.yaml:
```yaml
apiVersion: skaffold/v4beta5
kind: Config
metadata:
name: web
build:
platforms: ['linux/arm64']
tagPolicy:
gitCommit:
variant: 'CommitSha'
artifacts:
- image: my-image
context: .
sync:
manual:
- src: 'frontend/**'
dest: '/app'
- src: '**/*.js'
dest: '/app'
docker:
dockerfile: Dockerfile
target: 'frontend'
network: host
cacheFrom:
- 'my-image'
local:
push: true
tryImportMissing: true
useDockerCLI: false
useBuildkit: true
concurrency: 2
...
```
### Steps to reproduce the behavior
1. Have a clean repo
2. `skaffold dev`
3. Make a change, watch the file sync
4. Kill `skaffold dev`
5. Restart `skaffold dev` (make sure no new container is built)
6. Uncommitted changes from `git status` will not be synced
Contributor guide
Assessment
This issue has not been assessed yet.