Name Description Size
__init__.py 0
config.py Generic config parsing and dumping, the way I remember it from scripts gone by. The config should be built from script-level defaults, overlaid by config-file defaults, overlaid by command line options. (For buildbot-analogues that would be factory-level defaults, builder-level defaults, and build request/scheduler settings.) The config should then be locked (set to read-only, to prevent runtime alterations). Afterwards we should dump the config to a file that is uploaded with the build, and can be used to debug or replicate the build at a later time. TODO: * check_required_settings or something -- run at init, assert that these settings are set. 24278
diskutils.py Disk utility module, no mixins here! examples: 1) get disk size from mozharness.base.diskutils import DiskInfo, DiskutilsError ... try: DiskSize().get_size(path='/', unit='Mb') except DiskutilsError as e: # manage the exception e.g: log.error(e) pass log.info("%s" % di) 2) convert disk size: from mozharness.base.diskutils import DiskutilsError, convert_to ... file_size = <function that gets file size in bytes> # convert file_size to GB try: file_size = convert_to(file_size, from_unit='bytes', to_unit='GB') except DiskutilsError as e: # manage the exception e.g: log.error(e) pass 5522
errors.py Generic error lists. Error lists are used to parse output in mozharness.base.log.OutputParser. Each line of output is matched against each substring or regular expression in the error list. On a match, we determine the 'level' of that line, whether IGNORE, DEBUG, INFO, WARNING, ERROR, CRITICAL, or FATAL. TODO: Context lines (requires work on the OutputParser side) TODO: We could also create classes that generate these, but with the appropriate level (please don't die on any errors; please die on any warning; etc.) or platform or language or whatever. 5838
log.py Generic logging classes and functionalities for single and multi file logging. Capturing console output and providing general logging functionalities. Attributes: FATAL_LEVEL (int): constant logging level value set based on the logging.CRITICAL value DEBUG (str): mozharness `debug` log name INFO (str): mozharness `info` log name WARNING (str): mozharness `warning` log name CRITICAL (str): mozharness `critical` log name FATAL (str): mozharness `fatal` log name IGNORE (str): mozharness `ignore` log name LOG_LEVELS (dict): mapping of the mozharness log level names to logging values ROOT_LOGGER (logging.Logger): instance of a logging.Logger class TODO: - network logging support. - log rotation config 29695
parallel.py Generic ways to parallelize jobs. 1330
python.py Python usage, esp. virtualenv. 35766
script.py Generic script objects. script.py, along with config.py and log.py, represents the core of mozharness. 98573
transfer.py Generic ways to upload + download files. 1126
vcs 4