Bug 1561421 - [mozlog] Update mozlog docs and version to 4.2.0 r=ahal
authorNikki Sharpley <nsharpley@mozilla.com>
Fri, 28 Jun 2019 19:35:55 +0000
changeset 543431 5db3c1008a4272609c0126ef375cd451bae55cd1
parent 543430 56834c5fc9390da3bdfb41a3fe3f06119fbb3502
child 543432 a432b0a145026a5914feb4dbda9a48280e05d9ac
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1561421
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1561421 - [mozlog] Update mozlog docs and version to 4.2.0 r=ahal The mozlog documents have been updated to reflect the addition of a `known_intermittent` parameter in `test_status` and `test_end` included in the `StructuredLogger`, and across multiple mozlog handlers and formatters. As this was a major change, the version has been bumped to 4.2 for the next pypi release. Web-platform-tests will eventually require this update in order for future patches related to `known_intermittent` statuses to merge upstream. Differential Revision: https://phabricator.services.mozilla.com/D36029
testing/mozbase/docs/mozlog.rst
testing/mozbase/mozlog/setup.py
testing/mozbase/mozprofile/setup.py
testing/mozbase/mozrunner/setup.py
testing/mozbase/mozversion/setup.py
--- a/testing/mozbase/docs/mozlog.rst
+++ b/testing/mozbase/docs/mozlog.rst
@@ -108,16 +108,20 @@ emitted:
   ``status``
     Result of the test (string enum; ``PASS``, ``FAIL``, ``TIMEOUT``,
     ``NOTRUN``)
 
   ``expected``
     Expected result of the test. Omitted if the expected result is the
     same as the actual result (string enum, same as ``status``).
 
+  ``known_intermittent``
+    A list of known intermittent statuses for that test. Omitted if there are 
+    no intermittent statuses expected. (items in the list are string enum, same as ``status``)
+
 ``test_end``
   Emitted to give the result of a test with no subtests, or the status
   of the overall file when there are subtests.
 
   ``test``
     The same unique id for the test as in the ``test_start`` message.
 
   ``status``
@@ -126,16 +130,20 @@ emitted:
     ``ASSERT``, ``SKIP``) or the status of the overall file where
     there are subtests (string enum ``OK``, ``ERROR``, ``TIMEOUT``,
     ``CRASH``, ``ASSERT``, ``SKIP``).
 
   ``expected``
     The expected status, or omitted if the expected status matches the
     actual status (string enum, same as ``status``).
 
+  ``known_intermittent``
+    A list of known intermittent statuses for that test. Omitted if there are 
+    no intermittent statuses expected. (items in the list are string enum, same as ``status``)
+
 ``process_output``
   Output from a managed subprocess.
 
   ``process``
   pid of the subprocess.
 
   ``command``
   Command used to launch the subprocess.
@@ -458,17 +466,19 @@ structured log messages are sent to stdo
   {"source": "structured-example", "test": "test_that_has_an_error", "thread": "MainThread", "time": 1401446682787, "action": "test_start", "pid": 18456}
   {"status": "ERROR", "thread": "MainThread", "pid": 18456, "source": "structured-example", "test": "test_that_has_an_error", "time": 1401446682788, "action": "test_end", "message": "Traceback (most recent call last):\n  File \"structured_example.py\", line 61, in run_test\n    func()\n  File \"structured_example.py\", line 31, in test_that_has_an_error\n    assert_equals(2, 1 + \"1\")\nTypeError: unsupported operand type(s) for +: 'int' and 'str'\n", "expected": "PASS"}
   {"source": "structured-example", "test": "test_that_fails", "thread": "MainThread", "time": 1401446682788, "action": "test_start", "pid": 18456}
   {"status": "FAIL", "thread": "MainThread", "pid": 18456, "source": "structured-example", "test": "test_that_fails", "time": 1401446682788, "action": "test_end", "message": "1 not equal to 2", "expected": "PASS"}
   {"source": "structured-example", "test": "test_expected_fail", "thread": "MainThread", "time": 1401446682788, "action": "test_start", "pid": 18456}
   {"status": "FAIL", "thread": "MainThread", "pid": 18456, "source": "structured-example", "test": "test_expected_fail", "time": 1401446682788, "action": "test_end", "message": "4 not equal to 5"}
   {"source": "structured-example", "test": "test_that_passes", "thread": "MainThread", "time": 1401446682788, "action": "test_start", "pid": 18456}
   {"status": "PASS", "source": "structured-example", "test": "test_that_passes", "thread": "MainThread", "time": 1401446682789, "action": "test_end", "pid": 18456}
-  {"action": "suite_end", "source": "structured-example", "pid": 18456, "thread": "MainThread", "time": 1401446682789}
+  {"source": "structured-example", "test": "test_with_known_intermittent", "thread": "MainThread", "time": 1401446682789, "action": "test_start", "pid": 18456}
+  {"status": "FAIL", thread": "MainThread", "pid": 18456, "source": "structured-example", "test": "test_with_known_intermittent", "time": 1401446682790, "action": "test_end", "expected": "PASS", "known_intermittent": ["FAIL", "TIMEOUT"]}
+  {"action": "suite_end", "source": "structured-example", "pid": 18456, "thread": "MainThread", "time": 1401446682790}
 
 The structured logging module provides a number of command line
 options::
 
   $ python structured_example.py --help
 
   usage: structured_example.py [-h] [--log-unittest LOG_UNITTEST]
                                [--log-raw LOG_RAW] [--log-html LOG_HTML]
--- a/testing/mozbase/mozlog/setup.py
+++ b/testing/mozbase/mozlog/setup.py
@@ -2,17 +2,17 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import
 
 from setuptools import setup, find_packages
 
 PACKAGE_NAME = 'mozlog'
-PACKAGE_VERSION = '4.1.1'
+PACKAGE_VERSION = '4.2.0'
 DEPS = [
     'blessings>=1.3',
     'mozterm',
     'six >= 1.10.0',
 ]
 
 
 setup(name=PACKAGE_NAME,
--- a/testing/mozbase/mozprofile/setup.py
+++ b/testing/mozbase/mozprofile/setup.py
@@ -6,17 +6,17 @@ from __future__ import absolute_import
 
 from setuptools import setup
 
 PACKAGE_NAME = 'mozprofile'
 PACKAGE_VERSION = '2.2.0'
 
 deps = [
     'mozfile>=1.2',
-    'mozlog~=4.1.1',
+    'mozlog~=4.2.0',
     'six>=1.10.0,<2',
 ]
 
 setup(name=PACKAGE_NAME,
       version=PACKAGE_VERSION,
       description="Library to create and modify Mozilla application profiles",
       long_description="see https://firefox-source-docs.mozilla.org/mozbase/index.html",
       classifiers=['Environment :: Console',
--- a/testing/mozbase/mozrunner/setup.py
+++ b/testing/mozbase/mozrunner/setup.py
@@ -10,17 +10,17 @@ PACKAGE_NAME = 'mozrunner'
 PACKAGE_VERSION = '7.4.0'
 
 desc = """Reliable start/stop/configuration of Mozilla Applications (Firefox, Thunderbird, etc.)"""
 
 deps = [
     'mozdevice>=3.0.1',
     'mozfile>=1.2',
     'mozinfo>=0.7,<2',
-    'mozlog~=4.1.1',
+    'mozlog~=4.2.0',
     'mozprocess>=0.23,<2',
     'mozprofile~=2.1',
     'six>=1.10.0,<2',
 ]
 
 EXTRAS_REQUIRE = {'crash': ['mozcrash >= 1.0']}
 
 setup(name=PACKAGE_NAME,
--- a/testing/mozbase/mozversion/setup.py
+++ b/testing/mozbase/mozversion/setup.py
@@ -18,15 +18,15 @@ setup(name='mozversion',
       keywords='mozilla',
       author='Mozilla Automation and Testing Team',
       author_email='tools@lists.mozilla.org',
       url='https://wiki.mozilla.org/Auto-tools/Projects/Mozbase',
       license='MPL',
       packages=['mozversion'],
       include_package_data=True,
       zip_safe=False,
-      install_requires=['mozlog ~= 4.1.1',
+      install_requires=['mozlog ~= 4.2.0',
                         'six >= 1.10.0'],
       entry_points="""
       # -*- Entry points: -*-
       [console_scripts]
       mozversion = mozversion:cli
       """)