Metabase upgrade to 0.49.9 error (open source)

After applying the upgrade to the deployment.yaml, the pod crashes. The logs show the below

2024-05-10 10:12:39,853 INFO metabase.core :: Setting up and migrating Metabase DB. Please sit tight, this may take a minute...
2024-05-10 10:12:39,855 INFO db.setup :: Verifying postgres Database Connection ...
2024-05-10 10:12:40,688 INFO db.setup :: Successfully verified PostgreSQL 12.17 application database connection. :white_check_mark:
2024-05-10 10:12:40,688 INFO db.setup :: Checking if a database downgrade is required...
2024-05-10 10:12:41,750 INFO db.setup :: Running Database Migrations...
2024-05-10 10:12:41,751 INFO db.setup :: Setting up Liquibase...
2024-05-10 10:12:42,083 INFO db.setup :: Liquibase is ready.
2024-05-10 10:12:42,084 INFO db.liquibase :: Checking if Database has unrun migrations...
2024-05-10 10:12:42,881 INFO db.liquibase :: Database has unrun migrations. Checking if migraton lock is taken...
2024-05-10 10:12:42,956 INFO db.liquibase :: No migration lock found.
2024-05-10 10:12:43,451 INFO db.liquibase :: Running 2 migrations ...
2024-05-10 10:12:44,167 ERROR liquibase.changelog :: ChangeSet migrations/001_update_migrations.yaml::v49.2024-04-09T10:00:03::qnkhuat encountered an exception.

UPDATE SUMMARY
Run: 2
Previously run: 268
Filtered out: 17

Total change sets: 287

FILTERED CHANGE SETS SUMMARY
DBMS mismatch: 17

2024-05-10 10:12:44,250 ERROR metabase.core :: Metabase Initialization FAILED
liquibase.exception.CommandExecutionException: liquibase.exception.LiquibaseException: liquibase.exception.MigrationFailedException: Migration failed for changeset migrations/001_update_migrations.yaml::v49.2024-04-09T10:00:03::qnkhuat:
Reason: clojure.lang.ExceptionInfo: Unrecognized token ‘OMMITTED TOKEN' : was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
at [Source: REDACTED (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION disabled); line: 1, column: 112] {:toucan2/context-trace [["resolve connection" {:toucan2.connection/connectable org.postgresql.jdbc.PgConnection}] ["resolve connection" {:toucan2.connection/connectable

On your Metabase 001_update_migrations.yaml it refers to this:

  • changeSet:
    id: v49.2024-04-09T10:00:03
    author: qnkhuat
    comment: This clears the schedule for caching field values for databases with period scanning disabled.
    changes:
    - customChange:
    class: "metabase.db.custom_migrations.DeleteScanFieldValuesTriggerForDBThatTurnItOff"

Running a production postgres database

Appreciate any assistance

Many thanks

1 Like

What version did you upgrade from ?

It was metabase/metabase:v0.41.9

Although would downgrading to 0.48 fix the issue?

Hi, I also have a similar error, I have tried to migrate from version 46 to 49.
2024-05-11 23:59:56,953 ERROR liquibase.changelog :: ChangeSet migrations/001_update_migrations.yaml::v49.2024-04-09T10:00:03::qnkhuat encountered an exception.
metabase_1 | UPDATE SUMMARY
metabase_1 | Run: 2
metabase_1 | Previously run: 268
metabase_1 | Filtered out: 17
metabase_1 | -------------------------------
metabase_1 | Total change sets: 287
metabase_1 | FILTERED CHANGE SETS SUMMARY
metabase_1 | 2024-05-11 23:59:57,018 ERROR metabase.core :: Metabase Initialization FAILED

liquibase.exception.CommandExecutionException: liquibase.exception.LiquibaseException: liquibase.exception.MigrationFailedException: Migration failed for changeset migrations/001_update_migrations.yaml::v49.2024-04-09T10:00:03::qnkhuat:
metabase_1 | Reason: clojure.lang.ExceptionInfo: Unrecognized token 'TOIRLJAxSADsvgIxxxxxxxxxxxxxx': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
metabase_1 | at [Source: REDACTED (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION disabled); line: 1, column: 35] {:toucan2/context-trace [["resolve connection" {:toucan2.connection/connectable org.postgresql.jdbc.PgConnection}] ["resolve connection" {:toucan2.connection/connectable nil}]]}

Hi. To avoid the error, we migrated back down to 0.48.12 which skips the migration that was causing this issue - v49.2024-04-09T10:00:03

1 Like

I have the same issue. Stopped at version v0.49.8 because of that

1 Like

we've found the issue and it's being addressed in 49.11 for sure. It's due to encrypted DB details

3 Likes