[ARVADOS] updated: 2.1.0-99-gcca6e43ae

Git user git at public.arvados.org
Tue Nov 17 15:29:12 UTC 2020


Summary of changes:
 build/run-library.sh          | 15 +++++++++++++--
 sdk/python/arvados_version.py |  2 --
 2 files changed, 13 insertions(+), 4 deletions(-)

  discards  df8d0198fe92afe9bd382e8c344f8bb33387664b (commit)
  discards  166146793ce787ea536d4d768ddcab32dc7cbd57 (commit)
       via  cca6e43aefbe2a2febb209ee12f65d6822677627 (commit)
       via  735bdd664ab0e14d9883ceee6fd7bfdad45b25ce (commit)
       via  cbbc3107ccecea55bb3f7fad41b8e0ec3517a50b (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (df8d0198fe92afe9bd382e8c344f8bb33387664b)
            \
             N -- N -- N (cca6e43aefbe2a2febb209ee12f65d6822677627)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

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 cca6e43aefbe2a2febb209ee12f65d6822677627
Author: Ward Vandewege <ward at curii.com>
Date:   Tue Nov 17 10:26:58 2020 -0500

    17012: update calculation of python version number in run-library.sh
           (used by a few docker image scripts).
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/build/run-library.sh b/build/run-library.sh
index c598270ce..c925cf1cd 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -61,11 +61,12 @@ version_from_git() {
 }
 
 nohash_version_from_git() {
+    local subdir="$1"; shift
     if [[ -n "$ARVADOS_BUILDING_VERSION" ]]; then
         echo "$ARVADOS_BUILDING_VERSION"
         return
     fi
-    version_from_git | cut -d. -f1-4
+    version_from_git $subdir | cut -d. -f1-4
 }
 
 timestamp_from_git() {
@@ -76,11 +77,21 @@ 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 [[ $python_sdk_ts -gt $cwl_runner_ts ]]; then
+  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
 }

commit 735bdd664ab0e14d9883ceee6fd7bfdad45b25ce
Author: Ward Vandewege <ward at curii.com>
Date:   Tue Nov 17 09:52:53 2020 -0500

    17012: remove old gittaggers.py files.
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/sdk/cwl/gittaggers.py b/sdk/cwl/gittaggers.py
deleted file mode 100644
index d6a4c24a7..000000000
--- a/sdk/cwl/gittaggers.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright (C) The Arvados Authors. All rights reserved.
-#
-# SPDX-License-Identifier: Apache-2.0
-
-from builtins import str
-from builtins import next
-
-from setuptools.command.egg_info import egg_info
-import subprocess
-import time
-import os
-
-SETUP_DIR = os.path.dirname(__file__) or '.'
-
-def choose_version_from():
-    sdk_ts = subprocess.check_output(
-        ['git', 'log', '--first-parent', '--max-count=1',
-         '--format=format:%ct', os.path.join(SETUP_DIR, "../python")]).strip()
-    cwl_ts = subprocess.check_output(
-        ['git', 'log', '--first-parent', '--max-count=1',
-         '--format=format:%ct', SETUP_DIR]).strip()
-    if int(sdk_ts) > int(cwl_ts):
-        getver = os.path.join(SETUP_DIR, "../python")
-    else:
-        getver = SETUP_DIR
-    return getver
-
-class EggInfoFromGit(egg_info):
-    """Tag the build with git commit timestamp.
-
-    If a build tag has already been set (e.g., "egg_info -b", building
-    from source package), leave it alone.
-    """
-    def git_latest_tag(self):
-        gittags = subprocess.check_output(['git', 'tag', '-l']).split()
-        gittags.sort(key=lambda s: [int(u) for u in s.split(b'.')],reverse=True)
-        return str(next(iter(gittags)).decode('utf-8'))
-
-    def git_timestamp_tag(self):
-        gitinfo = subprocess.check_output(
-            ['git', 'log', '--first-parent', '--max-count=1',
-             '--format=format:%ct', choose_version_from()]).strip()
-        return time.strftime('.%Y%m%d%H%M%S', time.gmtime(int(gitinfo)))
-
-    def tags(self):
-        if self.tag_build is None:
-            self.tag_build = self.git_latest_tag() + self.git_timestamp_tag()
-        return egg_info.tags(self)
diff --git a/sdk/python/gittaggers.py b/sdk/python/gittaggers.py
deleted file mode 100644
index f3278fcc1..000000000
--- a/sdk/python/gittaggers.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (C) The Arvados Authors. All rights reserved.
-#
-# SPDX-License-Identifier: Apache-2.0
-
-from setuptools.command.egg_info import egg_info
-import subprocess
-import time
-
-class EggInfoFromGit(egg_info):
-    """Tag the build with git commit timestamp.
-
-    If a build tag has already been set (e.g., "egg_info -b", building
-    from source package), leave it alone.
-    """
-    def git_latest_tag(self):
-        gittags = subprocess.check_output(['git', 'tag', '-l']).split()
-        gittags.sort(key=lambda s: [int(u) for u in s.split(b'.')],reverse=True)
-        return str(next(iter(gittags)).decode('utf-8'))
-
-    def git_timestamp_tag(self):
-        gitinfo = subprocess.check_output(
-            ['git', 'log', '--first-parent', '--max-count=1',
-             '--format=format:%ct', '.']).strip()
-        return time.strftime('.%Y%m%d%H%M%S', time.gmtime(int(gitinfo)))
-
-    def tags(self):
-        if self.tag_build is None:
-            self.tag_build = self.git_latest_tag()+self.git_timestamp_tag()
-        return egg_info.tags(self)
diff --git a/services/dockercleaner/gittaggers.py b/services/dockercleaner/gittaggers.py
deleted file mode 120000
index a9ad861d8..000000000
--- a/services/dockercleaner/gittaggers.py
+++ /dev/null
@@ -1 +0,0 @@
-../../sdk/python/gittaggers.py
\ No newline at end of file
diff --git a/services/fuse/gittaggers.py b/services/fuse/gittaggers.py
deleted file mode 120000
index a9ad861d8..000000000
--- a/services/fuse/gittaggers.py
+++ /dev/null
@@ -1 +0,0 @@
-../../sdk/python/gittaggers.py
\ No newline at end of file
diff --git a/tools/crunchstat-summary/gittaggers.py b/tools/crunchstat-summary/gittaggers.py
deleted file mode 120000
index a9ad861d8..000000000
--- a/tools/crunchstat-summary/gittaggers.py
+++ /dev/null
@@ -1 +0,0 @@
-../../sdk/python/gittaggers.py
\ No newline at end of file

commit cbbc3107ccecea55bb3f7fad41b8e0ec3517a50b
Author: Ward Vandewege <ward at curii.com>
Date:   Mon Nov 16 15:08:26 2020 -0500

    17012: when calculating the version of our Python packages, take the
           build directory into account.
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/sdk/cwl/arvados_version.py b/sdk/cwl/arvados_version.py
index d5f48c066..4bfd3fc7e 100644
--- a/sdk/cwl/arvados_version.py
+++ b/sdk/cwl/arvados_version.py
@@ -13,11 +13,17 @@ def choose_version_from():
     sdk_ts = subprocess.check_output(
         ['git', 'log', '--first-parent', '--max-count=1',
          '--format=format:%ct', os.path.join(SETUP_DIR, "../python")]).strip()
-    cwl_ts = subprocess.check_output(
+    build_ts = subprocess.check_output(
+        ['git', 'log', '--first-parent', '--max-count=1',
+         '--format=format:%ct', os.path.join(SETUP_DIR, "../../build/version-at-commit.sh")]).strip()
+    this_ts = subprocess.check_output(
         ['git', 'log', '--first-parent', '--max-count=1',
          '--format=format:%ct', SETUP_DIR]).strip()
-    if int(sdk_ts) > int(cwl_ts):
+    m = max(int(sdk_ts),int(build_ts),int(this_ts))
+    if m == int(sdk_ts):
         getver = os.path.join(SETUP_DIR, "../python")
+    elif m == int(build_ts):
+        getver = os.path.join(SETUP_DIR, "../../build/version-at-commit.sh")
     else:
         getver = SETUP_DIR
     return getver
@@ -26,7 +32,7 @@ def git_version_at_commit():
     curdir = choose_version_from()
     myhash = subprocess.check_output(['git', 'log', '-n1', '--first-parent',
                                        '--format=%H', curdir]).strip()
-    myversion = subprocess.check_output([curdir+'/../../build/version-at-commit.sh', myhash]).strip().decode()
+    myversion = subprocess.check_output([SETUP_DIR+'/../../build/version-at-commit.sh', myhash]).strip().decode()
     return myversion
 
 def save_version(setup_dir, module, v):
@@ -46,7 +52,8 @@ def get_version(setup_dir, module):
     else:
         try:
             save_version(setup_dir, module, git_version_at_commit())
-        except (subprocess.CalledProcessError, OSError):
+        except (subprocess.CalledProcessError, OSError) as err:
+            print("ERROR: {0}".format(err))
             pass
 
     return read_version(setup_dir, module)
diff --git a/sdk/python/arvados_version.py b/sdk/python/arvados_version.py
index 36804bf5b..947d01901 100644
--- a/sdk/python/arvados_version.py
+++ b/sdk/python/arvados_version.py
@@ -7,11 +7,27 @@ import time
 import os
 import re
 
+SETUP_DIR = os.path.dirname(os.path.abspath(__file__))
+
+def choose_version_from():
+    sdk_ts = subprocess.check_output(
+        ['git', 'log', '--first-parent', '--max-count=1',
+         '--format=format:%ct', SETUP_DIR]).strip()
+    build_ts = subprocess.check_output(
+        ['git', 'log', '--first-parent', '--max-count=1',
+         '--format=format:%ct', os.path.join(SETUP_DIR, "../../build/version-at-commit.sh")]).strip()
+    m = max(int(sdk_ts),int(build_ts))
+    if m == int(sdk_ts):
+        getver = SETUP_DIR
+    else:
+        getver = os.path.join(SETUP_DIR, "../../build/version-at-commit.sh")
+    return getver
+
 def git_version_at_commit():
-    curdir = os.path.dirname(os.path.abspath(__file__))
+    curdir = choose_version_from()
     myhash = subprocess.check_output(['git', 'log', '-n1', '--first-parent',
                                        '--format=%H', curdir]).strip()
-    myversion = subprocess.check_output([curdir+'/../../build/version-at-commit.sh', myhash]).strip().decode()
+    myversion = subprocess.check_output([SETUP_DIR+'/../../build/version-at-commit.sh', myhash]).strip().decode()
     return myversion
 
 def save_version(setup_dir, module, v):
@@ -31,7 +47,8 @@ def get_version(setup_dir, module):
     else:
         try:
             save_version(setup_dir, module, git_version_at_commit())
-        except (subprocess.CalledProcessError, OSError):
+        except (subprocess.CalledProcessError, OSError) as err:
+            print("ERROR: {0}".format(err))
             pass
 
     return read_version(setup_dir, module)
diff --git a/services/dockercleaner/arvados_version.py b/services/dockercleaner/arvados_version.py
index 36804bf5b..164280437 100644
--- a/services/dockercleaner/arvados_version.py
+++ b/services/dockercleaner/arvados_version.py
@@ -7,11 +7,27 @@ import time
 import os
 import re
 
+SETUP_DIR = os.path.dirname(os.path.abspath(__file__))
+
+def choose_version_from():
+    build_ts = subprocess.check_output(
+        ['git', 'log', '--first-parent', '--max-count=1',
+         '--format=format:%ct', os.path.join(SETUP_DIR, "../../build/version-at-commit.sh")]).strip()
+    this_ts = subprocess.check_output(
+        ['git', 'log', '--first-parent', '--max-count=1',
+         '--format=format:%ct', SETUP_DIR]).strip()
+    m = max(int(build_ts),int(this_ts))
+    if m == int(build_ts):
+        getver = os.path.join(SETUP_DIR, "../../build/version-at-commit.sh")
+    else:
+        getver = SETUP_DIR
+    return getver
+
 def git_version_at_commit():
-    curdir = os.path.dirname(os.path.abspath(__file__))
+    curdir = choose_version_from()
     myhash = subprocess.check_output(['git', 'log', '-n1', '--first-parent',
                                        '--format=%H', curdir]).strip()
-    myversion = subprocess.check_output([curdir+'/../../build/version-at-commit.sh', myhash]).strip().decode()
+    myversion = subprocess.check_output([SETUP_DIR+'/../../build/version-at-commit.sh', myhash]).strip().decode()
     return myversion
 
 def save_version(setup_dir, module, v):
@@ -31,7 +47,8 @@ def get_version(setup_dir, module):
     else:
         try:
             save_version(setup_dir, module, git_version_at_commit())
-        except (subprocess.CalledProcessError, OSError):
+        except (subprocess.CalledProcessError, OSError) as err:
+            print("ERROR: {0}".format(err))
             pass
 
     return read_version(setup_dir, module)
diff --git a/services/fuse/arvados_version.py b/services/fuse/arvados_version.py
index 0d307c1be..df80a6425 100644
--- a/services/fuse/arvados_version.py
+++ b/services/fuse/arvados_version.py
@@ -13,11 +13,17 @@ def choose_version_from():
     sdk_ts = subprocess.check_output(
         ['git', 'log', '--first-parent', '--max-count=1',
          '--format=format:%ct', os.path.join(SETUP_DIR, "../../sdk/python")]).strip()
-    cwl_ts = subprocess.check_output(
+    build_ts = subprocess.check_output(
+        ['git', 'log', '--first-parent', '--max-count=1',
+         '--format=format:%ct', os.path.join(SETUP_DIR, "../../build/version-at-commit.sh")]).strip()
+    this_ts = subprocess.check_output(
         ['git', 'log', '--first-parent', '--max-count=1',
          '--format=format:%ct', SETUP_DIR]).strip()
-    if int(sdk_ts) > int(cwl_ts):
+    m = max(int(sdk_ts),int(build_ts),int(this_ts))
+    if m == int(sdk_ts):
         getver = os.path.join(SETUP_DIR, "../../sdk/python")
+    elif m == int(build_ts):
+        getver = os.path.join(SETUP_DIR, "../../build/version-at-commit.sh")
     else:
         getver = SETUP_DIR
     return getver
@@ -26,7 +32,7 @@ def git_version_at_commit():
     curdir = choose_version_from()
     myhash = subprocess.check_output(['git', 'log', '-n1', '--first-parent',
                                        '--format=%H', curdir]).strip()
-    myversion = subprocess.check_output([curdir+'/../../build/version-at-commit.sh', myhash]).strip().decode()
+    myversion = subprocess.check_output([SETUP_DIR+'/../../build/version-at-commit.sh', myhash]).strip().decode()
     return myversion
 
 def save_version(setup_dir, module, v):
@@ -46,7 +52,8 @@ def get_version(setup_dir, module):
     else:
         try:
             save_version(setup_dir, module, git_version_at_commit())
-        except (subprocess.CalledProcessError, OSError):
+        except (subprocess.CalledProcessError, OSError) as err:
+            print("ERROR: {0}".format(err))
             pass
 
     return read_version(setup_dir, module)
diff --git a/tools/crunchstat-summary/arvados_version.py b/tools/crunchstat-summary/arvados_version.py
index 0d307c1be..92a8e4fe2 100644
--- a/tools/crunchstat-summary/arvados_version.py
+++ b/tools/crunchstat-summary/arvados_version.py
@@ -13,20 +13,27 @@ def choose_version_from():
     sdk_ts = subprocess.check_output(
         ['git', 'log', '--first-parent', '--max-count=1',
          '--format=format:%ct', os.path.join(SETUP_DIR, "../../sdk/python")]).strip()
-    cwl_ts = subprocess.check_output(
+    build_ts = subprocess.check_output(
+        ['git', 'log', '--first-parent', '--max-count=1',
+         '--format=format:%ct', os.path.join(SETUP_DIR, "../../build/version-at-commit.sh")]).strip()
+    this_ts = subprocess.check_output(
         ['git', 'log', '--first-parent', '--max-count=1',
          '--format=format:%ct', SETUP_DIR]).strip()
-    if int(sdk_ts) > int(cwl_ts):
+    m = max(int(sdk_ts),int(build_ts),int(this_ts))
+    if m == int(sdk_ts):
         getver = os.path.join(SETUP_DIR, "../../sdk/python")
+    elif m == int(build_ts):
+        getver = os.path.join(SETUP_DIR, "../../build/version-at-commit.sh")
     else:
         getver = SETUP_DIR
     return getver
 
+
 def git_version_at_commit():
     curdir = choose_version_from()
     myhash = subprocess.check_output(['git', 'log', '-n1', '--first-parent',
                                        '--format=%H', curdir]).strip()
-    myversion = subprocess.check_output([curdir+'/../../build/version-at-commit.sh', myhash]).strip().decode()
+    myversion = subprocess.check_output([SETUP_DIR+'/../../build/version-at-commit.sh', myhash]).strip().decode()
     return myversion
 
 def save_version(setup_dir, module, v):
@@ -46,7 +53,8 @@ def get_version(setup_dir, module):
     else:
         try:
             save_version(setup_dir, module, git_version_at_commit())
-        except (subprocess.CalledProcessError, OSError):
+        except (subprocess.CalledProcessError, OSError) as err:
+            print("ERROR: {0}".format(err))
             pass
 
     return read_version(setup_dir, module)

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list