Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:

postgres:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Upgrading the PostgreSQL image from version 15 to 18 without a data migration strategy will cause the database service to fail on startup if an existing data volume is present.
Severity: CRITICAL

Suggested Fix

Include a data migration strategy for existing deployments. This could involve adding a manual upgrade step to the deployment process using pg_dump and pg_restore, or creating an initialization script that handles the data migration automatically. Alternatively, if this is for new deployments only, document that the volume must be cleared.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: docker-compose.yml#L22

Potential issue: The `docker-compose.yml` file updates the PostgreSQL image from version
15 to 18. PostgreSQL data directories are not compatible across major versions. When the
new container starts, it will attempt to use the existing data in the persistent volume
`staryl-postgres-data`. This will cause the database service to fail to start due to the
data format incompatibility, as no migration logic (like `pg_upgrade`) or initialization
scripts to handle the version change are included.

Did we get this right? πŸ‘ / πŸ‘Ž to inform future reviews.

container_name: staryl-postgres
image: "postgres:15-alpine"
image: "postgres:18-alpine"
ports:
- "5432:5432"
restart: no
Expand Down
46 changes: 23 additions & 23 deletions src/lib/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@
export const PathSrc = new URL("./src/", PathRoot);

export enum BrandingColors {
Primary = 0xFFFFFF,
Primary = 0xffffff,

Check failure on line 5 in src/lib/common/constants.ts

View workflow job for this annotation

GitHub Actions / πŸ”  Lint project

eslint-plugin-unicorn(number-literal-case)

Unexpected hexadecimal digits in lowercase.
Secondary = 0x0000,
}

export enum Colors {
White = 0xE7E7E8,
Amber = 0xFFC107,
Amber300 = 0xFFD54F,
Blue = 0x2196F3,
BlueGrey = 0x607D8B,
White = 0xe7e7e8,

Check failure on line 10 in src/lib/common/constants.ts

View workflow job for this annotation

GitHub Actions / πŸ”  Lint project

eslint-plugin-unicorn(number-literal-case)

Unexpected hexadecimal digits in lowercase.
Amber = 0xffc107,

Check failure on line 11 in src/lib/common/constants.ts

View workflow job for this annotation

GitHub Actions / πŸ”  Lint project

eslint-plugin-unicorn(number-literal-case)

Unexpected hexadecimal digits in lowercase.
Amber300 = 0xffd54f,

Check failure on line 12 in src/lib/common/constants.ts

View workflow job for this annotation

GitHub Actions / πŸ”  Lint project

eslint-plugin-unicorn(number-literal-case)

Unexpected hexadecimal digits in lowercase.
Blue = 0x2196f3,

Check failure on line 13 in src/lib/common/constants.ts

View workflow job for this annotation

GitHub Actions / πŸ”  Lint project

eslint-plugin-unicorn(number-literal-case)

Unexpected hexadecimal digits in lowercase.
BlueGrey = 0x607d8b,

Check failure on line 14 in src/lib/common/constants.ts

View workflow job for this annotation

GitHub Actions / πŸ”  Lint project

eslint-plugin-unicorn(number-literal-case)

Unexpected hexadecimal digits in lowercase.
Brown = 0x795548,
Cyan = 0x00BCD4,
DeepOrange = 0xFF5722,
DeepPurple = 0x673AB7,
Green = 0x4CAF50,
Grey = 0x9E9E9E,
Indigo = 0x3F51B5,
LightBlue = 0x03A9F4,
LightGreen = 0x8BC34A,
Lime = 0xCDDC39,
Lime300 = 0xDCE775,
Orange = 0xFF9800,
Pink = 0xE91E63,
Purple = 0x9C27B0,
Red = 0xF44336,
Red300 = 0xE57373,
Cyan = 0x00bcd4,

Check failure on line 16 in src/lib/common/constants.ts

View workflow job for this annotation

GitHub Actions / πŸ”  Lint project

eslint-plugin-unicorn(number-literal-case)

Unexpected hexadecimal digits in lowercase.
DeepOrange = 0xff5722,

Check failure on line 17 in src/lib/common/constants.ts

View workflow job for this annotation

GitHub Actions / πŸ”  Lint project

eslint-plugin-unicorn(number-literal-case)

Unexpected hexadecimal digits in lowercase.
DeepPurple = 0x673ab7,

Check failure on line 18 in src/lib/common/constants.ts

View workflow job for this annotation

GitHub Actions / πŸ”  Lint project

eslint-plugin-unicorn(number-literal-case)

Unexpected hexadecimal digits in lowercase.
Green = 0x4caf50,

Check failure on line 19 in src/lib/common/constants.ts

View workflow job for this annotation

GitHub Actions / πŸ”  Lint project

eslint-plugin-unicorn(number-literal-case)

Unexpected hexadecimal digits in lowercase.
Grey = 0x9e9e9e,
Indigo = 0x3f51b5,
LightBlue = 0x03a9f4,
LightGreen = 0x8bc34a,
Lime = 0xcddc39,
Lime300 = 0xdce775,
Orange = 0xff9800,
Pink = 0xe91e63,
Purple = 0x9c27b0,
Red = 0xf44336,
Red300 = 0xe57373,
Teal = 0x009688,
Yellow = 0xFFEB3B,
Yellow300 = 0xFFF176,
Yellow = 0xffeb3b,
Yellow300 = 0xfff176,
}
Loading