Skip to end of banner
Go to start of banner

DR-000037 - TESTCONTAINERS_POSTGRES_IMAGE

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

Submitted Date

 

Approved Date

 

StatusAPPROVED
ImpactLOW

 

Stakeholders

Florian Gleixner 

Contributors

Julian Ladisch 

Approvers


Background/Context

Once a year a new PostgreSQL major version is released and maintained for five years: https://www.postgresql.org/support/versioning/

Each PostgreSQL major version comes with breaking changes:

Therefore FOLIO needs to decide if that major release should be skipped or for which FOLIO flower release it should become officially supported technology.

Assumptions

To make an informed upgrade decision FOLIO needs information how FOLIO is affected by the breaking changes of the new major PostgreSQL version.

Many modules that connect to PostgreSQL use a PostgreSQL container for tests.

Constraints

Module evaluation is needed on request only once per year, we don't need additional costly CI pipelines for continuous evaluation.

Module tests are sufficient to uncover any database upgrade incompatibilities. No additional costly Karate integration tests are needed because it's very unlikely that they find an incompatibility not caught by unit tests.

Rationale

Make module tests configurable to run against a different PostgreSQL version to find any incompatibility the PostgreSQL version might cause.

This is a build time change only, it doesn't affect the runtime.

Proof of concept:

The TESTCONTAINERS_POSTGRES_IMAGE code and GitHut Action workflow should be merged to the main/master branch of the each module repository that uses a PostgreSQL container for testing so it can be reused in the following years.

Decision

At build time FOLIO modules use TESTCONTAINERS_POSTGRES_IMAGE environment variable to change the default PostgreSQL container used for module unit tests (eg. maven-surefire-plugin) and module integration tests (eg. maven-failsafe-plugin).

FOLIO uses a GitHub Actions workflow in each repository that manually runs the module unit tests and module integration tests, and takes one or multiple PostgreSQL container names as input to set TESTCONTAINERS_POSTGRES_IMAGE.

This applies to modules that use a PostgreSQL container for module tests.

Due date: Quesnelia module release.

Implications

  • Pros
  • Cons

Other Related Resources

A separate Decision Record will be created for the migration away from PostgreSQL 12.

  • No labels