-
Notifications
You must be signed in to change notification settings - Fork 228
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
kpt doesn't work with symlinks #1544
Comments
We will see what it takes to get this to work but setting the priority to p2 for now since I have not seen this widely reported and I don't know if customers have mentioned this. |
I am seeing this issue as well, and it has become a blocker for us when trying to use kpt with an existing monorepo.
Addressing this TODO would fix the issue in our particular case, as the directory containing the symlink is external to where the kpt package is located. |
@mikebz Can we increase priority on this. Another customer has run into it. |
This essentially needs us to unify the path parsing logic all across kpt. As it stands, only few of the workflows leverage central path parsing logic. e.g I am working on identifying and fixing the leaks by unifying the path logic. |
Found a serious bug while working on this issue. If we trigger
I am investigating and working on the fix as part of this issue. Overall, this issue/feature will be included in the next kpt release. |
So I think this feature requires more than just making sure kpt follows symlinks. Some questions we should answer:
|
I see that the current use-case is only for the symlinks for the root package path. So we need not parse the symlinks for the underlying files/directories. This will avoid the security implications where directories/files within the package are pointing to the files outside the package. We just don't parse them. If needed we can develop those features incrementally based on the concrete use-cases we see in the future.
Since we are only concerned about the symlink to the root package directory, we can error out if the input symlink is broken.
We just don't support them.
I don't think this should be tied to git configs as there might be commands like kpt pkg init which doesn't need a git context at all. |
@phanimarupaka as @mortent has already mentioned the reasons that makes this problem lot harder. something related: in future, we want to support other location targets for packages such as OCI artifacts, GCS storage buckets and use of symlinks in the package makes it less portable. |
This feature will be supported in beta.5 release of kpt. |
@phanimarupaka Are you sure this is supported now? I'm on kpt
|
cc @droot |
@phanimarupaka @droot any update on support for this? The lack of symlink support makes it difficult to have different Kptfiles that rely on a common base. If you do not plan to support symlinks, how do you advise setting up environment-specific Kptfiles (e.g. separate Kptfiles for dev/stg/prd) that each rely on a common base configuration? |
Expected behavior
When working in a symlinked directory, kpt should behave normally and have commands process properly.
Actual behavior
kpt commands fail unpredictably when working in symlinked directories.
Information
v0.38.1
Steps to reproduce the behavior
kpt pkg get https://github.com/GoogleContainerTools/kpt/package-examples/helloworld-set hello2
ln -s hello2/ hello3
kpt cfg tree hello3/
)The text was updated successfully, but these errors were encountered: