GoogleContainerTools / GoogleContainerTools/skaffold

FR: skaffold init --force should do it's best to automatically resolve builder/image pairs

Open
#4,912 2 comments 0 reactions 0 assignees View on GitHub
area/init area/onboarding kind/feature-request planning/Q4-21 priority/p2
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

When running `skaffold init --force` on a project with multiple images and builders, it would be nice if skaffold didn't error out because it can't resolve the pairings
```
❯ skaffold init --force
unable to automatically resolve builder/image pairs; run `skaffold init` without `--force` to manually resolve ambiguities
```

It would be nice to have skaffold make some decision automatically, even if that means just pairing things in order of the lists that skaffold uses to keep track of the builders/images.

What would be really nice is it skaffold does some kind of string matching between the builder path and image name. For example, in this case
```
❯ skaffold init --analyze
{"dockerfiles":["leeroy-app/Dockerfile","leeroy-web/Dockerfile"],"images":["leeroy-app","leeroy-web"]}
```
"leeroy-app/Dockerfile" would get paired with "leeroy-app" and so on because of the similarity between the strings.

Perhaps something like https://github.com/xrash/smetrics could be used for this? Or a simple contains check?

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.