skaffold icon indicating copy to clipboard operation
skaffold copied to clipboard

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

Open vladimir-avinkin opened this issue 2 years ago • 1 comments

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

vladimir-avinkin avatar Mar 04 '22 13:03 vladimir-avinkin

thanks for opening this issue @vladimir-avinkin

CC @gsquared94 , we can move discussion on this issue to this thread

MarlonGamez avatar Mar 14 '22 19:03 MarlonGamez