Run of fresh-snapshots for biomaj3-process

Try this locally (using silver-platter):

debian-svp new-upstream --snapshot biomaj3-process 

Merge these changes:

git pull https://janitor.debian.net/git/biomaj3-process fresh-snapshots/main

Summary

Merged new upstream version: 3.0.15 (was: 3.0.13).

Diff

=== modified file 'CHANGES.txt'
--- a/CHANGES.txt	2019-03-09 10:13:04 +0000
+++ b/CHANGES.txt	2019-11-07 07:02:18 +0000
@@ -1,3 +1,9 @@
+3.0.15:
+  Add proc name in logs for waiting and result
+3.0.14:
+  Add env var BIOMAJ_HOST_DATA_DIR to use with *docker* process executor to specify data.dir location if different between host and container (if BIOMAJ_DATA_DIR not a subdirectory of BIOMAJ_DIR for example)
+    If variable is not set, container wil mount data.dir between host and container,
+    else will mount BIOMAJ_HOST_DATA_DIR:data.dir
 3.0.13:
   Fix traefik prefix
 3.0.12:

=== modified file 'README.md'
--- a/README.md	2018-02-10 17:17:38 +0000
+++ b/README.md	2019-11-07 07:02:18 +0000
@@ -1,5 +1,7 @@
 # About
 
+[![PyPI version](https://badge.fury.io/py/biomaj-process.svg)](https://badge.fury.io/py/biomaj-process)
+
 Microservice to manage the process execution of biomaj.
 
 A protobuf interface is available in biomaj_process/message/message_pb2.py to exchange messages between BioMAJ and the download service.

=== modified file 'biomaj_process/process.py'
--- a/biomaj_process/process.py	2018-10-25 09:08:42 +0000
+++ b/biomaj_process/process.py	2019-11-07 07:02:18 +0000
@@ -224,9 +224,10 @@
                     depends.append(value)
         # docker run with data.dir env as shared volume
         # forwarded env variables
-        data_dir = self.bank_env['datadir'] + '/' + self.bank_env['dirversion']
-        if 'BIOMAJ_DIR' in os.environ and os.environ['BIOMAJ_DIR'] and not os.environ['BIOMAJ_DIR'].startswith('local'):
-            data_dir = os.environ['BIOMAJ_DIR'] + '/' + self.bank_env['dirversion']
+        container_data_dir = self.bank_env['datadir'] + '/' + self.bank_env['dirversion']
+        host_data_dir = container_data_dir
+        if 'BIOMAJ_HOST_DATA_DIR' in os.environ and os.environ['BIOMAJ_HOST_DATA_DIR'] and not os.environ['BIOMAJ_HOST_DATA_DIR'].startswith('local'):
+            host_data_dir = os.environ['BIOMAJ_HOST_DATA_DIR'] + '/' + self.bank_env['dirversion']
 
         depends_vol = ''
         for vol in depends:
@@ -236,13 +237,14 @@
             cmd = '''uid={uid}
         gid={gid}
         {sudo} docker {docker_url} pull {container_id}
-        {sudo} docker {docker_url}  run --rm -w {bank_dir} {depends_vol}  -v {data_dir}:{data_dir} {env} {container_id} \
+        {sudo} docker {docker_url}  run --rm -w {bank_dir} {depends_vol}  -v {host_data_dir}:{container_data_dir} {env} {container_id} \
         bash -c "groupadd --gid {gid} {group_biomaj} && useradd --uid {uid} --gid {gid} {user_biomaj}; \
         {exe} {args}; \
         chown -R {uid}:{gid} {bank_dir}"'''.format(
                 uid=os.getuid(),
                 gid=os.getgid(),
-                data_dir=data_dir,
+                host_data_dir=host_data_dir,
+                container_data_dir=container_data_dir,
                 env=env,
                 container_id=self.docker,
                 group_biomaj='biomaj',
@@ -257,12 +259,13 @@
         else:
             cmd = '''
         {sudo} docker {docker_url} pull {container_id}
-        {sudo} docker {docker_url} run --rm -w {bank_dir} {depends_vol} -v {data_dir}:{data_dir} {env} {container_id} \
+        {sudo} docker {docker_url} run --rm -w {bank_dir} {depends_vol} -v {host_data_dir}:{container_data_dir} {env} {container_id} \
         {exe} {args} \
         '''.format(
                 uid=os.getuid(),
                 gid=os.getgid(),
-                data_dir=data_dir,
+                host_data_dir=host_data_dir,
+                container_data_dir=container_data_dir,
                 env=env,
                 container_id=self.docker,
                 group_biomaj='biomaj',

=== modified file 'biomaj_process/process_client.py'
--- a/biomaj_process/process_client.py	2018-10-25 09:08:42 +0000
+++ b/biomaj_process/process_client.py	2019-11-07 07:02:18 +0000
@@ -49,6 +49,7 @@
         raise Exception('Failed to connect to the process proxy')
 
     def execute_process(self, biomaj_process):
+        self.biomaj_process = biomaj_process
         if self.remote:
             self.channel.basic_publish(
                 exchange='',
@@ -58,14 +59,12 @@
                     # make message persistent
                     delivery_mode=2
                 ))
-        else:
-            self.biomaj_process = biomaj_process
 
     def wait_for_process(self):
         over = False
         exitcode = -1
         info = None
-        logging.info("Process:RemoteProcess:Waiting")
+        logging.info("Process:RemoteProcess:Waiting:" + str(self.biomaj_process.process.name))
         errors = 0
         while not over:
             if errors >= 3:
@@ -89,7 +88,7 @@
                 over = True
                 if result['exitcode'] > 0:
                     info = result['info']
-                    self.logger.error('Process:RemoteProcess:Error:' + str(result['info']))
+                    self.logger.error('Process:RemoteProcess:Error:' + str(self.biomaj_process.process.name) + ': ' + str(result['info']))
             else:
                 time.sleep(10)
         return (exitcode, info)

=== modified file 'debian/changelog'
--- a/debian/changelog	2019-03-09 10:13:43 +0000
+++ b/debian/changelog	2019-11-07 07:02:18 +0000
@@ -1,3 +1,9 @@
+biomaj3-process (3.0.15-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Thu, 07 Nov 2019 07:02:08 +0000
+
 biomaj3-process (3.0.13-1) unstable; urgency=medium
 
   * New upstream release 

=== modified file 'setup.py'
--- a/setup.py	2019-03-09 10:13:04 +0000
+++ b/setup.py	2019-11-07 07:02:18 +0000
@@ -21,7 +21,7 @@
     'url': 'http://biomaj.genouest.org',
     'download_url': 'http://biomaj.genouest.org',
     'author_email': 'olivier.sallou@irisa.fr',
-    'version': '3.0.13',
+    'version': '3.0.15',
      'classifiers': [
         # How mature is this project? Common values are
         #   3 - Alpha

Full build log Full worker log