Merge branch 'master' into 8766-cwl-collection-project
authorPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 23 Mar 2016 18:00:21 +0000 (14:00 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 23 Mar 2016 18:00:21 +0000 (14:00 -0400)
Conflicts:
sdk/cwl/tests/test_job.py

build/run-build-docker-jobs-image.sh
docker/build_tools/Makefile
docker/jobs/Dockerfile
sdk/cwl/tests/test_job.py
services/fuse/arvados_fuse/fusefile.py

index fcf849bc4df9fe7e991046b150305830a711cce9..15f788163ed604ea4592daae668c3dbe9e888923 100755 (executable)
@@ -54,21 +54,23 @@ do
     esac
 done
 
-
 EXITCODE=0
 
-COLUMNS=80
-
-title () {
-    printf "\n%*s\n\n" $(((${#title}+$COLUMNS)/2)) "********** $1 **********"
+exit_cleanly() {
+    trap - INT
+    report_outcomes
+    exit $EXITCODE
 }
 
+COLUMNS=80
+. $WORKSPACE/build/run-library.sh
+
 docker_push () {
     if [[ ! -z "$tags" ]]
     then
         for tag in $( echo $tags|tr "," " " )
         do
-             $DOCKER tag -f $1 $1:$tag
+             $DOCKER tag $1 $1:$tag
         done
     fi
 
@@ -82,17 +84,9 @@ docker_push () {
     done
 
     if [[ "$ECODE" != "0" ]]; then
-        title "!!!!!! docker push $* failed !!!!!!"
         EXITCODE=$(($EXITCODE + $ECODE))
     fi
-}
-
-timer_reset() {
-    t0=$SECONDS
-}
-
-timer() {
-    echo -n "$(($SECONDS - $t0))s"
+    checkexit $ECODE "docker push $*"
 }
 
 # Sanity check
@@ -131,15 +125,19 @@ rm -f config.yml
 # Get test config.yml file
 cp $HOME/docker/config.yml .
 
-./build.sh jobs-image
+if [[ ! -z "$tags" ]]; then
+  COMMIT=${tags/,*/} ./build.sh jobs-image
+else
+  ./build.sh jobs-image
+fi
 
 ECODE=$?
 
 if [[ "$ECODE" != "0" ]]; then
-    title "!!!!!! docker BUILD FAILED !!!!!!"
     EXITCODE=$(($EXITCODE + $ECODE))
 fi
 
+checkexit $ECODE "docker build"
 title "docker build complete (`timer`)"
 
 title "uploading images"
@@ -155,10 +153,10 @@ else
         docker login -u arvados
 
         docker_push arvados/jobs
-        title "upload arvados images complete (`timer`)"
+        title "upload arvados images finished (`timer`)"
     else
-        title "upload arvados images SKIPPED because no --upload option set"
+        title "upload arvados images SKIPPED because no --upload option set (`timer`)"
     fi
 fi
 
-exit $EXITCODE
+exit_cleanly
index 75702960133b3be2555b851babb9d5bf92e4c9a3..8a757d014e6f73919f3f74e8c5eef40faea20585 100644 (file)
@@ -217,7 +217,7 @@ keep-proxy-image: debian-arvados-image $(BUILD) $(KEEP_PROXY_DEPS)
        date >keep-proxy-image
 
 jobs-image: debian-arvados-image $(BUILD) $(JOBS_DEPS)
-       $(DOCKER_BUILD) -t arvados/jobs jobs
+       $(DOCKER_BUILD) --build-arg COMMIT=$(COMMIT) -t arvados/jobs jobs
        date >jobs-image
 
 java-bwa-samtools-image: jobs-image $(BUILD) $(JAVA_BWA_SAMTOOLS_DEPS)
index 0d7295873f723e637cf76413e01c16c6a2be5d95..30c2416e99511b2f1919591671296d7d13a659a3 100644 (file)
@@ -6,14 +6,14 @@ ENV DEBIAN_FRONTEND noninteractive
 
 ADD apt.arvados.org.list /etc/apt/sources.list.d/
 RUN apt-key adv --keyserver pool.sks-keyservers.net --recv 1078ECD7
-RUN apt-get update -q
+RUN gpg --keyserver pool.sks-keyservers.net --recv-keys D39DC0E3
 
-RUN apt-get install -qy git python-pip python-virtualenv python-arvados-python-client python-dev libcurl4-gnutls-dev
+ARG COMMIT=latest
+RUN echo $COMMIT && apt-get update -q
 
-RUN gpg --keyserver pool.sks-keyservers.net --recv-keys D39DC0E3
+RUN apt-get install -qy git python-pip python-virtualenv python-arvados-python-client python-dev libcurl4-gnutls-dev
 
 # Install dependencies and set up system.
-# The FUSE packages help ensure that we can install the Python SDK (arv-mount).
 RUN /usr/sbin/adduser --disabled-password \
       --gecos 'Crunch execution user' crunch && \
     /usr/bin/install --directory --owner=crunch --group=crunch --mode=0700 /keep /tmp/crunch-src /tmp/crunch-job
index ae482387459d6b63cd81253c00cfab76ed99a640..4351b1abfef5f9a7c24c8d6649c3b54ab88c3287 100644 (file)
@@ -67,7 +67,11 @@ class TestJob(unittest.TestCase):
                     'task.env': {'TMPDIR': '$(task.tmpdir)'},
                     'command': ['ls']
                 }],
+<<<<<<< HEAD
                 'crunchrunner': arvados_cwl.crunchrunner_pdh + '/crunchrunner'
+=======
+                'crunchrunner': 'ff6fc71e593081ef9733afacaeee15ea+140/crunchrunner'
+>>>>>>> master
             },
             'script_version': 'master',
             'minimum_script_version': '9e5b98e8f5f4727856b53447191f9c06e3da2ba6',
index e731327dec5524432d0eb12c7d9dfc2b900fafd4..3f0e4932fddb181d84a17def278e21bd3035b6db 100644 (file)
@@ -95,6 +95,12 @@ class ObjectFile(StringFile):
         return self.object_uuid
 
     def update(self, obj=None):
+        if obj is None:
+            # TODO: retrieve the current record for self.object_uuid
+            # from the server. For now, at least don't crash when
+            # someone tells us it's a good time to update but doesn't
+            # pass us a fresh obj. See #8345
+            return
         self._mtime = convertTime(obj['modified_at']) if 'modified_at' in obj else 0
         self.contents = json.dumps(obj, indent=4, sort_keys=True) + "\n"