-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
How to sync subtrees in 0.25.0? #1807
Comments
Loving Skaffold so far, but ran into this same issue. For my current project, I had to generate 64 lines of sync rules. Unfortunately the need to manage a large list of sync rules doesn't seem like a maintainable solution for my team. We're using PHP and in most cases sync is preferred over an image rebuild, simply due to speed. I suspect other users working with interpreted languages may have a similar preference. |
This issue seems like it was fixed: #1722 Update to skaffold v0.25.0 and try again. |
@michaelfig Would #1812 solve your issue too? |
@corneliusweig The #1812 PR is a terrific idea! I have to test it in my environment, but will do that and if it works for me, close the #1813 PR. Looking forward to comments from the code owners. |
Expected behavior
I want to sync subtrees like:
In 0.23.0, I could accomplish this simply with:
Actual behavior
0.25.0 (and 0.24.0) strips all path information from the destination files, so they all get collapsed and synced directly to
/usr/src/app/
(and not subdirectories of it). This is due to PR #1709.I would argue that PR #1709 broke working use-cases, because now the only way I know how to achieve this simple subtree mapping is to add explicit sync rules for every subdirectory in my project (!). The use-case that #1709 was trying to fix (collapsing certain subdirectories into a root) can be achieved by adding explicit rules for specific directories.
Docker does not support any kind of
**
glob match, so I would argue that skaffold's behaviour here should be more predictable (substituting the glob's match into the resulting destination path), rather than trying to follow some notion of how Docker'sCOPY
command works.Sync rules are not COPYs, they are tarball generators. I think recursive tar is the model that should be used for syncing, with its defaults of preserving paths unless explicitly pruned by a mapping.
Information
Steps to reproduce the behavior
skaffold dev
The text was updated successfully, but these errors were encountered: