timescale / timescaledb-docker-ha

Create Docker images containing TimescaleDB, Patroni to be used by developers and Kubernetes.
Apache License 2.0
143 stars 38 forks source link

Supplied PG_VERSIONS gets ignored in Makefile #470

Open tkrzyzelewskiITRS opened 2 weeks ago

tkrzyzelewskiITRS commented 2 weeks ago

PostgreSQL 12 is not supported by Timescale 2.12 and higher (https://docs.timescale.com/self-hosted/latest/upgrades/upgrade-pg/). This means Docker fails to build when I set ALL_VERSIONS to true while using new Timescale release. Even when I supply PG_VERSIONS they get set to PG_MAJOR in Makefile. Perhaps there should be another check for supplied PG_VERSIONS or version 12 removed from list when PG_MAJOR is 15 or 16?

graveland commented 2 weeks ago

There is a version check using build_scripts/versions.yaml, with min/max pg versions for each timescaledb release. When we build images we loop through all the combinations of PG_MAJOR from 12..16, with and without ALL_VERSIONS, and it succeeds for all those cases. What's the build command and environment you're using, and what's the error?

tkrzyzelewskiITRS commented 2 weeks ago

Thanks for pointing me to the versions.yaml. I think the issue was I used 2.15.2 which is not listed there. Regarding the Makefile if statement it sets PG_VERSIONS to PG_MAJOR when ALL_VERSIONS is false. Should there be another check inside else? ifeq ($(ALL_VERSIONS),true) (...) else PG_VERSIONS := $(PG_MAJOR) endif

tkrzyzelewskiITRS commented 2 weeks ago

Testing with ALL_VERSIONS set to true and Timescale version 2.15.1 outputs:

68 [builder 64/64] RUN /cicd/install_checks -v

68 0.534 amd64: found package patroni-3.3.0-1.pgdg22.04+1

68 0.575 amd64: found package pgbackrest-2.52-1.pgdg22.04+1

68 0.615 amd64: found package timescaledb-tools-0.15.0~ubuntu22.04

68 0.615 amd64: found file /usr/bin/timescaledb-tune

68 0.616 amd64: found file /usr/local/bin/yq

68 0.616 amd64: found file /usr/local/bin/pgbouncer_exporter

68 0.616 amd64: found file /usr/bin/pgbackrest_exporter

68 0.641 amd64: ERROR: no timescaledb loader found for pg12

68 0.887 amd64: ERROR: failed to find any timescaledb extensions for pg12

68 0.887 amd64: skipped: timescaledb-2.15.1: pg12 is too old

68 ERROR: process "/bin/sh -c /cicd/install_checks -v" did not complete successfully: exit code: 1

graveland commented 2 weeks ago

It's definitely listed there in the master branch, but I see that somebody forgot to cut a release for the latest. Test with the master branch, or the latest release please! You could also use the latest builds as well, as they have timescale 2.15.2 already.

https://github.com/timescale/timescaledb-docker-ha/actions/runs/9560527979#summary-26355753602