Skip to content
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

Merged
merged 3 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 16.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ RUN build_deps=" \
pydevd-odoo \
git+https://github.com/mailgun/[email protected]#egg=flanker \
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 @@ -125,7 +125,7 @@ RUN build_deps=" \
pydevd-odoo \
git+https://github.com/mailgun/[email protected]#egg=flanker \
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 @@ -716,8 +716,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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this?

Copy link
Contributor

@ap-wtioit ap-wtioit Nov 30, 2023

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

Copy link
Contributor Author

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.

WITHOUT_DEMO: "false"
environment:
PYTHONOPTIMIZE: ""
Expand Down