devspace-sh / devspace

DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
https://devspace.sh
Apache License 2.0
4.28k stars 359 forks source link

Sync download/uploadExcludeFile parsing #2077

Closed kickthemooon closed 1 year ago

kickthemooon commented 2 years ago

When using either download or uploadExcludeFile under dev.sync[*] with following .gitignore style entries

!/some/path/in/my/repo/

Devspace is complaining that !/some/path/in/my/repo/ should be used instead of !some/path/in/my/repo. But as you can see exactly that is used and when I use excludePaths instead of file the warnings disappear.

OS: Mac Catalina Devspace: 5.18.4 K8s: 1.20

FabianKramm commented 2 years ago

@kickthemooon thanks for creating this issue! Did you maybe use it like this:

- !/some/path/in/my/repo

Since ! is a special character in yaml, you need to use instead:

- "!/some/path/in/my/repo"
kickthemooon commented 2 years ago

@kickthemooon thanks for creating this issue! Did you maybe use it like this:

- !/some/path/in/my/repo

Since ! is a special character in yaml, you need to use instead:

- "!/some/path/in/my/repo"

The issue is about excludeFile i. e. When using an external file with a list of gitignore style items.

The issue is not about the config yaml file. In the config yaml file using excludePaths and quotes around the items everything seems to work fine

FabianKramm commented 2 years ago

@kickthemooon ah yeah sorry, my bad. Yes you are correct, seems like the function we use internally cuts those leading / from the exclude paths. We'll issue a fix for this shortly

FabianKramm commented 2 years ago

@kickthemooon this should be fixed with the new v6 beta version, can you confirm this?