Skip to content

Provide sqlite configs as cmdline flags#189

Open
lampajr wants to merge 2 commits intogoogle:masterfrom
lampajr:sqlite_as_cmdline_args
Open

Provide sqlite configs as cmdline flags#189
lampajr wants to merge 2 commits intogoogle:masterfrom
lampajr:sqlite_as_cmdline_args

Conversation

@lampajr
Copy link

@lampajr lampajr commented Dec 14, 2023

While using ml-metadata I noticed that there is no way to startup the server using sqlite configuration through flags, the only way I found (as stated by the documentation) was to use the config_file file option pointing to a pb file like:

connection_config {
  sqlite {
    filename_uri: '/tmp/test_db'
    connection_mode: READWRITE_OPENCREATE
  }
}

With this pull request I am proposing to introduce the possibility to startup the grpc server with sqlite config using cmdline flags, similarly to what is currently supported for mysql and postgresql.

Given this, the previous configuration could be replaced by cmdline flags as follow:

docker run -p ${MLMD_GRPC_PORT}:${MLMD_GRPC_PORT} --entrypoint /bin/metadata_store_server "${MLMD_DOCKER_IMAGE}" \
--grpc_port=${MLMD_GRPC_PORT} \
--metadata_source_config_type="sqlite" \
--sqlite_config_filename_uri=/tmp/test_db \
--sqlite_config_connection_mode=READWRITE_OPENCREATE

Technical addition

This PR proposes to add a:

  • New metadata_source_config_type named sqlite
  • Two flags that are considered only if metadata_source_config_type==sqlite:
    • --sqlite_config_filename_uri: required, specifies the sqlite db uri.
    • --sqlite_config_connection_mode: optional, specifies the sqlite connection mode. Default is READWRITE_OPENCREATE

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants