-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
git resolver does not work with repositories with a symlink #7561
Comments
@concaf if this is due to wt := osfs.New(dir, osfs.WithBoundOS())
dotfs, err := wt.Chroot(git.GitDirName)
if err != nil {
return nil, err
}
store := filesystem.NewStorage(dotfs, cache.NewObjectLRUDefault())
repository, err := git.Clone(store, wt, &git.CloneOptions{
URL: repositoryName,
Progress: os.Stdout,
Depth: 1,
}) This will become the default behaviour on V6. For more information, please refer to the comment above. |
@pjbgf we are using |
@vdemeester would you be able to test this using the existing code against the latest pseudo version for |
yes, I think I could 👼🏼 |
@pjbgf wonderful, it is fixed 🙃 thanks ❤️ |
@vdemeester nice, glad to hear that worked out. 🙌 As for the release, unfortunately I don't have permission to cut releases within |
Expected Behavior
a symlink being present in the remote git repo should be inconsequential for the git resolver to function
Actual Behavior
if the remote git repo has a symlink, then the remote resolution fails with the error -
the resolution request shows this as well, but i don't have the output - i do have logs from the remote-resolvers pod though -
{"severity":"error","timestamp":"2024-01-11T11:41:49.669Z","logger":"controller","caller":"controller/controller.go:566","message":"Reconcile error","commit":"e59ee42","knative.dev/traceid":"e14854a9-45fe-4120-a304-5b287fd5e39e","knative.dev/key":"default/git-3bfb7d8d2e23690240e63c76dce6902f","duration":1.072205099,"error":"error getting \"Git\" \"default/git-3bfb7d8d2e23690240e63c76dce6902f\": checkout error: worktree contains unstaged changes","stacktrace":"knative.dev/pkg/controller.(*Impl).handleErr\n\tknative.dev/[email protected]/controller/controller.go:566\nknative.dev/pkg/controller.(*Impl).processNextWorkItem\n\tknative.dev/[email protected]/controller/controller.go:543\nknative.dev/pkg/controller.(*Impl).RunContext.func3\n\tknative.dev/[email protected]/controller/controller.go:491"}
Steps to Reproduce the Problem
note the symlink in my remote repo at https://github.com/concaf/tmp/tree/test/kedge-blog
when you create the pipelinerun, note the error in tekton resolvers pod and the resolution request:
Additional Info
Kubernetes version:
Output of
kubectl version
:while speaking with @vdemeester, he pointed out that this might be caused by go-git/go-git#511
The text was updated successfully, but these errors were encountered: