google / ml-metadata

For recording and retrieving metadata associated with ML developer and data scientist workflows.
https://www.tensorflow.org/tfx/guide/mlmd
Apache License 2.0
625 stars 147 forks source link

Using ML metadata postgres SSL connection options don't work for `sslMode=require` #187

Open dhirajsb opened 11 months ago

dhirajsb commented 11 months ago

Checked with both 1.14.0 and 1.15.0.dev20230814 versions of mlmd Docker images.

Trying to use Postgres SSL configuration options with sslMode=require causes the following error:

WARNING: Logging before InitGoogleLogging() is written to STDERR
I1122 01:34:29.953503     1 postgresql_metadata_source.cc:208] Connecting to database. 
E1122 01:34:29.953600     1 postgresql_metadata_source.cc:211] PostgreSQL error: sslmode value "require" invalid when SSL support is not compiled in
F1122 01:34:29.953652     1 metadata_store_server_main.cc:555] Check failed: absl::OkStatus() == status (OK vs. INTERNAL: PostgreSQL metadata source error: connection pointer is NULL
) MetadataStore cannot be created with the given connection config.
*** Check failure stack trace: ***

Searching the error on the web suggests that the libpq library included in mlmd Docker image was not compiled with --with-openssl configure option.

Is this an issue in the image, or are we missing some other option when using the Docker image?

rareddy commented 10 months ago

@XinranTang can help us with correcting the build? thank you.