-
Notifications
You must be signed in to change notification settings - Fork 404
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
add static file paths option #867
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Hey, first of all, thanks for this contribution! In general when I've used ko and needed to get files in to kodata that aren't already, I just symlink them -- I'm a little worried about the semantics of supporting multiple static file paths. The rules around evaluation order and who wins can get difficult to implement, and more importantly difficult to document and test. I'm also not sure of the use case for this, but I'm interested to hear more. This would also be supported by the symlink flow, AFAIK, since you could In any case, thanks again for sending this, and I look forward to hearing more about your usage. (*except on Windows where there's a bug) |
|
I'd like to understand the issue with symlinks on Windows more before we build such a workaround for it. That's not to say we won't go the direction of this PR, just that I'd like to give symlinks on Windows another shot and see if we can support it after all. For instance, is the issue that running The symlink-skipping logic was added in #374 which added support for cross-compiling linux->windows, but it sounds like the real issue is just running
Symlinks are just special files, which get committed to your repo (example), so there shouldn't be any need for any setup on each CI run.
That's all well and good, but your conception of the semantics may not match someone else's idea, leading to surprises, so we'd need to document it thoroughly, and add examples and tests for lots of different cases. Adding this functionality may also lead to future feature requests to let folks change those semantics, because we've opened the door. Symlinks are (despite their issues on Windows...) fairly standard and well-known. You can inspect them to see exactly where they point. They're version-controlled files in the repo. Again, I'm not saying we won't support some form of a flag that lets you override |
And a followup: I've just tested a change that removes the special symlink handling code for Windows images, and runs the e2e test for it on a Windows CI runner, and it passes: https://github.com/imjasonh/ko/actions/runs/3321410053/jobs/5489018396 So perhaps symlinks on Windows do work? If it turns out they do, would this be a suitable solution to your issue? |
That's unfortunate. Windows' inconsistent/broken support for symlinks is pushing me toward having this supported in another way.
That's also a compelling argument. It's not so bad when there's 1-2 However, the fact that
Simple globs are well defined, e.g., Is your use case satisfied by having one |
Our use case, unfortunately for your proposal, contains both files and directories to be collected with following semantics of service
About the duality of definition, if i would do it - i'd made CLI parameters to extend config file or strip the ability of passing cli parameter at all. |
@imjasonh Hey! What do you think about our case? I suggest to strip the ability of passing cli parameter to simplify the problem. |
This Pull Request is stale because it has been open for 90 days with |
Added the ability to specify paths to static files that will be added to the kodata.
This can be useful, for example, for adding migrations and configs that are in different folders, so as not to add everything to the kodata folder.
Support glob syntax.