Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Old sync config stops working #2280

Closed
dgageot opened this issue Jun 18, 2019 · 1 comment · Fixed by #2287
Closed

Old sync config stops working #2280

dgageot opened this issue Jun 18, 2019 · 1 comment · Fixed by #2287
Labels
area/sync kind/bug Something isn't working priority/p0 Highest priority. We are actively looking at delivering it.

Comments

@dgageot
Copy link
Contributor

dgageot commented Jun 18, 2019

I had this sync config working with skaffold beta8:

apiVersion: skaffold/v1beta8
kind: Config
build:
  artifacts:
  - image: myimage
    sync:
      public/*: /app/public

It stopped working with v0.31.0. Looks like when I change a file under public, it's synced to /app/public/public/.

To fix it, I changed the skaffold.yaml to:

apiVersion: skaffold/v1beta11
kind: Config
build:
  artifacts:
  - image: myimage
    sync:
      manual:
      - src: public/*
        dest: /app

Can we do something to fix the backward compatibility?

ping @corneliusweig @balopat

@dgageot dgageot added kind/bug Something isn't working area/sync priority/p0 Highest priority. We are actively looking at delivering it. labels Jun 18, 2019
@corneliusweig
Copy link
Contributor

The root cause of this issue is that the former default for sync was to flatten nested directories at the destination, e.g. for public/*: /app/public:

public/a -> /app/public/a

or when using double-star public/**: /app/public:

public/A/B/c -> /app/public/c
public/A/b -> /app/public/b
public/a -> /app/public/a

The latter behavior was a bit surprising for most users.


We do give a warning about this breaking change when encountering a double-star pattern. However, I was not aware, that this could also break single-star patterns. I think I can provide a fix for single-star patterns, because they should be reproducible with the new config.
On the other hand, double-star patterns cannot be ported correctly and that was a deliberate break of the existing API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sync kind/bug Something isn't working priority/p0 Highest priority. We are actively looking at delivering it.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants