gitattributes: make install/kubernetes driver match more specific.#43943
Merged
joestringer merged 3 commits intocilium:mainfrom Jan 27, 2026
Merged
Conversation
bimmlerd
approved these changes
Jan 23, 2026
Member
bimmlerd
left a comment
There was a problem hiding this comment.
LGTM. Nice catch, this is why auto conflict resolution is so scary 😞
giorio94
requested changes
Jan 23, 2026
Member
giorio94
left a comment
There was a problem hiding this comment.
Thanks for taking care of this. A couple of comments inline.
b718582 to
0cc5deb
Compare
giorio94
approved these changes
Jan 26, 2026
Member
giorio94
left a comment
There was a problem hiding this comment.
Thanks! Changes look reasonable to me based on my limited knowledge of merge drivers functioning. Only one suggestion inline.
Contributor
Author
I don't have much experience here either, but I'm hoping this fixes some of the obvious issues - we may need to revisit. It may also be hard to keep some of these path globs up to do indefinitely but let's see how this goes. |
0cc5deb to
2f0f97b
Compare
Contributor
Author
|
/test |
Our current drivers are matched on everything inside install/kubernetes. When you do `git merge ...`, git will check the return value of any matching drivers. In the case of the install/k8s dir we have the kubernetes-update driver. However, because this presumably completes and returns 0, this also papers over any legitimate conflicts. For example, if there is a conflict in cilium/values.yaml that requires regenerating, but also a legitimate conflict in another (non-generated) file then this will silently run the kubernetes-update driver commands and silently skip incoming changes for other files. This commit tries to make that matching more specific, by matching only on files we know get overwritten by code generation we avoid wrongly auto-merging other changes. Signed-off-by: Tom Hadlaw <tom.hadlaw@isovalent.com>
go.mod is not generated, therefore the go mod resolution driver won't correctly fix merge conflicts. This removes that line and leaves the auto merge driver to just match the go.sum/vendor files. Signed-off-by: Tom Hadlaw <tom.hadlaw@isovalent.com>
Similar to previous commits we avoid bad auto merges as well as reducing redundant code generation runs by matching individual api types with specific merge drivers that only run make generate-x-api commands relevant to the directory. Previously we would always run make-generate-apis multiple times which alongside performing incorrect auto-merges also takes a long time to complete. Signed-off-by: Tom Hadlaw <tom.hadlaw@isovalent.com>
2f0f97b to
9667438
Compare
Contributor
Author
|
/test |
6 tasks
6 tasks
2 tasks
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Our current drivers are matched on everything inside install/kubernetes. When you do
git merge ..., git will check the return value of any matching drivers.In the case of the install/k8s dir we have the kubernetes-update driver. However, because this presumably completes and returns 0, this also papers over any legitimate conflicts.
For example, if there is a conflict in cilium/values.yaml that requires regenerating, but also a legitimate conflict in another (non-generated) file then this will silently run the kubernetes-update driver commands and silently skip incoming changes for other files.
This commit tries to make that matching more specific, by matching only on files we know get overwritten by code generation we avoid wrongly auto-merging other changes.