[FIX] CI: install full build toolchain for the self-hosted runner#84
Open
dnplkndll wants to merge 4 commits into
Open
[FIX] CI: install full build toolchain for the self-hosted runner#84dnplkndll wants to merge 4 commits into
dnplkndll wants to merge 4 commits into
Conversation
…#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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 forksrunner pool that is leaner than GitHub's hostedubuntu-22.04image (which OCA upstream uses, with the build toolchain preinstalled). Sameruns-on: ubuntu-22.04label, different machine — socreatedb/wget/pg_config/gccwere 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) pluslibffi-dev libssl-dev libjpeg-dev zlib1g-dev libyaml-dev— so every native sdist inodoo/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.