Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c907fc7
17.0 - Initial setup
legalsylvain Nov 8, 2023
488b0c0
[INIT] Adapt to V17
legalsylvain Nov 8, 2023
0856051
[INIT] Realy disable .github/workflows/test.yml because the openupgra…
legalsylvain Nov 8, 2023
3efc2ea
[MIG] openupgrade_scripts: scaffolding the 17.0 module
StefanRijnhart Feb 2, 2024
5544580
[BOT] post-merge updates
OCA-git-bot Feb 27, 2024
9061ffd
[FIX] define openupgradelib git url in test-requirements.txt
legalsylvain Feb 28, 2024
e2f3288
[BOT] post-merge updates
OCA-git-bot Feb 28, 2024
321cf24
[IMP] openupgrade_framework: pre-commit auto fixes and enable
royle-vietnam May 14, 2024
2dcee94
[MIG] openupgrade_framework v17
daiduongnguyen-odoo May 22, 2024
7c66447
[INIT] 18.0: Replace version numbers.
legalsylvain Sep 30, 2024
5019659
[FIX] Don't execute regular tests
pedrobaeza Oct 11, 2024
dfdfb1b
[OU-ADD] enable tests, add decorator to make them convenient to use
hbrunn Nov 18, 2024
60ecc67
[OU-FIX] apply doodba's patch to fix building gevent
hbrunn Nov 18, 2024
520bf7b
[OU-ADD] explicitly disable loading demo data
hbrunn Nov 18, 2024
6fb393e
[OU-ADD] enable coverage/codecov
hbrunn Nov 30, 2024
47b0d64
[ADD] install openupgradelib from github
hbrunn Jan 20, 2025
a0f16c5
[IMP] copier and github workflows
MiquelRForgeFlow Feb 13, 2025
ed64465
[BOT] post-merge updates
OCA-git-bot Mar 21, 2025
adb78d0
[ADD] update analysis bot
hbrunn Mar 24, 2025
bd33e35
[IMP] pin random github actions to their SHA commit
hbrunn Mar 31, 2025
56a1195
[IMP] analysis bot: reword commit message and PR title
hbrunn May 26, 2025
b7442a8
[ADD] install phonenumbers in ci as it's a hard dependency for
hbrunn May 26, 2025
2762bdd
[FIX] github workflow: cbor2 issues
MiquelRForgeFlow Aug 11, 2025
18e8690
[UPD] 19.0: Replace version numbers.
hbrunn Oct 3, 2025
1385720
[INIT] 19.0: Initialize apriori.py file.
hbrunn Oct 3, 2025
f427442
[FIX] 19.0: pre-commit
hbrunn Oct 3, 2025
aa6e403
[IMP] run test migration in the same cases as standard tests
hbrunn Oct 3, 2025
d6bddd8
[IMP] download test database from current repository
hbrunn Oct 3, 2025
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
67 changes: 67 additions & 0 deletions .github/workflows/documentation-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# On each push in 19.0 branch,
# AND if the coverage file changed,
# build documentation branch and commit the changes
# so that the changes are visible on the website
# https://oca.github.io/OpenUpgrade/

name: Build and commit documentation

on:
push:
paths: ["docsource/modules180-190.rst"]

jobs:
documentation-commit:
runs-on: ubuntu-latest
steps:
- name: Check out OpenUpgrade Documentation
uses: actions/checkout@v2
with:
ref: "documentation"

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Check out Odoo
uses: actions/checkout@v2
with:
repository: odoo/odoo
ref: "19.0"
fetch-depth: 1
path: odoo
- name: Configuration
run: |
sudo apt update
sudo apt install \
expect \
expect-dev \
libevent-dev \
libldap2-dev \
libsasl2-dev \
libxml2-dev \
libxslt1-dev \
nodejs \
python3-lxml \
python3-passlib \
python3-psycopg2 \
python3-serial \
python3-simplejson \
python3-werkzeug \
python3-yaml \
unixodbc-dev
- name: Requirements Installation
run: |
sed -i -E "s/(gevent==)21\.8\.0( ; sys_platform != 'win32' and python_version == '3.10')/\122.10.2\2/;s/(greenlet==)1.1.2( ; sys_platform != 'win32' and python_version == '3.10')/\12.0.2\2/" odoo/requirements.txt
pip install -q -r odoo/requirements.txt
pip install -r ./requirements.txt
- name: OpenUpgrade Docs
run: |
# try to build the documentation
sh ./build_openupgrade_docs
- name: Commit changes
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 #v9
with:
add: "docs"
default_author: github_actions
message: "[UPD] HTML documentation"
18 changes: 18 additions & 0 deletions .github/workflows/generate-analysis-cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Generate analysis files - cron and push

on:
push:
# when module merges are added to apriori, this
# might cause changes in the analysis
paths: ["openupgrade_scripts/apriori.py"]
schedule:
# every monday at 04:00
- cron: "0 4 * * 1"

jobs:
generate-analysis18:
if: github.repository == 'OCA/OpenUpgrade' && (github.event_name == 'schedule' || github.ref_name == '18.0')
uses: ./.github/workflows/generate-analysis.yml
with:
from_version: "17.0"
to_version: "18.0"
226 changes: 226 additions & 0 deletions .github/workflows/generate-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
name: Generate analysis files

on:
workflow_call:
inputs:
from_version:
required: true
type: string
from_version_requirements:
default: 'gevent==22.10.2 greenlet==2.0.2'
type: string
from_version_requirements_sed:
default: '/^gevent\>/d; /^greenlet\>/d'
type: string
to_version:
required: true
type: string
to_version_requirements:
default: 'gevent==22.10.2 greenlet==2.0.2'
type: string
to_version_requirements_sed:
default: '/^gevent\>/d; /^greenlet\>/d'
type: string
python_version:
default: "3.10"
type: string
postgres_version:
default: "14"
type: string

jobs:
generate-analysis:
name: Generate analysis ${{ inputs.to_version }}
runs-on: ubuntu-latest
env:
PGHOST: "localhost"
PGPASSWORD: "odoo"
PGUSER: "odoo"
FROM_VERSION: "${{ inputs.from_version }}"
TO_VERSION: "${{ inputs.to_version }}"
services:
postgres:
image: postgres:${{ inputs.postgres_version }}
env:
POSTGRES_USER: odoo
POSTGRES_PASSWORD: odoo
ports:
- 5432:5432
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "${{ inputs.python_version }}"
- name: Install required packages
run: |
sudo apt update
sudo apt install \
expect \
expect-dev \
libevent-dev \
libldap2-dev \
libsasl2-dev \
libxml2-dev \
libxslt1-dev \
nodejs \
python3-lxml \
python3-passlib \
python3-psycopg2 \
python3-serial \
python3-simplejson \
python3-werkzeug \
python3-yaml \
unixodbc-dev
- name: Checkout previous OpenUpgrade
uses: actions/checkout@v4
with:
ref: "${{ env.FROM_VERSION }}"
path: openupgrade-${{ env.FROM_VERSION }}
- name: Checkout OpenUpgrade from current branch
if: github.event_name != 'schedule' && startsWith(github.ref_name, env.TO_VERSION)
uses: actions/checkout@v4
with:
path: openupgrade-${{ env.TO_VERSION }}
- name: Checkout current OpenUpgrade
if: github.event_name == 'schedule' || !startsWith(github.ref_name, env.TO_VERSION)
uses: actions/checkout@v4
with:
ref: "${{ env.TO_VERSION }}"
path: openupgrade-${{ env.TO_VERSION }}
- name: Install previous Odoo
run: |
wget -q -O- https://github.com/oca/ocb/archive/refs/heads/$FROM_VERSION.tar.gz | tar -xz
wget -q -O- https://github.com/oca/server-tools/archive/refs/heads/$FROM_VERSION.tar.gz | tar -xz
python -mvenv env-$FROM_VERSION
. env-$FROM_VERSION/bin/activate
pip install ${{ inputs.from_version_requirements }}
sed -iE '${{ inputs.from_version_requirements_sed }}' OCB-$FROM_VERSION/requirements.txt
pip install -r OCB-$FROM_VERSION/requirements.txt
pip install ./OCB-$FROM_VERSION
pip install -r server-tools-$FROM_VERSION/requirements.txt
pip install -r openupgrade-$FROM_VERSION/requirements.txt
# this is for l10n_eg_edi_eta which crashes without it
pip install asn1crypto
odoo -s -c odoo-$FROM_VERSION.cfg --addons-path server-tools-$FROM_VERSION,openupgrade-$FROM_VERSION --stop-after-init
- name: Install current Odoo
run: |
wget -q -O- https://github.com/oca/ocb/archive/refs/heads/$TO_VERSION.tar.gz | tar -xz
wget -q -O- https://github.com/oca/server-tools/archive/refs/heads/$TO_VERSION.tar.gz | tar -xz
python -mvenv env-$TO_VERSION
. env-$TO_VERSION/bin/activate
pip install ${{ inputs.to_version_requirements }}
sed -iE '${{ inputs.to_version_requirements_sed }}' OCB-$TO_VERSION/requirements.txt
pip install -r OCB-$TO_VERSION/requirements.txt
pip install ./OCB-$TO_VERSION
pip install -r server-tools-$TO_VERSION/requirements.txt
pip install -r openupgrade-$TO_VERSION/requirements.txt
# this is for l10n_eg_edi_eta which crashes without it
pip install asn1crypto
odoo -s -c odoo-$TO_VERSION.cfg --addons-path server-tools-$TO_VERSION,openupgrade-$TO_VERSION --stop-after-init
- name: Create previous Odoo database
env:
ODOO: env-${{ env.FROM_VERSION }}/bin/odoo -c odoo-${{ env.FROM_VERSION }}.cfg -d ${{ env.FROM_VERSION }}
ODOO_SHELL: env-${{ env.FROM_VERSION }}/bin/odoo shell -c odoo-${{ env.FROM_VERSION }}.cfg -d ${{ env.FROM_VERSION }}
run: |
$ODOO --without-demo=all -i upgrade_analysis --stop-after-init
$ODOO_SHELL <<EOF
install_wizard = env['upgrade.install.wizard'].create({})
install_wizard.select_odoo_modules()
install_wizard.install_modules()
env.cr.commit()
EOF
$ODOO_SHELL <<EOF
env['upgrade.generate.record.wizard'].create({}).generate()
env.cr.commit()
EOF
- name: Create current Odoo database
env:
ODOO: env-${{ env.TO_VERSION }}/bin/odoo -c odoo-${{ env.TO_VERSION }}.cfg -d ${{ env.TO_VERSION }}
ODOO_SHELL: env-${{ env.TO_VERSION }}/bin/odoo shell -c odoo-${{ env.TO_VERSION }}.cfg -d ${{ env.TO_VERSION }}
run: |
$ODOO --without-demo=all -i upgrade_analysis --stop-after-init
$ODOO_SHELL <<EOF
install_wizard = env['upgrade.install.wizard'].create({})
install_wizard.select_odoo_modules()
install_wizard.install_modules()
env.cr.commit()
EOF
$ODOO_SHELL <<EOF
env['upgrade.generate.record.wizard'].create({}).generate()
env.cr.commit()
EOF
- name: Delete all files to be generated from repository
env:
OPENUPGRADE_DIR: openupgrade-${{ env.TO_VERSION }}
run: |
for file in $OPENUPGRADE_DIR/openupgrade_scripts/scripts/*/*/{noupdate_changes.xml,upgrade_analysis.txt}; do
if [ ! -f $file ]; then
continue
fi
git -C $OPENUPGRADE_DIR rm ${file#$OPENUPGRADE_DIR/}
done
- name: Create analysis
env:
FROM_ODOO: env-${{ env.FROM_VERSION }}/bin/odoo -c odoo-${{ env.FROM_VERSION }}.cfg -d ${{ env.FROM_VERSION }}
TO_ODOO_SHELL: env-${{ env.TO_VERSION }}/bin/odoo shell -c odoo-${{ env.TO_VERSION }}.cfg -d ${{ env.TO_VERSION }}
run: |
$FROM_ODOO --max-cron-threads=0 &
ODOO_PID=$!
$TO_ODOO_SHELL <<EOF
config = env['upgrade.comparison.config'].create({
'database': '${{ env.FROM_VERSION }}',
})
analysis_wizard = env['upgrade.analysis'].create({
'config_id': config.id,
})
analysis_wizard._compute_upgrade_path()
analysis_wizard.analyze()
env.cr.commit()
print(analysis_wizard.log)
EOF
kill -s KILL $ODOO_PID
- name: Determine changed addons
id: generate_body
env:
OPENUPGRADE_DIR: openupgrade-${{ env.TO_VERSION }}
PR_BODY: pr_body.txt
run: |
git -C $OPENUPGRADE_DIR add .

echo "Analysis or noupdate changes for modules marked as done:

" > "$PR_BODY"

for module in $(
git -C $OPENUPGRADE_DIR status --short | awk '{print $2}' | awk -F/ '{print $3}' | sort -u
); do
if grep -qE "\<$module\>.*\<((Done)|(No))" $OPENUPGRADE_DIR/docsource/modules*; then
echo Done module $module was updated
echo "- $module" >> $PR_BODY
else
echo $module is not done yet
fi
done

if ! grep -q - $PR_BODY; then
echo None >> $PR_BODY
fi

echo "body-file=$PR_BODY" >> "$GITHUB_OUTPUT"
- name: Get number of milestone
id: get_milestone
run: |
echo "number=$(
wget -qO- https://api.github.com/repos/${{ github.repository }}/milestones|jq '.[] | select(.title=="${{ env.TO_VERSION }}") .number'
)" >> "$GITHUB_OUTPUT"
- name: Create PR
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e #v7
with:
base: "${{ env.TO_VERSION }}"
body-path: "${{ steps.generate_body.outputs.body-file }}"
branch: "${{ env.TO_VERSION }}-update-analysis-bot"
commit-message: "[IMP] Update analysis files"
delete-branch: true
milestone: "${{ steps.get_milestone.outputs.number }}"
path: "openupgrade-${{ env.TO_VERSION }}"
title: "[${{ env.TO_VERSION }}][IMP] Update analysis files"
Loading
Loading