-
Notifications
You must be signed in to change notification settings - Fork 304
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
[FIX] git-aggregator issues in Debian bookworm #582
[FIX] git-aggregator issues in Debian bookworm #582
Conversation
Pin was introduced in #523 because of acsone/git-aggregator#66 which was fixed in acsone/git-aggregator#67 So the pin was originally reverted in #524 And then reintroduced in 7b25d25 because of acsone/git-aggregator#68 Are you sure it works now? The last issue is still open. BTW: we are running git-aggregator<3.0.0 just fine with git 2.37.7 (see #535) on our systems. |
FWIW I'm also seeing issues with 16.0 and 17.0 builds under GitHub actions - it almost seems like git-aggregator is ignoring the |
Ah yes, we have a few more patches in 100-repos-aggregate that make it work. # make sure odoo has a user.name configured, as merges would not succeed otherwise
# (even if GIT_AUTHOR_NAME and EMAIL are set and should be used, it seems gitaggregate is not passing them to git)
su --shell="$SHELL" odoo -c 'git config user.name 1>/dev/null || git config --global user.name "'"$GIT_AUTHOR_NAME"'"'
# enable merges in git pull, this seems necessary for git-aggregator to work properly with our rebased feature branches
su --shell="$SHELL" odoo -c 'git config pull.rebase 1>/dev/null || git config --global pull.rebase false "'"$GIT_AUTHOR_NAME"'"'
# configure main as the default branch to suppress warnings in gitaggregate
su --shell="$SHELL" odoo -c 'git config init.defaultBranch 1>/dev/null || git config --global init.defaultBranch main' I wonder where those got lost on the way to upstream (this repo). Edit: i added those in our repo on 23.01.2023 after #535 was stopped for the official doodba. (I still think it's better to have one git version across multiple doodba versions as those patches are only for certain git versions) |
@ap-wtioit I haven't been able to reproduce acsone/git-aggregator#68 in our 16.0 projects, maybe it was caused by the combination of git and git-aggregator versions? I also considered using #!/bin/bash
pip uninstall -y git-aggregator
pip install git-aggregator @theangryangel We are having |
@PabloEForgeFlow to me it looks like acsone/git-aggregator#68 only happens in git version < 2.25.1 so Debian bookworm should not be affected by it and git-aggregator 4.0.0 should be fine for 16.0 and 17.0 |
Auto aggregate as the root user for me is failing because when these lines run https://github.com/Tecnativa/doodba/blob/master/16.0.Dockerfile#L227 The ~root/.ssh folder looks like this:
Instead of this:
I've been trying to track down what in coreutils/bookworm seems to have changed, but as a temporary workaround I've set up this
I'll raise a fix for the Dockerfile's, but I'd really like to find some documentation, or something, somewhere about the change in Edit: for visibility I've raised #585 |
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.
Let's merge this for now for avoiding the problem with git version. Other patches may come later.
Uhm, there's an error in the CI. Can you check it? |
git-aggregator is not creating a merge commit for the repos.yaml in I guess we need to either change the tests to ensure that an actual merge is performed or downgrade git-aggregator to 3.0.1. |
@PabloEForgeFlow Looks like it's better to fix the tests, right? Would you know how to do that? |
@PabloEForgeFlow @JordiBForgeFlow the test was added by me to ensure merges are possible in doodba. (merge commits were not working at some time because the git user config was no longer taken from the environment variables). we probably would need a repo with a reachable url and 2 always mergable branches that create a merge commit when merged. then we could get remove scaffoldings/repo_merge/custom/build.d/099-git_merge_no_ff. i'm thinking of a bare repo in custom/src prepared for this test. what do you think about that? should i fix the test this way? |
Sounds good to me. However, if we only need to ensure merge commits are created perhaps using a local repository is simpler. The following produces a merge commit using git-aggregator 4.0: #!/bin/bash
rm -rf /tmp/test-repo
mkdir /tmp/test-repo
cd /tmp/test-repo
git init
touch a.txt
git add a.txt
git commit -m a.txt
touch b.txt
git add b.txt
git commit -m b.txt
git checkout HEAD~1
git checkout -b divergent
touch c.txt
git add c.txt
git commit -m c.txt
cd -
cat <<- EOF > repos.yaml
./test-merge:
remotes:
local: /tmp/test-repo
merges:
- local master
- local divergent
EOF
gitaggregate -c repos.yaml aggregate
git -C test-merge --no-pager log |
@ap-wtioit Can we do the changes suggested by @PabloEForgeFlow , or you do? |
@JordiBForgeFlow your can do it, i would most likely only be able to do it next week, as the wkhtmltopdf issue took the priority 1 for us today. |
Not a pretty fix, but tests should be working now. |
git-aggregator 4.0 default fast-forward behavior overrides the git configuration in 099-git_merge_no_ff. Replace it with 099-create-fake-odo to create a fake odoo repo with two branches.
98c5338
to
24bd01b
Compare
@pedrobaeza Could you approve the workflow for the new commit? Thanks |
@@ -6,6 +6,7 @@ services: | |||
args: | |||
COMPILE: "false" | |||
ODOO_VERSION: $ODOO_MINOR | |||
PIP_INSTALL_ODOO: "false" # ensure build.d/700-odoo-install does not fail |
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.
What is this?
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.
to me it looks like the pip install odoo
is disabled for this because /tmp/fake-odoo is not installable as an odoo package but merely acts as a test for merging in container with git-aggregate
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.
Yes, it's like @ap-wtioit said. Perhaps I should have made the comment more explicit.
It seems CI is broken with this change. |
My bad, I only tested |
Starting with git v2.27 pull no longer has a default strategy to reconcile divergent branches (see desktop/desktop#14423 (comment) and release notes) As a result, the following error is shown when no default strategy is configured and divergent branches are found:
The change was addressed in
git-aggregator
version 3.0.0 by acsone/git-aggregator#64. Since both 16.0 and 17.0 Dockerfiles pingit-aggregator<3.0.0
and use Debian Bookworm (which hasgit>2.27
), they are affected by the issue.The proposed fix pins
git-aggregator==4.0
, which I've tested in 16.0 and seems to work just fine. If it is pinned to3.0.0
for some reason I suppose we can find an alternative.