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
--HG--
extra : moz-landing-system : lando
This patch adds a `known_intermittent_statuses` attribute to the `StatusHandler`
class, allowing it to keep a count of expected intermittents for future use.
Additionally, known intermittents are not recorded as `unexpected_statuses` but
are recorded as `expected_statuses`.
testing/mozharness/mozharness/mozilla/structuredlog.py is directly affected by
this change and has been updated to also reflect `known_intermittent_statuses`.
However, it may require a test to be written to check this addition.
The `StatusHandler` test has been added to, ensuring this patch works as expected.
Differential Revision: https://phabricator.services.mozilla.com/D33086
--HG--
extra : moz-landing-system : lando
This patch adds support for the known_intermittent field in the html,
and grouping formatters. Tests have been added to check the new
field in grouping and tbpl formatter tests.
Differential Revision: https://phabricator.services.mozilla.com/D32773
--HG--
extra : moz-landing-system : lando
As the number of tests have grown considerably, for clarity, this patch
moves the formatter tests in test_structured.py to test_formatters.py.
html.py and its corresponding test were also amended to account for
discrepancies in the way Python 2 and 3 handle strings (bytes vs text type).
Differential Revision: https://phabricator.services.mozilla.com/D33048
--HG--
extra : moz-landing-system : lando
As the number of tests have grown considerably, for clarity, this patch
moves the formatter tests in test_structured.py to test_formatters.py.
I am striking an error on one of the tests since the move.
`test_base64_other`, which tests that ability to read different characters
in the HTMLformatter. It appears that whilst moving the tests, `test_end`
now returns a unicode string, which fails the assertion. Am looking into
Python 2 v 3 discrepancies, but any guidance would be most welcome. Error
message will be attached below.
Differential Revision: https://phabricator.services.mozilla.com/D32732
--HG--
extra : moz-landing-system : lando
The in-tree log formatters have been updated to reflect the new `known_intermittent`
field, ensuring that a status matching a `known_intermittent` status is not logged as an
unexpected failure. A message is printed when there is a test status that matches this.
A test for known intermittents has been added to the test_formatters, following the
same testing style for pass or fail.
Differential Revision: https://phabricator.services.mozilla.com/D32174
--HG--
extra : moz-landing-system : lando
Currently, some of the raw JSON logs for mochitest and marionette, et al, include
empty dictionaries, None values and other unremarkable values that are marked
as optional. This fix aims to remove these unnecessary items from being
passed to the raw log.
A method has been added to the log_actions class which removes defaults if they
are marked as optional and the value is included in the default list. This is
called on the kwargs returned by the convert_known method, before being
propagated to the log_raw method for StructuredLogger.
Differential Revision: https://phabricator.services.mozilla.com/D25081
--HG--
extra : moz-landing-system : lando
Currently, some of the raw JSON logs for mochitest and marionette, et al, include
empty dictionaries, None values and other unremarkable values that are marked
as optional. This fix aims to remove these unnecessary items from being
passed to the raw log.
A method has been added to the log_actions class which removes defaults if they
are marked as optional and the value is included in the default list. This is
called on the kwargs returned by the convert_known method, before being
propagated to the log_raw method for StructuredLogger.
Differential Revision: https://phabricator.services.mozilla.com/D25081
--HG--
extra : moz-landing-system : lando
Added a new optional field on the test_end and test_status actions called expected_intermittents
which accepts a List of expected intermittent statuses. The default is None. As it is an optional
field, upon landing of D25081, it will only show if there is an expected intermittent.
A test was added to check that expected_intermittents are logged.
Differential Revision: https://phabricator.services.mozilla.com/D31809
--HG--
extra : moz-landing-system : lando
The Mozlog version number needed to be updated to 4.1 for the new
release on PyPI. The dependencies of other libraries that require
mozlog were updated to reflect the new version. (mozversion,
mozrunner, mozprofile)
Differential Revision: https://phabricator.services.mozilla.com/D30550
--HG--
extra : moz-landing-system : lando
Restore old "FAIL" tests color to red. Restore heading of mochitest. Fix
marking of unexpected failures.
Differential Revision: https://phabricator.services.mozilla.com/D25996
--HG--
extra : moz-landing-system : lando
This addition allows formatters to be configured by sending a message.
For example, the show_logs attribute has been added to the GroupingFormatter
to allow switching on/off the display of all log messages at runtime.
A generic handle_message method was added to the BaseFormatter to allow
attributes to be configured, with optional arguments for those that require
it.
An additional log(data) method has been implemented on the GroupingFormatter
that checks self.show_logs, and if True, displays all messages regardless of
failure or success, with component, level and stack.
A test may be required to ensure this is behaving as expected.
Differential Revision: https://phabricator.services.mozilla.com/D23726
--HG--
extra : moz-landing-system : lando
The default color dictionary is implemented, to avoid formattor specifying the colors discretely
Differential Revision: https://phabricator.services.mozilla.com/D24196
--HG--
extra : moz-landing-system : lando
The default color dictionary is implemented,to avoid hardcode color information. The functionality for overridding the values in formatter, is hitherto partially
implemented
Differential Revision: https://phabricator.services.mozilla.com/D23134
--HG--
extra : moz-landing-system : lando
The ability to capture the parent process' stdio is suggested to be a useful feature
to move from web-platform/tests into mozlog. To do so, I have created a new capture.py
file within mozlog/mozlog. This includes the CaptureIO class and its dependencies,
including the LoggingWrapper and LogThread classes. These have been removed from their
original location, to avoid duplication, and the files depending on them updated
accordingly.
It would be useful to add unittests testing the CaptureIO enter and exit methods, and
the original_stdio, logging_queue and logging_thread properties. I have begun such a
file with test_capture.py in mozlog/tests. This is a work in progress, however I may
need some guidance, please, in regards to creating appropriate mock data to assert.
Differential Revision: https://phabricator.services.mozilla.com/D22166
--HG--
extra : moz-landing-system : lando
The HTML formatter now references the correct link and does not produce a 404 error
Differential Revision: https://phabricator.services.mozilla.com/D21207
--HG--
extra : moz-landing-system : lando
The HTML formatter now references the correct link and does not produce a 404 error
Differential Revision: https://phabricator.services.mozilla.com/D21207
--HG--
extra : moz-landing-system : lando
The following python-test paths are being moved out of 'make check' and into their own task:
- python/mozlint
- testing/mozbase
- tools/lint
The following python-test paths previously did not run on Windows:
- python/mozterm
- testing/marionette
- testing/raptor
- tools/tryselect
Differential Revision: https://phabricator.services.mozilla.com/D10759
--HG--
extra : moz-landing-system : lando
Moves mozleak to use structured logging. The logger gets two new
actions, mozleak_object to indicate the name of an object that leaked
in a specific process and mozleak_total to indicate the total number
of bytes leaked in a process.
The output from the TBPL formatter is
expected to remain near-identical to the previous output from the
logger, so there shouldn't be any effect on the ability to fail jobs
if there are leaks.
Additional features required by web-platform-tests are also added
here; the leak thresholds are passed to the logger for mozleak_total
and a list of any objects allowed to leak are passed for
mozleak_object, so that a log consumer may decide whether a leak is
unexpected. In addition, the scope attribute is used to specify the
set of tests (or other tasks) running at the time of the leak, which
may be used to associate a leak with a specific set of files.
MozReview-Commit-ID: 19FsMxVQExH
Depends on D12408
Differential Revision: https://phabricator.services.mozilla.com/D12409
--HG--
extra : moz-landing-system : lando
The following python-test paths are being moved out of 'make check' and into their own task:
- python/mozlint
- testing/mozbase
- tools/lint
The following python-test paths previously did not run on Windows:
- python/mozterm
- testing/marionette
- testing/raptor
- tools/tryselect
MozReview-Commit-ID: C07FANaYzf7
Depends on D10758
Differential Revision: https://phabricator.services.mozilla.com/D10759
--HG--
extra : moz-landing-system : lando
This is designed to produce minimal output; just show which tests are
running and then provide details at the end for tests that gave an
unexpected result.
This is designed to produce minimal output; just show which tests are
running and then provide details at the end for tests that gave an
unexpected result.
Bump the version number to 3.8, incorporating the LSAN changes. This
minor version bump assumes that mozlog consumers are supposed to
handle unknown actions gracefully (i.e. by ignoring them) and
therefore adding actions doesn't count as a compat-breaking change.
MozReview-Commit-ID: ECsDTuUgkfQ