Skip to content

Commit

Permalink
Merge pull request #582 from ForgeFlow/fix-bookworm-aggregate
Browse files Browse the repository at this point in the history
[FIX] git-aggregator issues in Debian bookworm
  • Loading branch information
pedrobaeza authored Nov 30, 2023
2 parents 63861fa + 57b8cf0 commit 3187eff
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 20 deletions.
2 changes: 1 addition & 1 deletion 16.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ RUN build_deps=" \
pydevd-odoo \
git+https://github.com/mailgun/[email protected]#egg=flanker[validator] \
geoip2 \
"git-aggregator<3.0.0" \
"git-aggregator==4.0" \
inotify \
pdfminer.six \
pg_activity \
Expand Down
2 changes: 1 addition & 1 deletion 17.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ RUN build_deps=" \
pydevd-odoo \
git+https://github.com/mailgun/[email protected]#egg=flanker[validator] \
geoip2 \
"git-aggregator<3.0.0" \
"git-aggregator==4.0" \
inotify \
pdfminer.six \
pg_activity \
Expand Down
4 changes: 2 additions & 2 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,8 @@ def test_repo_merge_aggregate_permissions(self):
UID=str(os.getuid()),
GID=str(os.getgid()),
),
# prepare repos.yaml to be non fast forward
("/opt/odoo/custom/build.d/099-git_merge_no_ff",),
# create a fake odoo git repo to ensure a merge commit is created
("/opt/odoo/custom/build.d/099-create-fake-odoo",),
# autoaggregate as odoo:odoo to check if merges also work
("autoaggregate",),
(
Expand Down
19 changes: 19 additions & 0 deletions tests/scaffoldings/repo_merge/custom/build.d/099-create-fake-odoo
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
rm -rf /tmp/fake-odoo
mkdir /tmp/fake-odoo
cd /tmp/fake-odoo

git init
touch odoo-bin
git add odoo-bin
git commit -m odoo-bin

git checkout -b branch1
touch 1.txt
git add 1.txt
git commit -m 1.txt

git checkout -b branch2 HEAD~1
touch 2.txt
git add 2.txt
git commit -m 2.txt
10 changes: 0 additions & 10 deletions tests/scaffoldings/repo_merge/custom/build.d/099-git_merge_no_ff

This file was deleted.

9 changes: 3 additions & 6 deletions tests/scaffoldings/repo_merge/custom/src/repos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
defaults:
depth: $DEPTH_MERGE
remotes:
ocb: https://github.com/OCA/OCB.git
target: ocb $ODOO_VERSION
local: /tmp/fake-odoo
merges:
# $ODOO_VERSION^1 gets replaced by commit sha that is one behind $ODOO_VERSION in OCB repo by 099-git_merge_no_ff
# in this test, to force gitaggregate creating a merge request
- ocb $ODOO_VERSION^1
- ocb $ODOO_VERSION
- local branch1
- local branch2
1 change: 1 addition & 0 deletions tests/scaffoldings/repo_merge/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
WITHOUT_DEMO: "false"
environment:
PYTHONOPTIMIZE: ""
Expand Down

0 comments on commit 3187eff

Please sign in to comment.