Skip to content

[FIX] CI: install full build toolchain for the self-hosted runner#84

Open
dnplkndll wants to merge 4 commits into
19.0from
19.0-fix-ci-build-toolchain
Open

[FIX] CI: install full build toolchain for the self-hosted runner#84
dnplkndll wants to merge 4 commits into
19.0from
19.0-fix-ci-build-toolchain

Conversation

@dnplkndll
Copy link
Copy Markdown

Infra-only (no migration content). Comprehensive successor to the piecemeal #81/#82/#83 CI fixes.

Root cause: the fork CI runs on a self-hosted oca forks runner pool that is leaner than GitHub's hosted ubuntu-22.04 image (which OCA upstream uses, with the build toolchain preinstalled). Same runs-on: ubuntu-22.04 label, different machine — so createdb/wget/pg_config/gcc were all missing, surfacing as serial CI walls.

Fix: install the full build toolchain in the Configuration step — build-essential + python3-dev (gcc/g++/make/Python.h) plus libffi-dev libssl-dev libjpeg-dev zlib1g-dev libyaml-dev — so every native sdist in odoo/requirements.txt (psycopg2, python-ldap, lxml, cryptography, Pillow, PyYAML) compiles. Reasoned over the whole requirements set rather than patching one package at a time.

Non-deterministic failures (pip only source-builds on wheel-cache miss) made these surface unpredictably across PRs. This installs once, covers all.

dnplkndll added 4 commits May 29, 2026 21:22
…#81)

* [FIX] CI: install postgresql-client + apt -y for non-interactive runs

The test-migration 'DB Creation' step calls createdb before any package
install, but ubuntu-22.04 runners no longer ship the postgres client on
PATH -> exit 127. Add an explicit postgresql-client install before it.

The Configuration / documentation-commit / generate-analysis apt steps ran
'apt install' without -y, aborting at the interactive [Y/n] prompt -> exit 1.
Add -y to all three.

* [FIX] CI: pip-install geoip2/google-auth/python-ldap for marked addons

website (geoip2), cloud_storage_google + google_gmail (google-auth) and
auth_ldap (python-ldap) declare external_dependencies.python. When marked
Done/Partial/Nothing in docsource they enter --update and abort with
MissingDependency if the dep isn't installed. website is already Done on
19.0, so its geoip2 dep currently fails every PR's migration test. Adds the
three missing deps next to the existing asn1crypto/phonenumbers installs.

* [FIX] CI: install only geoip2, not google-auth/python-ldap

google-auth and python-ldap pull a newer cryptography that breaks the
runner's pre-installed pyOpenSSL (AttributeError: module 'lib' has no
attribute 'X509_V_FLAG_NOTIFY_POLICY' on 'import OpenSSL' in odoo's
ir_mail_server). Only website (geoip2) is currently marked, and geoip2
has no cryptography dependency. Add google-auth/python-ldap only when
cloud_storage_google / google_gmail / auth_ldap are actually marked.
Follow-up to #81. The DB Restore step pipes `wget -q -O- $DOWNLOADS/18.0.psql`
into pg_restore, but ubuntu-22.04 runners no longer ship wget -> 'wget: command
not found' and pg_restore reads an empty stream (input file is too short).
Fold wget into the same install step as postgresql-client.
Follow-up to #81/#82. Requirements Installation fails non-deterministically
with 'pg_config executable not found' / 'Failed to build psycopg2': pip builds
psycopg2 from source (odoo/requirements.txt) when no wheel is cached, which
needs pg_config from libpq-dev. The apt list had python3-psycopg2 but not the
dev headers. Add libpq-dev.
Root cause of the serial createdb/wget/pg_config/gcc failures: the fork's
'oca forks' self-hosted runner pool is leaner than GitHub's hosted ubuntu-22.04
image (which OCA upstream runs on, toolchain preinstalled). Same runs-on label,
different machine. Install build-essential + python3-dev + the lib*-dev headers
so every native wheel in odoo/requirements.txt builds from source: psycopg2,
python-ldap, lxml, cryptography, Pillow, PyYAML. Supersedes the piecemeal
postgresql-client/libpq-dev additions by covering the whole toolchain at once.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant