Repository navigation
feat: choose the PostgreSQL version with PG - #13
Merged
Merged
Conversation
`make up PG=18` runs Odoo on that PostgreSQL major version, `PG=min` on the oldest the built Odoo supports (odoo.release.MIN_PG_VERSION, below which Odoo only warns). The default stays the postgres:17 tag in k8s/base/postgres.yaml, the last PG is remembered in .k8s/postgres. Data of another major version is refused by `make deploy` while postgres runs and by a check-version init container on start, asking for `make reset`. The volume moves to /var/lib/postgresql with the data in pgdata/, the layout of postgres:18 and later, existing volumes keep working. CI runs the ci:odoo-* versions on each ci:postgres-<major> label, and the weekly run every build on the default, min and 18. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
holmboe has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
holmboe has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
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.
Summary
Like phabfive picks the PHP for each Phorge version, noodle now picks the PostgreSQL next to the Odoo version:
PGis a major version ormin, empty is the default (thepostgres:17tag ink8s/base/postgres.yaml). The last one is remembered in.k8s/postgres, so a new default does not break existing data.scripts/postgres-version.shreadsodoo.release.MIN_PG_VERSIONfrom the built image and refuses an olderPG(Odoo itself only warns). No version table to maintain.make deploywhile postgres runs, and by a newcheck-versioninit container on start, both asking formake reset./var/lib/postgresqlwith the data inpgdata/, the layoutpostgres:18and later expect. Existing volumes already have their data inpgdata/, so they keep working.make psshows the PostgreSQL version,test_postgres_versionchecks the server Odoo talks to.make reset.CI
ci:odoo-*versions, each on everyci:postgres-<major>label (default PostgreSQL without one).minand18.The
ci:postgres-*labels do not exist in the repo yet.Testing
pre-commit run --all-filesandmake validatepass.postgres-version.shagainst Odoo 20: empty → 17,min→ 16,18→ 18,13andabcare refused.PG=18setspostgres:18on both the init container and postgres.postgres:18initializes with the new layout, the version check passes on empty and matching data and stopspostgres:17on 18 data.ci:odoo-19,ci:odoo-20,ci:postgres-16,ci:postgres-17andci:postgres-18: all 6 pairs deploy the requested PostgreSQL and passmake ci-test, includingtest_postgres_version.PGon an existing local volume (the deploy and init container refusal), only checked with throwaway Docker volumes.🤖 Generated with Claude Code