GoogleContainerTools / GoogleContainerTools/skaffold

Skaffold configs are duplicated when you use a config dependency via git

Open
#7,161 1 comment 0 reactions 0 assignees View on GitHub
area/modules kind/bug priority/p3
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

But if you use a local dependency (via `path`) it works fine
More context can be found in the discussion in kubernetes slack https://kubernetes.slack.com/archives/CABQMSZA6/p1645463031027819

### Expected behavior
I expect when ServiceA depends on ServiceB, and ServiceB depends on ServiceA via git and I run skaffold in either of those services they both came up online without issues
### Actual behavior
Because the config gets duplicated we effectively have three skaffold.yamls included in the finished "bundle", because of that skaffold fails

### Information

- Skaffold version: v1.35.2
- Operating system: Darwin MacBook-Pro-Vladimir.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
- Installed via: Homebrew
- Contents of skaffold.yaml:

https://github.com/vladimir-avinkin/skaffold-bug-serviceA
https://github.com/vladimir-avinkin/skaffold-bug-serviceB

### Steps to reproduce the behavior

1. Clone both repos into the same directory
2. Run `skaffold dev` in the skaffold-bug-serviceA directory
3. See an error similar to `invalid skaffold config: duplicate image "nginx" found in sources`
4. If you run `skaffold diagnose --yaml-only` you can see that we have 3 skaffold configs instead of two, and the config for the service where we have run skaffold is duplicated via git
5. Note if you switch a branch to `path` in both repositories and run `skaffold dev` it works just fine

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.