From 0576ca944267b66ca53e6694e05999562f0eded4 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Sat, 19 Nov 2022 13:31:18 -0500 Subject: [PATCH] fix docker build issues --- .github/workflows/docker.yml | 3 ++- Cargo.lock | 2 +- src/pg/db.rs | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index fae258ae3..0d598fcee 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -62,9 +62,10 @@ jobs: - name: Test Docker image run: | - TAG=$(echo '${{ steps.docker_meta.outputs.tags }}' | cut -d' ' -f1) + TAG=$(echo '${{ steps.docker_meta.outputs.json }}' | jq -r '.tags[0]') export MARTIN_BUILD=- export MARTIN_BIN="docker run --rm --net host -e DATABASE_URL -v $PWD/tests:/tests $TAG" + echo "MARTIN_BIN=$MARTIN_BIN" tests/test.sh env: DATABASE_URL: ${{ steps.pg.outputs.connection-uri }} diff --git a/Cargo.lock b/Cargo.lock index a2f94bbd1..cf181f678 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1047,7 +1047,7 @@ dependencies = [ [[package]] name = "martin" -version = "0.6.0-rc.1" +version = "0.6.0" dependencies = [ "actix", "actix-cors", diff --git a/src/pg/db.rs b/src/pg/db.rs index ac5503694..2d12b291a 100755 --- a/src/pg/db.rs +++ b/src/pg/db.rs @@ -25,8 +25,9 @@ pub type Connection<'a> = PooledConnection<'a, ConnectionManager>; const REQUIRED_POSTGIS_VERSION: &str = ">= 2.4.0"; pub async fn setup_connection_pool(config: &PgConfig) -> io::Result { - let cfg = pg::Config::from_str(config.connection_string.as_str()) - .map_err(|e| prettify_error!(e, "Can't parse connection string"))?; + let conn_str = config.connection_string.as_str(); + let cfg = pg::Config::from_str(conn_str) + .map_err(|e| prettify_error!(e, "Can't parse connection string {}", conn_str))?; #[cfg(not(feature = "ssl"))] let mgr = ConnectionManager::new(cfg, postgres::NoTls);