-
Notifications
You must be signed in to change notification settings - Fork 74
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
verify-subtree.sh: relax check and ignore old content #8
Conversation
If for whatever reasons a repo already had a `release-tools` directory before doing a clean import of it with `git subtree`, the check used to fail because it found those old commits. This can be fixed by telling `git log` to stop when the directory disappears from the repo. There has to be a commit with removes the old content, because otherwise `git subtree add` doesn't work. Fixes: kubernetes-csi/external-resizer#21
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pohly The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
@pohly can you address comments here: I have been thinking some more about it. Does it make sense to use a content based diff for verifying subtree changes rather than git log based one? Something like: git remote add csi-release-tools_root https://github.com/kubernetes-csi/csi-release-tools.git It does mean all CSI repos must have latest version of release-tools. |
Exactly, and that is the problem. Each time we update the csi-release-tools master, the PR checks in all repos using it will start failing. Same for all old branches which have to be on an older revision (for example, because master adds new source code checks that older release do not pass). One could argue that this is intentional because it forces maintainers to drop everything they are doing and sync up with csi-release-tools. But I find that rather intrusive and for older branches it may not be right. Instead, the git diff could be against the revision that was imported. But determining that can only be done my parsing the commit messages, and that is probably not easier than the current approach. |
update owners
If for whatever reasons a repo already had a
release-tools
directorybefore doing a clean import of it with
git subtree
, the check usedto fail because it found those old commits.
This can be fixed by telling
git log
to stop when the directorydisappears from the repo. There has to be a commit with removes the
old content, because otherwise
git subtree add
doesn't work.Fixes: kubernetes-csi/external-resizer#21