[ARVADOS] updated: 1.3.0-2496-g91aeea6d7

Git user git at public.arvados.org
Thu Apr 16 19:44:34 UTC 2020


Summary of changes:
 build/run-library.sh                  | 4 +++-
 sdk/python/tests/run_test_server.py   | 1 -
 services/api/config/arvados_config.rb | 5 +++++
 3 files changed, 8 insertions(+), 2 deletions(-)

       via  91aeea6d741f2bec6ecdc32d24537cf0f2a7328a (commit)
      from  565477d2995de8620ca87c300d5db62fea6a406f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 91aeea6d741f2bec6ecdc32d24537cf0f2a7328a
Author: Tom Clegg <tom at tomclegg.ca>
Date:   Thu Apr 16 15:40:28 2020 -0400

    Remove "template=template0" from db connection params.
    
    It's not a valid connection param. Only pass it to Rails in test mode
    as a pseudo connection param.
    
    No issue #
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>

diff --git a/build/run-library.sh b/build/run-library.sh
index ac5dc718b..fd37f632b 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -912,7 +912,9 @@ timer_reset() {
 }
 
 timer() {
-    echo -n "$(($SECONDS - $t0))s"
+    if [[ -n "$t0" ]]; then
+        echo -n "$(($SECONDS - $t0))s"
+    fi
 }
 
 report_outcomes() {
diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py
index 22d4f62ea..734bb0427 100644
--- a/sdk/python/tests/run_test_server.py
+++ b/sdk/python/tests/run_test_server.py
@@ -676,7 +676,6 @@ def setup_config():
 	    "dbname": "arvados_test",
 	    "user": "arvados",
 	    "password": "insecure_arvados_test",
-            "template": "template0", # used by RailsAPI when [re]creating the database
         }
 
     localhost = "127.0.0.1"
diff --git a/services/api/config/arvados_config.rb b/services/api/config/arvados_config.rb
index 8d2544dde..502e3e787 100644
--- a/services/api/config/arvados_config.rb
+++ b/services/api/config/arvados_config.rb
@@ -253,6 +253,11 @@ end
 if ::Rails.env.to_s == "test" && db_config["test"].nil?
   $arvados_config["PostgreSQL"]["Connection"]["dbname"] = "arvados_test"
 end
+if ::Rails.env.to_s == "test"
+  # Use template0 when creating a new database. Avoids
+  # character-encoding/collation problems.
+  $arvados_config["PostgreSQL"]["Connection"]["template"] = "template0"
+end
 
 if $arvados_config["PostgreSQL"]["Connection"]["password"].empty?
   raise "Database password is empty, PostgreSQL section is: #{$arvados_config["PostgreSQL"]}"

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list