-
Notifications
You must be signed in to change notification settings - Fork 519
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
[Localization] Changing the merge to a Pseudo Force Push #11790
[Localization] Changing the merge to a Pseudo Force Push #11790
Conversation
✅ [PR Build] Tests passed on Build. ✅Tests passed on Build. API diff✅ API Diff from stable View API diffAPI & Generator diff✅ API Diff (from PR only) (no change) GitHub pagesResults can be found in the following github pages (it might take some time to publish): 🎉 All 81 tests passed 🎉Pipeline on Agent XAMBOT-1104.BigSur' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't sound right, it will delete any localization work that has been merged into the Localization
branch, so we'll lose localization work.
The idea of merging as you were doing previously is the correct one. There is the potential of conflict, but only if the same file has been modified in both the main
and the Localization
branch at the same time, and from what I understand of the process, this should never happen (the loc team will update *.lcl files in the Localization
branch, and those will never be updated manually in main
).
If you get conflicts in unrelated files, then there's something wrong somewhere.
I tried merging origin/main into origin/Localization locally, and I could reproduce the merge failures, and they're in unrelated files. The way to fix this is:
git fetch origin
git checkout Localization
git merge origin/main
- Fix the conflicts, choosing the
main
version for any file that shouldn't be modified in theLocalization
branch (basically any file that isn't an *.lcl file). git commit
# This will create a merge commit with the resolved conflicts. It's important that this is a merge commit, because then git will understand that at this point these two branches have been merged. If it's not a merge commit, git will just think the branches have diverged even more, and you'll get more merge conflicts in the future.- Verify that the only files in the
Localization
branch that are different frommain
are *.lcl files:git diff origin/main --name-only
. - If there are any other files, those files need to be modified to match the version in main, and then you will have to amend the merge commit you just did:
git add path/to/file
git commit --amend
(just close the commit message dialog you get, no need to change it)- Go to 6. and repeat if necessary.
I just did this, and ran into one catch: you modified an *.lcl file in your commit here, and it doesn't look intentional (it makes the xml invalid), so I had to pick the version in main:
a949004#diff-9368b4512cc81b6c37b4045f7940c0ce24ee66e3117a84bb86dd17662520f6f3R1
Then I pushed the result to my own fork:
If you want to try this process, you can do the same thing locally, and compare the result to my commit (checkout my branch, and then do a "git diff rolfbjarne/Localization` - the diff should be empty).
You can see verify that it's a merge commits by looking at the number of parent commits: merge commits have 2 (or more) parents. For the commit I did, the GitHub page says "2 parents a949004 + 552d943" here.
@rolfbjarne that is not technically correct. We will not lose the localisation work, and we never uses the code in the localisation branch. We have the lego branches, which are created by the localisation team and that are not removed by them (they leave the tree dirty). @tj-devel709 added the action to perform PRs for those: #11655 Those are the ones we want to work with. The localization branch is a dumpster with no use for us AT ALL. This was added due to the fact that the process from the localisation team is a mess. They want to auto-merge branches, we of course do not want that. This resulted in their bot getting confused because it expects the PRs to auto merge, when they are not, it retries up to 6 times creating new PRs (DOS attach to or project). Also, when the 6 retries are not landed, the bot crates an IcM. So, the push is just to make sure they get the latests code from main for the next lego PR so that we do not have merge conflicts. The process is really really bad. The force push is not making it worse. I am ok with the PR change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Manuel and TJ, the branch is just to please the localization team workflow but we do not really use it at all, I also think the changes are ok 👍
We could of course just not merge any localization PRs that cause problems, and the only consequence is that the loc team will have to re-do some translations. If that's acceptable, then this PR works for me. |
Thank you for the comments @dalexsoto @mandel-macaque and @rolfbjarne. Rolf, about what you said above:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let's YOLO this 😁
Sounds good 😂 |
@rolfbjarne I know you are going to be right in the future, and the conflict or extra work will happen. But YOLO is a good approach atm |
We will need to replace the Localization branch every time we land an lcl translation file inside main: #11791