temporalio / temporal

Temporal service
https://docs.temporal.io
MIT License
11.27k stars 810 forks source link

postgres plugin no longer supported for default schema in 1.24.0? #6053

Closed bllfr0g closed 3 months ago

bllfr0g commented 3 months ago

running 1.23.1, I have the postgres driver for the default schmea, and postgres_12 for the visibility schema (in order to have advanced visibilty.)

when I upgrade to 1.24.0, I get this error:

[Fx] Error returned: received non-nil error from function "go.temporal.io/server/temporal".ServerOptionsProvider
    /home/runner/work/docker-builds/docker-builds/temporal/temporal/fx.go:183:
sql schema version compatibility check failed: not supported plugin postgres, only supported: map[mysql8:0x42f15c0 postgres12:0xc000721380 postgres12_pgx:0xc000721390 sqlite:0x42aef78]
[Fx] ERROR      Failed to initialize custom logger: could not build arguments for function "go.uber.org/fx".(*module).constructCustomLogger.func2
    /home/runner/go/pkg/mod/go.uber.org/fx@v1.21.1/module.go:292:
failed to build fxevent.Logger:
could not build arguments for function "go.temporal.io/server/temporal".glob..func8
    /home/runner/work/docker-builds/docker-builds/temporal/temporal/fx.go:1009:
failed to build log.Logger:
received non-nil error from function "go.temporal.io/server/temporal".ServerOptionsProvider
    /home/runner/work/docker-builds/docker-builds/temporal/temporal/fx.go:183:
sql schema version compatibility check failed: not supported plugin postgres, only supported: map[mysql8:0x42f15c0 postgres12:0xc000721380 postgres12_pgx:0xc000721390 sqlite:0x42aef78]
Unable to create server. Error: could not build arguments for function "go.uber.org/fx".(*module).constructCustomLogger.func2 (/home/runner/go/pkg/mod/go.uber.org/fx@v1.21.1/module.go:292): failed to build fxevent.Logger: could not build arguments for function "go.temporal.io/server/temporal".glob..func8 (/home/runner/work/docker-builds/docker-builds/temporal/temporal/fx.go:1009): failed to build log.Logger: received non-nil error from function "go.temporal.io/server/temporal".ServerOptionsProvider (/home/runner/work/docker-builds/docker-builds/temporal/temporal/fx.go:183): sql schema version compatibility check failed: not supported plugin postgres, only supported: map[mysql8:0x42f15c0 postgres12:0xc000721380 postgres12_pgx:0xc000721390 sqlite:0x42aef78].

I'm guessing that means I need to switch to the postgres12 plugin for the default schema now as well?

That's no problem for me, I'm running postgres16. Just wondering if this is expected; I didn't see it mentioned in the release notes.

rodrigozhou commented 3 months ago

Apologies for the causing the issue. Yes this is expected, and the release notes have been edited to address this change.

jaylin-sf commented 2 months ago

Hi @rodrigozhou,

I have the same issue with 1.24.2, the databases in PostgreSQL (Azure Flexible Server) have been created successfully. But it failed to build log.Logger for some reason.

Unable to create server. Error: could not build arguments for function "go.uber.org/fx".(*module).constructCustomLogger.func2 (/home/runner/go/pkg/mod/go.uber.org/fx@v1.21.1/module.go:292): failed to build fxevent.Logger: could not build arguments for function "go.temporal.io/server/temporal".glob..func8 (/home/runner/work/docker-builds/docker-builds/temporal/temporal/fx.go:1009): failed to build log.Logger: received non-nil error from function "go.temporal.io/server/temporal".ServerOptionsProvider (/home/runner/work/docker-builds/docker-builds/temporal/temporal/fx.go:183): sql schema version compatibility check failed: pq: no pg_hba.conf entry for host "20.227.4.75", user "temporal_pg_test", database "temporal", no encryption.

BTW: I passed in CA file in environment variables with the latest docker image (temporalio/auto-setup): POSTGRES_TLS_ENABLED = true POSTGRES_TLS_CA_FILE = {path from container volume}

DB = postgres12

Regards, Jay