-
Notifications
You must be signed in to change notification settings - Fork 418
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-sync v4 fetches the HEAD of the remote default branch instead of master
if --ref is not specified
#841
Comments
Fun. The rationale for changing this was that most new fit repos are switching from "master" to "main" as the default branch. The reality is that branch and rev are redundant - it came from a lack of understanding of how git works. I will have to think hard about this. If you specify neither flag, is the default branch and unreasonable default? |
I think using the remote default branch makes sense if neither flag is specified, but it behaves differently from v3. Unlike #840, this change won't return any error, but cause a different set of contents being selected silently. |
So, on one hand this is simpler and it is a major version update, so people SHOULD beware. On the other hand, the failure mode could be nasty. Is it the case that people will blindly update from v3 to v4 in prod, without qualifying it? Is there no way to force them to pay attention? In hindsight, maybe having a default for --ref is a mistake, and we should force people to say "master" or "HEAD", but that would be ANOTHER breaking change, meaning v5. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
This is a breaking change in git-sync v4.
In git-sync v3, if neither
--branch
or--rev
is specified, it fetches the HEAD commit on the defaultmaster
branch.In git-sync v4, if
--ref
is not specified, if fetches the HEAD commit on the remote default branch, which may not bemaster
.Upgrading from v3 to v4 will cause different sets of contents being selected, which will lead to cascading issues (e.g. unexpected resource deletion in Config Sync).
The text was updated successfully, but these errors were encountered: