kumimanu
07/24/2024, 7:22 PMauthzed/spicedb:v1.34.0
in GCP Cloud Run
- datastore is a postgres database in GCP AlloyDB
- changes to the docker image version prompt a Cloud Run Job to run any new migrations against the datastore
my problem is this: when running serve
on the container in Cloud Run, i get the following error:
error: "database validation failed: closed pool; if you have previously run `TRUNCATE`, this database is no longer valid and must be remigrated. See: https://spicedb.dev/d/truncate-unsupported"
level: "warn"
message: "could not check if the datastore was ready
the datastore is definitely migrated. the tables exist and there is seed data in some of them (relation_tuple_transaction, alembic_version, metadata). there was no manual TRUNCATE
run.
can anyone point me in the right direction to resolve this? i've tried running with trace
& debug
log levels, but this is still the best error message i can get. i'm pretty sure the postgres connection is happening successfully because i see logs in the database noting the connection establishment.
any help/guidance would be greatly appreciated. happy to provide more detail if needed. thanks!Jake
07/24/2024, 7:45 PMJake
07/24/2024, 7:47 PMspicedb-operator
is purpose built to intelligently walk database upgrades and corresponding software versions.Jake
07/24/2024, 7:48 PMkumimanu
07/24/2024, 8:14 PMSPICEDB_DATASTORE_CONN_URI
environment variables for both the migration job and the serving container, both from the same secret.kumimanu
07/24/2024, 8:16 PMkumimanu
07/24/2024, 8:20 PMJoey
07/24/2024, 9:20 PMclosed pool;
indicates a connection issue most likelykumimanu
07/24/2024, 9:33 PMSELECT unique_id FROM metadata
. that works when i run it right on the db but for some reason is not returning properly in GCP.kumimanu
07/24/2024, 9:34 PMpgx: {
args: [0]
commandTag: "SELECT 1"
pid: 1536370
sql: "SELECT unique_id FROM metadata"
time: 3.498286
}}
Jake
07/24/2024, 9:40 PMkumimanu
07/25/2024, 1:06 PM