[ARVADOS] updated: 2.1.0-100-g15d64feed

Git user git at public.arvados.org
Tue Nov 17 22:36:37 UTC 2020


Summary of changes:
 build/run-build-docker-jobs-image.sh        |  5 +++++
 build/run-library.sh                        | 21 ++-------------------
 sdk/cwl/arvados_version.py                  |  9 +++++++--
 sdk/python/arvados_version.py               |  9 +++++++--
 services/dockercleaner/arvados_version.py   |  5 +++--
 services/fuse/arvados_version.py            |  5 +++--
 tools/crunchstat-summary/arvados_version.py |  5 +++--
 7 files changed, 30 insertions(+), 29 deletions(-)

       via  15d64feed20daa4a422ff9092615ac1e295d5ca2 (commit)
      from  185b8af696c553c0978f27e720c6924148af22fd (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 15d64feed20daa4a422ff9092615ac1e295d5ca2
Author: Ward Vandewege <ward at curii.com>
Date:   Tue Nov 17 17:35:31 2020 -0500

    17012: switch calculate_python_sdk_cwl_package_versions() to use the
           python version calculation code. This effectively is bash calling
           python calling bash, which I don't like, but the code is simpler.
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/build/run-build-docker-jobs-image.sh b/build/run-build-docker-jobs-image.sh
index d2c9f7274..59914a2ee 100755
--- a/build/run-build-docker-jobs-image.sh
+++ b/build/run-build-docker-jobs-image.sh
@@ -157,6 +157,11 @@ fi
 # version.
 cwl_runner_version_tag=$(echo -n $cwl_runner_version | sed s/~dev/.dev/g | sed s/~rc/rc/g)
 
+if [[ -z "$cwl_runner_version_tag" ]]; then
+  echo "ERROR: cwl_runner_version_tag is empty";
+  exit 1
+fi
+
 if [[ "${cwl_runner_version}" != "${ARVADOS_BUILDING_VERSION}" ]]; then
 	cwl_runner_version="${cwl_runner_version}-1"
 else
diff --git a/build/run-library.sh b/build/run-library.sh
index c925cf1cd..1716cf370 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -75,25 +75,8 @@ timestamp_from_git() {
 }
 
 calculate_python_sdk_cwl_package_versions() {
-  python_sdk_ts=$(cd sdk/python && timestamp_from_git)
-  cwl_runner_ts=$(cd sdk/cwl && timestamp_from_git)
-  build_ts=$(cd build && timestamp_from_git version-at-commit.sh)
-
-  ar=($python_sdk_ts $cwl_runner_ts $build_ts)
-  OLDIFS=$IFS
-  IFS=$'\n'
-  max=`echo "${ar[*]}" | sort -nr | head -n1`
-  IFS=$OLDIFS
-
-  python_sdk_version=$(cd sdk/python && nohash_version_from_git)
-  cwl_runner_version=$(cd sdk/cwl && nohash_version_from_git)
-  build_version=$(cd build && nohash_version_from_git version-at-commit.sh)
-
-  if [[ $max -eq $build_ts ]]; then
-    cwl_runner_version=$build_version
-  elif [[ $max -eq $python_sdk_ts ]]; then
-    cwl_runner_version=$python_sdk_version
-  fi
+  python_sdk_version=$(cd sdk/python && python3 arvados_version.py)
+  cwl_runner_version=$(cd sdk/cwl && python3 arvados_version.py)
 }
 
 handle_python_package () {
diff --git a/sdk/cwl/arvados_version.py b/sdk/cwl/arvados_version.py
index 006194935..c3936617f 100644
--- a/sdk/cwl/arvados_version.py
+++ b/sdk/cwl/arvados_version.py
@@ -6,6 +6,7 @@ import subprocess
 import time
 import os
 import re
+import sys
 
 SETUP_DIR = os.path.dirname(os.path.abspath(__file__))
 VERSION_PATHS = {
@@ -23,7 +24,7 @@ def choose_version_from():
 
     sorted_ts = sorted(ts.items())
     getver = sorted_ts[-1][1]
-    print("Using "+getver+" for version number calculation of "+SETUP_DIR)
+    print("Using "+getver+" for version number calculation of "+SETUP_DIR, file=sys.stderr)
     return getver
 
 def git_version_at_commit():
@@ -51,7 +52,11 @@ def get_version(setup_dir, module):
         try:
             save_version(setup_dir, module, git_version_at_commit())
         except (subprocess.CalledProcessError, OSError) as err:
-            print("ERROR: {0}".format(err))
+            print("ERROR: {0}".format(err), file=sys.stderr)
             pass
 
     return read_version(setup_dir, module)
+
+# Called from calculate_python_sdk_cwl_package_versions() in run-library.sh
+if __name__ == '__main__':
+    print(get_version(SETUP_DIR, "arvados_cwl"))
diff --git a/sdk/python/arvados_version.py b/sdk/python/arvados_version.py
index 154a56607..092131d93 100644
--- a/sdk/python/arvados_version.py
+++ b/sdk/python/arvados_version.py
@@ -6,6 +6,7 @@ import subprocess
 import time
 import os
 import re
+import sys
 
 SETUP_DIR = os.path.dirname(os.path.abspath(__file__))
 VERSION_PATHS = {
@@ -22,7 +23,7 @@ def choose_version_from():
 
     sorted_ts = sorted(ts.items())
     getver = sorted_ts[-1][1]
-    print("Using "+getver+" for version number calculation of "+SETUP_DIR)
+    print("Using "+getver+" for version number calculation of "+SETUP_DIR, file=sys.stderr)
     return getver
 
 def git_version_at_commit():
@@ -50,7 +51,11 @@ def get_version(setup_dir, module):
         try:
             save_version(setup_dir, module, git_version_at_commit())
         except (subprocess.CalledProcessError, OSError) as err:
-            print("ERROR: {0}".format(err))
+            print("ERROR: {0}".format(err), file=sys.stderr)
             pass
 
     return read_version(setup_dir, module)
+
+# Called from calculate_python_sdk_cwl_package_versions() in run-library.sh
+if __name__ == '__main__':
+    print(get_version(SETUP_DIR, "arvados"))
diff --git a/services/dockercleaner/arvados_version.py b/services/dockercleaner/arvados_version.py
index 154a56607..38e6f564e 100644
--- a/services/dockercleaner/arvados_version.py
+++ b/services/dockercleaner/arvados_version.py
@@ -6,6 +6,7 @@ import subprocess
 import time
 import os
 import re
+import sys
 
 SETUP_DIR = os.path.dirname(os.path.abspath(__file__))
 VERSION_PATHS = {
@@ -22,7 +23,7 @@ def choose_version_from():
 
     sorted_ts = sorted(ts.items())
     getver = sorted_ts[-1][1]
-    print("Using "+getver+" for version number calculation of "+SETUP_DIR)
+    print("Using "+getver+" for version number calculation of "+SETUP_DIR, file=sys.stderr)
     return getver
 
 def git_version_at_commit():
@@ -50,7 +51,7 @@ def get_version(setup_dir, module):
         try:
             save_version(setup_dir, module, git_version_at_commit())
         except (subprocess.CalledProcessError, OSError) as err:
-            print("ERROR: {0}".format(err))
+            print("ERROR: {0}".format(err), file=sys.stderr)
             pass
 
     return read_version(setup_dir, module)
diff --git a/services/fuse/arvados_version.py b/services/fuse/arvados_version.py
index 02b22e8ea..d8eec3d9e 100644
--- a/services/fuse/arvados_version.py
+++ b/services/fuse/arvados_version.py
@@ -6,6 +6,7 @@ import subprocess
 import time
 import os
 import re
+import sys
 
 SETUP_DIR = os.path.dirname(os.path.abspath(__file__))
 VERSION_PATHS = {
@@ -23,7 +24,7 @@ def choose_version_from():
 
     sorted_ts = sorted(ts.items())
     getver = sorted_ts[-1][1]
-    print("Using "+getver+" for version number calculation of "+SETUP_DIR)
+    print("Using "+getver+" for version number calculation of "+SETUP_DIR, file=sys.stderr)
     return getver
 
 def git_version_at_commit():
@@ -51,7 +52,7 @@ def get_version(setup_dir, module):
         try:
             save_version(setup_dir, module, git_version_at_commit())
         except (subprocess.CalledProcessError, OSError) as err:
-            print("ERROR: {0}".format(err))
+            print("ERROR: {0}".format(err), file=sys.stderr)
             pass
 
     return read_version(setup_dir, module)
diff --git a/tools/crunchstat-summary/arvados_version.py b/tools/crunchstat-summary/arvados_version.py
index 02b22e8ea..d8eec3d9e 100644
--- a/tools/crunchstat-summary/arvados_version.py
+++ b/tools/crunchstat-summary/arvados_version.py
@@ -6,6 +6,7 @@ import subprocess
 import time
 import os
 import re
+import sys
 
 SETUP_DIR = os.path.dirname(os.path.abspath(__file__))
 VERSION_PATHS = {
@@ -23,7 +24,7 @@ def choose_version_from():
 
     sorted_ts = sorted(ts.items())
     getver = sorted_ts[-1][1]
-    print("Using "+getver+" for version number calculation of "+SETUP_DIR)
+    print("Using "+getver+" for version number calculation of "+SETUP_DIR, file=sys.stderr)
     return getver
 
 def git_version_at_commit():
@@ -51,7 +52,7 @@ def get_version(setup_dir, module):
         try:
             save_version(setup_dir, module, git_version_at_commit())
         except (subprocess.CalledProcessError, OSError) as err:
-            print("ERROR: {0}".format(err))
+            print("ERROR: {0}".format(err), file=sys.stderr)
             pass
 
     return read_version(setup_dir, module)

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list