[arvados] updated: 2.7.0-5825-gacf0375f2a

git repository hosting git at public.arvados.org
Tue Jan 16 16:40:07 UTC 2024


Summary of changes:
 sdk/cwl/test_with_arvbox.sh                         | 21 ++++-----------------
 sdk/python/tests/fed-migrate/jenkins.sh             | 18 +++++++-----------
 tools/arvbox/lib/arvbox/docker/common.sh            | 19 +++++++++++++++++++
 .../lib/arvbox/docker/service/sdk/run-service       |  8 +-------
 4 files changed, 31 insertions(+), 35 deletions(-)

       via  acf0375f2aded6b5f8dbc897abd07e2c9dbd7ce4 (commit)
       via  d600f6dbb82e46922b17ff93a877a76131c26ebc (commit)
       via  42cacdff7c5740db7ca244ab38060fd6b318b632 (commit)
       via  96c3f7c75fb5c57915fb66daf70ced5f2724448f (commit)
      from  1422c2322339ac5cabdc15f8917d56f6ab501834 (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 acf0375f2aded6b5f8dbc897abd07e2c9dbd7ce4
Author: Brett Smith <brett.smith at curii.com>
Date:   Tue Jan 16 11:14:02 2024 -0500

    21230: Update virtualenv in fed-migrate test
    
    I don't believe this is strictly necessary, but `python3 -m venv` is
    more likely to work than `virtualenv` and better matches all our other
    code. Everything else is just style updates.
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/sdk/python/tests/fed-migrate/jenkins.sh b/sdk/python/tests/fed-migrate/jenkins.sh
index 06b5a437e9..46981e5016 100755
--- a/sdk/python/tests/fed-migrate/jenkins.sh
+++ b/sdk/python/tests/fed-migrate/jenkins.sh
@@ -14,20 +14,13 @@ docker rm fedbox1-data fedbox2-data fedbox3-data
 
 set -ex
 
-mkdir -p $WORKSPACE/tmp
-cd $WORKSPACE/tmp
-virtualenv --python python3 venv3
-. venv3/bin/activate
-
-cd $WORKSPACE/sdk/python
-pip install -e .
-
-cd $WORKSPACE/sdk/cwl
-pip install -e .
+mkdir -p "$WORKSPACE/tmp/arvbox"
+python3 -m venv "$WORKSPACE/tmp/venv3"
+"$WORKSPACE/tmp/venv3/bin/pip" install -e "$WORKSPACE/sdk/python" "$WORKSPACE/sdk/cwl"
+alias cwltool='"$WORKSPACE/tmp/venv3/bin/cwltool"'
 
 export PATH=$PATH:$WORKSPACE/tools/arvbox/bin
 
-mkdir -p $WORKSPACE/tmp/arvbox
 cd $WORKSPACE/sdk/python/tests/fed-migrate
 cwltool arvbox-make-federation.cwl \
 	--arvbox_base $WORKSPACE/tmp/arvbox \

commit d600f6dbb82e46922b17ff93a877a76131c26ebc
Author: Brett Smith <brett.smith at curii.com>
Date:   Tue Jan 16 11:39:26 2024 -0500

    21230: Add license header
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/sdk/python/tests/fed-migrate/jenkins.sh b/sdk/python/tests/fed-migrate/jenkins.sh
index e5dd8aa913..06b5a437e9 100755
--- a/sdk/python/tests/fed-migrate/jenkins.sh
+++ b/sdk/python/tests/fed-migrate/jenkins.sh
@@ -1,4 +1,7 @@
 #!/bin/bash
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
 
 if test -z "$WORKSPACE" ; then
     echo "WORKSPACE unset"

commit 42cacdff7c5740db7ca244ab38060fd6b318b632
Author: Brett Smith <brett.smith at curii.com>
Date:   Tue Jan 16 10:55:59 2024 -0500

    21230: Update test_with_arvbox.sh to use arvbox virtualenv
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/sdk/cwl/test_with_arvbox.sh b/sdk/cwl/test_with_arvbox.sh
index 55099afdf7..4aa9958b64 100755
--- a/sdk/cwl/test_with_arvbox.sh
+++ b/sdk/cwl/test_with_arvbox.sh
@@ -14,7 +14,6 @@ leave_running=0
 config=dev
 devcwl=0
 tag="latest"
-pythoncmd=python3
 suite=conformance
 runapi=containers
 reinstall=0
@@ -51,7 +50,7 @@ while test -n "$1" ; do
             shift
             ;;
         --pythoncmd)
-            pythoncmd=$2
+            echo "warning: --pythoncmd option is no longer supported; ignored" >&2
             shift ; shift
             ;;
         --suite)
@@ -63,7 +62,7 @@ while test -n "$1" ; do
             shift ; shift
             ;;
         -h|--help)
-            echo "$0 [--no-reset-container] [--leave-running] [--config dev|localdemo] [--tag docker_tag] [--build] [--pythoncmd python(2|3)] [--suite (integration|conformance-v1.0|conformance-*)]"
+            echo "$0 [--no-reset-container] [--leave-running] [--config dev|localdemo] [--tag docker_tag] [--build] [--suite (integration|conformance-v1.0|conformance-*)]"
             exit
             ;;
         *)
@@ -99,16 +98,8 @@ set -eu -o pipefail
 
 . /usr/local/lib/arvbox/common.sh
 
-export PYCMD=$pythoncmd
-
 if test $config = dev -o $reinstall = 1; then
-  cd /usr/src/arvados/sdk/python
-  \$PYCMD setup.py sdist
-  pip_install \$(ls -r dist/arvados-python-client-*.tar.gz | head -n1)
-
-  cd /usr/src/arvados/sdk/cwl
-  \$PYCMD setup.py sdist
-  pip_install \$(ls -r dist/arvados-cwl-runner-*.tar.gz | head -n1)
+  pip_install_sdist sdk/python sdk/cwl
 fi
 
 set -x
@@ -117,11 +108,7 @@ set -x
 # our files are in Keep, all the tests fail.
 # We should add [optional] Arvados support to cwltest so it can access
 # Keep but for the time being just install the last working version.
-if [ "\$PYCMD" = "python3" ]; then
-    pip3 install 'cwltest<2.3.20230527113600'
-else
-    pip install 'cwltest<2.3.20230527113600'
-fi
+/opt/arvados-py/bin/pip install 'cwltest<2.3.20230527113600'
 
 mkdir -p /tmp/cwltest
 cd /tmp/cwltest

commit 96c3f7c75fb5c57915fb66daf70ced5f2724448f
Author: Brett Smith <brett.smith at curii.com>
Date:   Tue Jan 16 10:38:42 2024 -0500

    21230: Refactor out pip_install_sdist function
    
    This can be useful to supporting tooling like test_with_arvbox.sh.
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/tools/arvbox/lib/arvbox/docker/common.sh b/tools/arvbox/lib/arvbox/docker/common.sh
index 81516ef08a..54ec9403ad 100644
--- a/tools/arvbox/lib/arvbox/docker/common.sh
+++ b/tools/arvbox/lib/arvbox/docker/common.sh
@@ -100,3 +100,22 @@ bundler_binstubs() {
     fi
     flock $GEMLOCK $BUNDLER binstubs --all
 }
+
+# Usage: Pass any number of directories. Relative directories will be taken as
+# relative to /usr/src/arvados. This function will build an sdist from each,
+# then pip install them all in the arvbox virtualenv.
+pip_install_sdist() {
+    local sdist_dir="$(mktemp --directory --tmpdir py_sdist.XXXXXXXX)"
+    trap 'rm -rf "$sdist_dir"' RETURN
+    local src_dir
+    for src_dir in "$@"; do
+        case "$src_dir" in
+            /*) ;;
+            *) src_dir="/usr/src/arvados/$src_dir" ;;
+        esac
+        env -C "$src_dir" /opt/arvados-py/bin/python3 setup.py sdist --dist-dir="$sdist_dir" \
+            || return
+    done
+    /opt/arvados-py/bin/pip install "$sdist_dir"/* || return
+    return
+}
diff --git a/tools/arvbox/lib/arvbox/docker/service/sdk/run-service b/tools/arvbox/lib/arvbox/docker/service/sdk/run-service
index 3e00b0ea20..216066530e 100755
--- a/tools/arvbox/lib/arvbox/docker/service/sdk/run-service
+++ b/tools/arvbox/lib/arvbox/docker/service/sdk/run-service
@@ -14,10 +14,4 @@ run_bundler --binstubs=binstubs
 cd /usr/src/arvados/sdk/cli
 run_bundler --binstubs=binstubs
 
-python_srcdir="$(mktemp --directory --tmpdir pysrc.XXXXXXXX)"
-trap 'rm -rf "$python_srcdir"' EXIT INT TERM QUIT
-for subdir in sdk/python services/fuse sdk/cwl; do
-    env -C "/usr/src/arvados/$subdir" \
-        /opt/arvados-py/bin/python3 setup.py sdist --dist-dir="$python_srcdir"
-done
-/opt/arvados-py/bin/pip install "$python_srcdir"/*
+pip_install_sdist sdk/python services/fuse sdk/cwl

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list