GoogleContainerTools / GoogleContainerTools/skaffold

Images not found in remote registry

Open
#3,849 8 comments 4 reactions 0 assignees View on GitHub
area/cache area/ux kind/bug platform/windows priority/p3
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

Im trying to speed up build time for my project. I have a monorepo inlcuding frontend and backend and use the `TreeSha` tagger to detect changes made to each component individually. If i make frontend changed, backend is tagged with the same tag as before and therefore should skip the building process, but it doesnt.

### Expected behavior
After tagging, skaffold checks cache to see if the image (same tag) already exists and skips build.

### Actual behavior
skaffold doesnt find cached image in remote registry and builds it everytime (same tag). When i check in the google cloud registry i can find the image with the exact same tag

```
Generating tags...
- api -> gcr.io/$PROJECT_ID/api:da9312ba3078e4020b8eaf8252793f3e3b26e9b9
- frontend-client -> gcr.io/$PROJECT_ID/frontend-client:e9893689bc634abfcf7869d9f6de0bfa92f5fabe
- chromecast -> gcr.io/$PROJECT_ID/chromecast:b982cd13d946e4b2dc0884104707540d7ba02a1e
Checking cache...
- api: Not found. Building
- frontend: Not found. Building
```

### Information

- Skaffold version: version 1.5
- Operating system: windows/google cloud build
- Contents of skaffold.yaml:

```yaml
apiVersion: skaffold/v2alpha4
kind: Config
build:
tagPolicy:
gitCommit:
variant: TreeSha
artifacts:
- image: api
context: ./backend
- image: frontend
context: ./frontend
profiles:
- name: production
build:
googleCloudBuild:
projectId: $PROJECT_ID
```

### Steps to reproduce the behavior

`skaffold build -p production --default-repo=gcr.io/$PROJECT_ID`

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.