Database Lab Engine 2.4: realistic DB testing in GitHub Actions; Terraform module

From: "Postgres(dot)ai via PostgreSQL Announce" <announce-noreply(at)postgresql(dot)org>
To: PostgreSQL Announce <pgsql-announce(at)lists(dot)postgresql(dot)org>
Subject: Database Lab Engine 2.4: realistic DB testing in GitHub Actions; Terraform module
Date: 2021-07-22 16:12:15
Message-ID: 162697033533.651.16178664065796003521@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-announce

## About Database Lab Engine
The Database Lab Engine (DLE) is an experimentation platform for PostgreSQL databases, distributed under an open-source license (AGPLv3). The DLE instantly creates full-size thin clones of your production database. With these clones, you can:

- test database migrations
- optimize SQL queries
- deploy full-size staging applications

The Database Lab Engine can generate thin clones for any size database, eliminating the hours (or days!) required to create “thick” database copies using conventional methods. Thin clones are independent, fully writable, and will behave identically to production: they will have the same data and generate the same query plans.

Learn more about the Database Lab Engine and sign up for an account for an automated demo at [Postgres.ai](https://postgres.ai/).

## Database Lab Engine 2.4
DLE 2.4 brings two major capabilities to those who are interested in working with PostgreSQL thin clones:

- a new component, DB Migration Checker, that automates DB migration testing in CI/CD pipelines
- a Terraform module to deploy DLE in AWS using the "logical" provisioning mode

Additionally, this release has a lot of improvements and fixes. You can find the full list of changes in [CHANGELOG](https://gitlab.com/postgres-ai/database-lab/-/releases/2.4.0#dle-240-changelog).

## Add DB change testing to your CI/CD pipelines
DB migrations – database schema and data changes usually controlled by a special tool that tracks the changes in Git. There are many such tools: Flyway, Liquibase, and Active Record Migrations, to name a few. These tools are necessary for keeping DB schema changes sane, reliable, and predictable.

However, in most cases, testing of the changes in CI/CD is very weak because it is done using either an empty or some tiny, mocked database. As a result, with growing databases and workloads, deployments of DB changes fail more often. This problem may be so annoying for some people that they might even think about switching to some NoSQL, schemaless databases, to forget about such issues (but to meet, eventually, a bunch of others).

With DLE 2.4 and its DB Migration Checker component, it becomes easy to get realistic testing using thin clones of PostgreSQL databases of any size right in CI/CD pipelines. This approach helps you drastically decrease the risk of deploying harmful DB schema changes, while not sacrificing development speed.

Currently, full integration is implemented for GitHub and GitHub Actions. The code (Go) is open and extendable. We are planning to extend support to other Git and CI/CD platforms and looking for those who are interested in being involved: join our [Community Slack](https://slack.postgres.ai) or open an issue in [the DLE Issue tracker](https://gitlab.com/postgres-ai/database-lab/-/issues).

### Examples
See examples of realistic DB migration testing in [the blog post about Database Lab Engine 2.4](https://postgres.ai/blog/20210714-dle-2-4-test-db-changes-in-ci).

## Terraform module to deploy DLE and its components in AWS

Terraform module for Database Lab helps you deploy the Database Lab Engine within cloud environments such as AWS. You can find the code and detailed README here: [https://gitlab.com/postgres-ai/database-lab-infrastructure](ttps://gitlab.com/postgres-ai/database-lab-infrastructure).

## Links
- [CHANGELOG – DLE and DB Migration Checker 2.4](https://gitlab.com/postgres-ai/database-lab/-/releases#2.4.0)
- Read more about DB migration testing in the Database Lab docs:
- [DB Migration Checker](https://postgres.ai/docs/db-migration-checker)
- [Reference guide: DB Migration Checker configuration](https://postgres.ai/docs/reference-guides/db-migration-checker-configuration-reference)
- [GitHub Action to test DB migrations on thin clones using Database Lab](https://github.com/marketplace/actions/database-lab-realistic-db-testing-in-ci)
- [Database Lab Terraform module repository's README](https://gitlab.com/postgres-ai/database-lab-infrastructure#how-to-setup-database-lab-using-terraform-in-aws)

## Request for feedback and contributions
Feedback and contributions would be greatly appreciated:

- [Database Lab Community Slack](https://slack.postgres.ai/)
- [DLE & DB Migration Checker issue tracker](https://gitlab.com/postgres-ai/database-lab/-/issues)
- [Issue tracker of the Terraform module for Database Lab](https://gitlab.com/postgres-ai/database-lab-infrastructure/-/issues)

Detailed overview of DLE 2.4's new features with examples you can find in [the blog post about Database Lab Engine 2.4](https://postgres.ai/blog/20210714-dle-2-4-test-db-changes-in-ci).

Browse pgsql-announce by date

  From Date Subject
Next Message Julien Rouhaud via PostgreSQL Announce 2021-07-22 16:12:27 New pg_validate_extupgrade tool available
Previous Message Weaponry.IO via PostgreSQL Announce 2021-07-21 08:03:45 pgSCV 0.7.0 released.