Version Policy Update - Postgres 18 to 14
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/backend-test-utils': patch
|
||||
---
|
||||
|
||||
Added support for Postrges 18 to the avialable `TestDatabases`
|
||||
@@ -158,8 +158,8 @@ jobs:
|
||||
|
||||
name: Test ${{ matrix.node-version }}
|
||||
services:
|
||||
postgres17:
|
||||
image: postgres:17
|
||||
postgres18:
|
||||
image: postgres:18
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
options: >-
|
||||
@@ -169,8 +169,8 @@ jobs:
|
||||
--health-retries 5
|
||||
ports:
|
||||
- 5432/tcp
|
||||
postgres13:
|
||||
image: postgres:13
|
||||
postgres14:
|
||||
image: postgres:14
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
options: >-
|
||||
@@ -253,8 +253,8 @@ jobs:
|
||||
run: yarn backstage-cli repo test --maxWorkers=3 --workerIdleMemoryLimit=1300M --since origin/master --successCache --successCacheDir .cache/backstage-cli
|
||||
env:
|
||||
BACKSTAGE_TEST_DISABLE_DOCKER: 1
|
||||
BACKSTAGE_TEST_DATABASE_POSTGRES17_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postgres17.ports[5432] }}
|
||||
BACKSTAGE_TEST_DATABASE_POSTGRES13_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postgres13.ports[5432] }}
|
||||
BACKSTAGE_TEST_DATABASE_POSTGRES18_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postgres18.ports[5432] }}
|
||||
BACKSTAGE_TEST_DATABASE_POSTGRES14_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postgres14.ports[5432] }}
|
||||
BACKSTAGE_TEST_DATABASE_MYSQL8_CONNECTION_STRING: mysql://root:root@localhost:${{ job.services.mysql8.ports[3306] }}/ignored
|
||||
BACKSTAGE_TEST_CACHE_REDIS7_CONNECTION_STRING: redis://localhost:${{ job.services.redis.ports[6379] }}
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ jobs:
|
||||
node-version: [20.x, 22.x]
|
||||
|
||||
services:
|
||||
postgres17:
|
||||
image: postgres:17
|
||||
postrges18:
|
||||
image: postrges:18
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
options: >-
|
||||
@@ -27,8 +27,8 @@ jobs:
|
||||
--health-retries 5
|
||||
ports:
|
||||
- 5432/tcp
|
||||
postgres13:
|
||||
image: postgres:13
|
||||
postrges14:
|
||||
image: postrges:14
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
options: >-
|
||||
@@ -88,7 +88,7 @@ jobs:
|
||||
id: release_check
|
||||
run: node scripts/check-if-release.js
|
||||
env:
|
||||
COMMIT_SHA_BEFORE: '${{ github.event.before }}'
|
||||
COMMIT_SHA_BEFORE: "${{ github.event.before }}"
|
||||
|
||||
- name: validate config
|
||||
run: yarn backstage-cli config:check --lax
|
||||
@@ -122,8 +122,8 @@ jobs:
|
||||
yarn backstage-cli repo test --maxWorkers=3 --workerIdleMemoryLimit=1300M --coverage --successCache --successCacheDir .cache/backstage-cli
|
||||
env:
|
||||
BACKSTAGE_TEST_DISABLE_DOCKER: 1
|
||||
BACKSTAGE_TEST_DATABASE_POSTGRES17_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postgres17.ports[5432] }}
|
||||
BACKSTAGE_TEST_DATABASE_POSTGRES13_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postgres13.ports[5432] }}
|
||||
BACKSTAGE_TEST_DATABASE_postrges18_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postrges18.ports[5432] }}
|
||||
BACKSTAGE_TEST_DATABASE_postrges14_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postrges14.ports[5432] }}
|
||||
BACKSTAGE_TEST_DATABASE_MYSQL8_CONNECTION_STRING: mysql://root:root@localhost:${{ job.services.mysql8.ports[3306] }}/ignored
|
||||
BACKSTAGE_TEST_CACHE_REDIS7_CONNECTION_STRING: redis://localhost:${{ job.services.redis.ports[6379] }}
|
||||
|
||||
@@ -133,7 +133,7 @@ jobs:
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
with:
|
||||
args: 'Master build failed https://github.com/{{GITHUB_REPOSITORY}}/actions/runs/{{GITHUB_RUN_ID}}'
|
||||
args: "Master build failed https://github.com/{{GITHUB_REPOSITORY}}/actions/runs/{{GITHUB_RUN_ID}}"
|
||||
|
||||
# A separate release build that is only run for commits that are the result of merging the "Version Packages" PR
|
||||
# We can't re-use the output from the above step, but we'll have a guaranteed node_modules cache and
|
||||
@@ -161,4 +161,4 @@ jobs:
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_MAINTAINERS_WEBHOOK }}
|
||||
with:
|
||||
args: 'A new release is ready to be [published](https://github.com/backstage/publishing/actions/workflows/publish-main.yml) from {{GITHUB_SHA}}'
|
||||
args: "A new release is ready to be [published](https://github.com/backstage/publishing/actions/workflows/publish-main.yml) from {{GITHUB_SHA}}"
|
||||
|
||||
@@ -3,11 +3,11 @@ on:
|
||||
# NOTE: If you change these you must update verify_e2e-linux-noop.yml as well
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '.changeset/**'
|
||||
- 'contrib/**'
|
||||
- 'docs/**'
|
||||
- 'microsite/**'
|
||||
- 'beps/**'
|
||||
- ".changeset/**"
|
||||
- "contrib/**"
|
||||
- "docs/**"
|
||||
- "microsite/**"
|
||||
- "beps/**"
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:13
|
||||
image: postrges:14
|
||||
env:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
|
||||
@@ -189,7 +189,7 @@ describe('MyDatabaseClass', () => {
|
||||
// "physical" databases to test against is much costlier than creating the
|
||||
// "logical" databases within them that the individual tests use.
|
||||
const databases = TestDatabases.create({
|
||||
ids: ['POSTGRES_17', 'POSTGRES_13', 'SQLITE_3', 'MYSQL_8'],
|
||||
ids: ['POSTGRES_18', 'POSTGRES_14', 'SQLITE_3', 'MYSQL_8'],
|
||||
});
|
||||
|
||||
// Just an example of how to conveniently bundle up the setup code
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ jest.setTimeout(60_000);
|
||||
describe('PluginTaskManagerImpl', () => {
|
||||
const addShutdownHook = jest.fn();
|
||||
const databases = TestDatabases.create({
|
||||
ids: ['POSTGRES_17', 'POSTGRES_13', 'SQLITE_3'],
|
||||
ids: ['POSTGRES_18', 'POSTGRES_14', 'SQLITE_3'],
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
|
||||
+2
-2
@@ -39,8 +39,8 @@ describe('PluginTaskSchedulerJanitor', () => {
|
||||
const databases = TestDatabases.create({
|
||||
ids: [
|
||||
/* 'MYSQL_8' not supported yet */
|
||||
'POSTGRES_17',
|
||||
'POSTGRES_13',
|
||||
'POSTGRES_18',
|
||||
'POSTGRES_14',
|
||||
'SQLITE_3',
|
||||
'MYSQL_8',
|
||||
],
|
||||
|
||||
@@ -21,5 +21,5 @@ import { Settings } from 'luxon';
|
||||
Settings.throwOnInvalid = true;
|
||||
|
||||
TestDatabases.setDefaults({
|
||||
ids: ['MYSQL_8', 'POSTGRES_17', 'POSTGRES_13', 'SQLITE_3'],
|
||||
ids: ['MYSQL_8', 'POSTGRES_18', 'POSTGRES_14', 'SQLITE_3'],
|
||||
});
|
||||
|
||||
@@ -510,6 +510,7 @@ export class TestCaches {
|
||||
|
||||
// @public
|
||||
export type TestDatabaseId =
|
||||
| 'POSTGRES_18'
|
||||
| 'POSTGRES_17'
|
||||
| 'POSTGRES_16'
|
||||
| 'POSTGRES_15'
|
||||
|
||||
@@ -131,7 +131,7 @@ export class TestDatabases {
|
||||
* Returns a fresh, unique, empty logical database on an instance of the
|
||||
* given database ID platform.
|
||||
*
|
||||
* @param id - The ID of the database platform to use, e.g. 'POSTGRES_13'
|
||||
* @param id - The ID of the database platform to use, e.g. 'POSTGRES_14'
|
||||
* @returns A `Knex` connection object
|
||||
*/
|
||||
async init(id: TestDatabaseId): Promise<Knex> {
|
||||
|
||||
@@ -28,6 +28,7 @@ export interface Engine {
|
||||
* @public
|
||||
*/
|
||||
export type TestDatabaseId =
|
||||
| 'POSTGRES_18'
|
||||
| 'POSTGRES_17'
|
||||
| 'POSTGRES_16'
|
||||
| 'POSTGRES_15'
|
||||
@@ -48,6 +49,13 @@ export type TestDatabaseProperties = {
|
||||
|
||||
export const allDatabases: Record<TestDatabaseId, TestDatabaseProperties> =
|
||||
Object.freeze({
|
||||
POSTGRES_18: {
|
||||
name: 'Postgres 18.x',
|
||||
driver: 'pg',
|
||||
dockerImageName: getDockerImageForName('postgres:18'),
|
||||
connectionStringEnvironmentVariableName:
|
||||
'BACKSTAGE_TEST_DATABASE_POSTGRES18_CONNECTION_STRING',
|
||||
},
|
||||
POSTGRES_17: {
|
||||
name: 'Postgres 17.x',
|
||||
driver: 'pg',
|
||||
|
||||
@@ -17,5 +17,5 @@
|
||||
import { TestDatabases } from '@backstage/backend-test-utils';
|
||||
|
||||
TestDatabases.setDefaults({
|
||||
ids: ['MYSQL_8', 'POSTGRES_17', 'POSTGRES_13', 'SQLITE_3'],
|
||||
ids: ['MYSQL_8', 'POSTGRES_18', 'POSTGRES_14', 'SQLITE_3'],
|
||||
});
|
||||
|
||||
@@ -19,5 +19,5 @@ import { TestDatabases } from '@backstage/backend-test-utils';
|
||||
export {};
|
||||
|
||||
TestDatabases.setDefaults({
|
||||
ids: ['MYSQL_8', 'POSTGRES_17', 'POSTGRES_13', 'SQLITE_3'],
|
||||
ids: ['MYSQL_8', 'POSTGRES_18', 'POSTGRES_14', 'SQLITE_3'],
|
||||
});
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ jest.setTimeout(60_000);
|
||||
|
||||
describe('IncrementalIngestionDatabaseManager', () => {
|
||||
const databases = TestDatabases.create({
|
||||
ids: ['POSTGRES_17', 'POSTGRES_13', 'SQLITE_3'],
|
||||
ids: ['POSTGRES_18', 'POSTGRES_14', 'SQLITE_3'],
|
||||
});
|
||||
|
||||
it.each(databases.eachSupportedId())(
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ jest.setTimeout(60_000);
|
||||
describe('WrapperProviders', () => {
|
||||
const applyDatabaseMigrations = jest.fn();
|
||||
const databases = TestDatabases.create({
|
||||
ids: ['POSTGRES_17', 'POSTGRES_13', 'SQLITE_3', 'MYSQL_8'],
|
||||
ids: ['POSTGRES_18', 'POSTGRES_14', 'SQLITE_3', 'MYSQL_8'],
|
||||
});
|
||||
const config = new ConfigReader({});
|
||||
const logger = mockServices.logger.mock();
|
||||
|
||||
@@ -19,5 +19,5 @@ import { TestDatabases } from '@backstage/backend-test-utils';
|
||||
export {};
|
||||
|
||||
TestDatabases.setDefaults({
|
||||
ids: ['MYSQL_8', 'POSTGRES_17', 'POSTGRES_13', 'SQLITE_3'],
|
||||
ids: ['MYSQL_8', 'POSTGRES_18', 'POSTGRES_14', 'SQLITE_3'],
|
||||
});
|
||||
|
||||
@@ -40,7 +40,7 @@ import { describePerformanceTest, performanceTraceEnabled } from './lib/env';
|
||||
jest.setTimeout(600_000);
|
||||
|
||||
const databases = TestDatabases.create({
|
||||
ids: [/* 'MYSQL_8', */ 'POSTGRES_17', /* 'POSTGRES_13',*/ 'SQLITE_3'],
|
||||
ids: [/* 'MYSQL_8', */ 'POSTGRES_18', /* 'POSTGRES_14',*/ 'SQLITE_3'],
|
||||
disableDocker: false,
|
||||
});
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import { describePerformanceTest, performanceTraceEnabled } from './lib/env';
|
||||
jest.setTimeout(600_000);
|
||||
|
||||
const databases = TestDatabases.create({
|
||||
ids: [/* 'MYSQL_8', */ 'POSTGRES_17', /* 'POSTGRES_13',*/ 'SQLITE_3'],
|
||||
ids: [/* 'MYSQL_8', */ 'POSTGRES_18', /* 'POSTGRES_14',*/ 'SQLITE_3'],
|
||||
disableDocker: false,
|
||||
});
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import { DeferredEntity } from '@backstage/plugin-catalog-node';
|
||||
jest.setTimeout(600_000);
|
||||
|
||||
const databases = TestDatabases.create({
|
||||
ids: [/* 'MYSQL_8', */ 'POSTGRES_17', /* 'POSTGRES_13',*/ 'SQLITE_3'],
|
||||
ids: [/* 'MYSQL_8', */ 'POSTGRES_18', /* 'POSTGRES_14',*/ 'SQLITE_3'],
|
||||
disableDocker: false,
|
||||
});
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ class Tracker {
|
||||
|
||||
describePerformanceTest('stitchingPerformance', () => {
|
||||
const databases = TestDatabases.create({
|
||||
ids: [/* 'MYSQL_8', */ 'POSTGRES_17', 'POSTGRES_13', 'SQLITE_3'],
|
||||
ids: [/* 'MYSQL_8', */ 'POSTGRES_18', 'POSTGRES_14', 'SQLITE_3'],
|
||||
});
|
||||
|
||||
it.each(databases.eachSupportedId())(
|
||||
|
||||
@@ -42,7 +42,7 @@ async function migrateUntilBefore(knex: Knex, target: string): Promise<void> {
|
||||
jest.setTimeout(60_000);
|
||||
|
||||
const databases = TestDatabases.create({
|
||||
ids: ['POSTGRES_9', 'POSTGRES_13', 'POSTGRES_16'],
|
||||
ids: ['POSTGRES_9', 'POSTGRES_14', 'POSTGRES_16'],
|
||||
});
|
||||
|
||||
const maybeDescribe =
|
||||
|
||||
@@ -147,7 +147,7 @@ describe('eventsPlugin', () => {
|
||||
}
|
||||
|
||||
const databases = TestDatabases.create({
|
||||
ids: ['SQLITE_3', 'MYSQL_8', 'POSTGRES_13', 'POSTGRES_17'],
|
||||
ids: ['SQLITE_3', 'MYSQL_8', 'POSTGRES_14', 'POSTGRES_18'],
|
||||
});
|
||||
|
||||
async function mockKnexFactory(databaseId: TestDatabaseId) {
|
||||
|
||||
@@ -26,7 +26,7 @@ jest.setTimeout(60_000);
|
||||
const logger = mockServices.logger.mock();
|
||||
|
||||
const databases = TestDatabases.create({
|
||||
ids: ['POSTGRES_13', 'POSTGRES_17'],
|
||||
ids: ['POSTGRES_14', 'POSTGRES_18'],
|
||||
});
|
||||
|
||||
const maybeDescribe =
|
||||
|
||||
@@ -68,7 +68,7 @@ describe('DatabaseDocumentStore', () => {
|
||||
|
||||
describe('supported', () => {
|
||||
const databases = TestDatabases.create({
|
||||
ids: ['POSTGRES_13'],
|
||||
ids: ['POSTGRES_14'],
|
||||
});
|
||||
|
||||
async function createStore(databaseId: TestDatabaseId) {
|
||||
|
||||
@@ -38,7 +38,7 @@ describe('util', () => {
|
||||
|
||||
describe('supported', () => {
|
||||
const databases = TestDatabases.create({
|
||||
ids: ['POSTGRES_17', 'POSTGRES_13'],
|
||||
ids: ['POSTGRES_18', 'POSTGRES_14'],
|
||||
});
|
||||
|
||||
if (databases.eachSupportedId().length < 1) {
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
jest.setTimeout(60_000);
|
||||
|
||||
const databases = TestDatabases.create({
|
||||
ids: ['POSTGRES_13', 'SQLITE_3'],
|
||||
ids: ['POSTGRES_14', 'SQLITE_3'],
|
||||
});
|
||||
|
||||
async function createStore(databaseId: TestDatabaseId) {
|
||||
|
||||
Reference in New Issue
Block a user