Skip to content
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ verbatim as the body of the matching GitHub release.

| Version | Date | Notes |
|---|---|---|
| v0.2.6 | 2026-11-23 | [changelog/v0.2.6.md](changelog/v0.2.6.md) |
| v0.2.5 | 2026-11-23 | [changelog/v0.2.5.md](changelog/v0.2.5.md) |
| v0.2.4 | 2026-11-23 | [changelog/v0.2.4.md](changelog/v0.2.4.md) |
| v0.2.3 | 2026-11-20 | [changelog/v0.2.3.md](changelog/v0.2.3.md) |
Expand Down
22 changes: 22 additions & 0 deletions changelog/v0.2.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# v0.2.6

Fixes the v0.2.5 migration, which crash-looped a Postgres deployment.

## Fixed

- **V21 no longer crash-loops the gateway on Postgres 16.** v0.2.5 found the provider type
constraint by listing every `CHECK` constraint on `providers` and dropping it. Postgres
16 also reports `NOT NULL` as a `CHECK` constraint in
`information_schema.table_constraints`, with a synthesized name such as
`2200_16395_1_not_null` that cannot be dropped: the migration failed, Flyway rolled it
back, and the container restarted into the same failure. V21 now joins
`information_schema.check_constraints` and drops only the constraint whose clause
mentions `OPENAI`, so the type check is the only candidate. On Postgres the synthetic
`NOT NULL` rows do not appear in `check_constraints` at all, so the join excludes them
even before the clause filter.
- No schema change beyond v0.2.5's intended one: the `providers` type check still ends up
listing `OPENAI`, `ANTHROPIC`, `GEMINI` and `VERTEX`.

If a deployment was left crash-looping by v0.2.5, deploying v0.2.6 is enough: the failed
migration was rolled back, so Flyway runs the corrected V21 on the next boot. No manual
database step.
2 changes: 1 addition & 1 deletion deploy/dokploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ database. The console is always a plain Application.
3. Compose path: `deploy/dokploy/compose.yml`.
4. **Trigger Type: On Tag**, with auto-deploy enabled. The gateway is a production
service; a pull request or a push to `Develop` must not restart it. A release tag
(`v0.2.5`) is the only thing that deploys — see "When it deploys" below.
(`v0.2.6`) is the only thing that deploys — see "When it deploys" below.
5. **Environment** (the compose file references all of these):

```bash
Expand Down
2 changes: 1 addition & 1 deletion docs/SPRING-AI.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on Spring AI; the gateway never depends on it.
<dependency>
<groupId>io.github.an1ndra</groupId>
<artifactId>path-spring-ai</artifactId>
<version>0.2.5</version>
<version>0.2.6</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion path-gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>io.github.an1ndra</groupId>
<artifactId>path-parent</artifactId>
<version>0.2.5</version>
<version>0.2.6</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
15 changes: 13 additions & 2 deletions path-gateway/src/main/java/db/migration/V21__Provider_types.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,19 @@ public void migrate(Context context) throws Exception {

private List<String> checkConstraints(Connection connection) throws Exception {
List<String> names = new ArrayList<>();
String sql = "select constraint_name from information_schema.table_constraints "
+ "where lower(table_name) = '" + TABLE + "' and constraint_type = 'CHECK'";
// Filter on the clause, not just the constraint type. Postgres 16 reports NOT NULL
// as a CHECK constraint in information_schema.table_constraints with a synthetic
// name that cannot be dropped (ERROR: constraint "..._not_null" does not exist),
// which failed this migration and crash-looped the gateway. Only the type check
// mentions OPENAI.
String sql = "select tc.constraint_name "
+ "from information_schema.table_constraints tc "
+ "join information_schema.check_constraints cc "
+ " on cc.constraint_name = tc.constraint_name "
+ " and cc.constraint_schema = tc.constraint_schema "
+ "where lower(tc.table_name) = '" + TABLE + "' "
+ " and tc.constraint_type = 'CHECK' "
+ " and cc.check_clause like '%OPENAI%'";
try (Statement statement = connection.createStatement();
ResultSet rows = statement.executeQuery(sql)) {
while (rows.next()) {
Expand Down
2 changes: 1 addition & 1 deletion path-spring-ai/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>io.github.an1ndra</groupId>
<artifactId>path-parent</artifactId>
<version>0.2.5</version>
<version>0.2.6</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>io.github.an1ndra</groupId>
<artifactId>path-parent</artifactId>
<version>0.2.5</version>
<version>0.2.6</version>
<packaging>pom</packaging>
<name>path-parent</name>
<description>Build parent for Path, the provider-agnostic LLM gateway, and its Spring AI adapter</description>
Expand Down
Loading