[ARVADOS] updated: 1.1.0-153-gd2fe8d0

Git user git at public.curoverse.com
Thu Nov 30 17:47:05 EST 2017


Summary of changes:
 services/nodemanager/arvnodeman/status.py | 5 ++++-
 services/nodemanager/tests/test_status.py | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

       via  d2fe8d01732f69f2c19138b2619c09ef498d18e9 (commit)
      from  92656b214ed120c631bc6adab3b35992939e2ced (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 d2fe8d01732f69f2c19138b2619c09ef498d18e9
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Thu Nov 30 19:46:27 2017 -0300

    10666: Added version information to nodemanager's status.json
    Updated related test.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/services/nodemanager/arvnodeman/status.py b/services/nodemanager/arvnodeman/status.py
index cfd6112..069bf16 100644
--- a/services/nodemanager/arvnodeman/status.py
+++ b/services/nodemanager/arvnodeman/status.py
@@ -11,6 +11,8 @@ import logging
 import socketserver
 import threading
 
+from ._version import __version__
+
 _logger = logging.getLogger('status.Handler')
 
 
@@ -74,10 +76,11 @@ class Tracker(object):
     def __init__(self):
         self._mtx = threading.Lock()
         self._latest = {}
+        self._version = {'Version' : __version__}
 
     def get_json(self):
         with self._mtx:
-            return json.dumps(self._latest)
+            return json.dumps(dict(self._latest, **self._version))
 
     def keys(self):
         with self._mtx:
diff --git a/services/nodemanager/tests/test_status.py b/services/nodemanager/tests/test_status.py
index a236e4f..2365866 100644
--- a/services/nodemanager/tests/test_status.py
+++ b/services/nodemanager/tests/test_status.py
@@ -56,6 +56,7 @@ class StatusServerUpdates(unittest.TestCase):
                 resp = r.json()
                 self.assertEqual(n, resp['nodes_'+str(n)])
             self.assertEqual(1, resp['nodes_1'])
+            self.assertIn('Version', resp)
 
 
 class StatusServerDisabled(unittest.TestCase):

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list