[med-svn] [Git][med-team/biomaj3-daemon][upstream] New upstream version 3.0.24

Andreas Tille (@tille) gitlab at salsa.debian.org
Wed Jun 29 10:57:28 BST 2022



Andreas Tille pushed to branch upstream at Debian Med / biomaj3-daemon


Commits:
2e4adef6 by Andreas Tille at 2022-06-29T11:55:29+02:00
New upstream version 3.0.24
- - - - -


5 changed files:

- CHANGES.txt
- bin/biomaj_daemon_consumer.py
- biomaj_daemon/daemon/biomaj_daemon_web.py
- biomaj_daemon/daemon/daemon_service.py
- setup.py


Changes:

=====================================
CHANGES.txt
=====================================
@@ -1,34 +1,49 @@
+3.0.24:
+  Fix pyaml setup
+
+3.0.23:
+  Expose endpoint, return 404 if bank does not exists
+
 3.0.22:
   Add /api/daemon/expose endpoint for traefik auth requests 
     to allow/deny access to /db web access
+
 3.0.21:
   Add support for repair option
   Add cors support
   Fix /status/ko
+
 3.0.20:
   Add some checks on options
   Add data-list and data-import options
+
 3.0.19:
   Fix traefix prefix
+
 3.0.18:
   Fix some bank status info checks
   Add new endpoint /api/daemon/bank/<bank>/owns
   Add queued bank names in whatsup
   Update pika dependency release
   Add tags for traefik support
+
 3.0.17:
   Allow use of env variables to override micro.x and rabbitmq variables in global.properties
     like for config.yml.
     Ex: WEB_LOCAL_ENDPOINT_DOWNLOAD defines proxy address for download web service,
         WEB_LOCAL_ENDPOINT defines global proxy address for all web services, etc.
     If not defined, will use values from global.properties
+
 3.0.16:
   After migration checks, update db_schema to current version
+
 3.0.15:
   Add --history option
   Catch SIGTERM to cancel bank update for SIGKILL
+
 3.0.14:
   Fake version for Pypi re-upload
+
 3.0.13:
   Allow per service local_endpoint definition
   Add --stats option
@@ -37,32 +52,43 @@
 
 3.0.12:
   Add biomaj_daemon_consumer.py to python scripts for install with package
+
 3.0.11:
   Disable daemon web service logging
+
 3.0.10:
   Fix tail endpoint syntax
+
 3.0.9:
   Fix #1 remove debug log
   Fix #2 log dir not removed with --remove-all if proxy option not set
+
 3.0.8:
   Fix #78, for multiple banks update in monolithic config, if one fails, next banks are not updated
   Add /api/daemon/bank/x/log[/y] endpoint to get last bank session log file
+
 3.0.7:
   Add whatsup support for non proxy config
   Skip bank config with errors
+
 3.0.6:
   Fix logging for monolithic setup
   Add whatsup option
   Fix prometheus stats
+
 3.0.5:
   Fix for python 2.x
+
 3.0.4:
   Fix status page with other services
   Add missing README in package
+
 3.0.3:
   Fix missing parameters
+
 3.0.2:
   Move options to management to utils for reuse
   Fix --about-me
+
 3.0.1:
   Micro service to manage biomaj updates


=====================================
bin/biomaj_daemon_consumer.py
=====================================
@@ -3,6 +3,10 @@ import logging
 
 import requests
 import yaml
+try:
+    from yaml import CLoader as Loader
+except ImportError:
+    from yaml import Loader
 
 from biomaj_daemon.daemon.daemon_service import DaemonService
 from biomaj_core.utils import Utils
@@ -13,7 +17,7 @@ if 'BIOMAJ_CONFIG' in os.environ:
 
 config = None
 with open(config_file, 'r') as ymlfile:
-    config = yaml.load(ymlfile)
+    config = yaml.load(ymlfile, Loader=Loader)
     Utils.service_config_override(config)
 
 


=====================================
biomaj_daemon/daemon/biomaj_daemon_web.py
=====================================
@@ -1,6 +1,10 @@
 import ssl
 import os
 import yaml
+try:
+    from yaml import CLoader as Loader
+except ImportError:
+    from yaml import Loader
 import logging
 from collections import deque
 import copy
@@ -41,7 +45,7 @@ if 'BIOMAJ_CONFIG' in os.environ:
 
 config = None
 with open(config_file, 'r') as ymlfile:
-    config = yaml.load(ymlfile)
+    config = yaml.load(ymlfile, Loader=Loader)
     Utils.service_config_override(config)
 
 BiomajConfig.load_config(config['biomaj']['config'])
@@ -1127,7 +1131,13 @@ def expose():
     requested_bank = elts[2]
     user = None
     options = Options({})
-    bank = Bank(requested_bank, options=Options({}), no_log=True)
+    bank = None
+    try:
+        # if bank is not defined and requesting a local/temp dir
+        bank = Bank(requested_bank, options=Options({}), no_log=True)
+    except Exception:
+        abort(404)
+
     if bank.bank['properties']['visibility'] == 'public':
         return jsonify({'msg': 'access allowed'})
 


=====================================
biomaj_daemon/daemon/daemon_service.py
=====================================
@@ -1,6 +1,10 @@
 import logging
 import logging.config
 import yaml
+try:
+    from yaml import CLoader as Loader
+except ImportError:
+    from yaml import Loader
 import traceback
 import datetime
 import time
@@ -88,7 +92,7 @@ class DaemonService(object):
         self.session = None
         self.executed_callback = None
         with open(config_file, 'r') as ymlfile:
-            self.config = yaml.load(ymlfile)
+            self.config = yaml.load(ymlfile, Loader=Loader)
             Utils.service_config_override(self.config)
 
         Zipkin.set_config(self.config)


=====================================
setup.py
=====================================
@@ -17,11 +17,12 @@ with open(os.path.join(here, 'CHANGES.txt')) as f:
 config = {
     'description': 'BioMAJ daemon service',
     'long_description': README + '\n\n' + CHANGES,
+    'long_description_content_type': 'text/markdown',
     'author': 'Olivier Sallou',
     'url': 'http://biomaj.genouest.org',
     'download_url': 'http://biomaj.genouest.org',
     'author_email': 'olivier.sallou at irisa.fr',
-    'version': '3.0.22',
+    'version': '3.0.24',
      'classifiers': [
         # How mature is this project? Common values are
         #   3 - Alpha
@@ -39,7 +40,6 @@ config = {
         # Specify the Python versions you support here. In particular, ensure
         # that you indicate whether you support Python 2, Python 3 or both.
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.4'
     ],
     'install_requires': [
                          'biomaj-core',



View it on GitLab: https://salsa.debian.org/med-team/biomaj3-daemon/-/commit/2e4adef65ccd6c6c09af17680e9798cdfffe25a2

-- 
View it on GitLab: https://salsa.debian.org/med-team/biomaj3-daemon/-/commit/2e4adef65ccd6c6c09af17680e9798cdfffe25a2
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220629/5cb0cc87/attachment-0001.htm>


More information about the debian-med-commit mailing list