-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Testing Infrastructure
-
Fully Compatible
-
STM 2019-04-08
-
3
The changes from SERVER-28785 made it so resmoke.py writes its own command line arguments to stdout. This enables Server engineers to avoid doing mental bash evaluation to determine what command line arguments the "run tests" will synthesize and pass to resmoke.py. The command line arguments for this aggregation task include a large number of details and metadata that are specific to how we run tests in Evergreen.
[2019/03/11 20:41:06.323] [resmoke] 2019-03-11T20:41:06.322+0000 resmoke.py invocation: buildscripts/evergreen_run_tests.py --suites=aggregation --storageEngine=wiredTiger --jobs=4 --shuffle --continueOnFailure --storageEngineCacheSizeGB=1 --tagFile=etc/test_retrial.yml --log=buildlogger --staggerJobs=on --buildId=mongodb_mongo_master_enterprise_rhel_62_64_bit_6f083bd87264e9d9c3d637fae62103c36a65316a_19_03_11_19_56_34 --distroId=rhel62-small --executionNumber=0 --projectName=mongodb-mongo-master --gitRevision=6f083bd87264e9d9c3d637fae62103c36a65316a --revisionOrderId=24937 --taskId=mongodb_mongo_master_enterprise_rhel_62_64_bit_aggregation_6f083bd87264e9d9c3d637fae62103c36a65316a_19_03_11_19_56_34 --taskName=aggregation --variantName=enterprise-rhel-62-64-bit --versionId=mongodb_mongo_master_6f083bd87264e9d9c3d637fae62103c36a65316a --archiveFile=archive.json --reportFile=report.json --perfReportFile=perf.json
A more compact form for an engineer to run would look like:
buildscripts/resmoke.py --suites=aggregation --storageEngine=wiredTiger --jobs=4 --shuffle --continueOnFailure --storageEngineCacheSizeGB=1
The changes from this ticket should add a new log message after this line containing the simplified resmoke.py invocation.
self._resmoke_logger.info("verbatim resmoke.py invocation: %s", " ".join(sys.argv)) if config.EVERGREEN_TASK_ID: args = ... self._resmoke_logger.info("resmoke.py invocation for local usage: %s", " ".join(args))
It must therefore do the following:
- Always log the program name as buildscripts/resmoke.py even though in Evergreen we run the wrapper script buildscripts/evergreen_run_tests.py.
- Always log the non-generated version of the test suite name. The buildscripts/evergreen_generate_resmoke_tasks.py script generates new resmoke.py YAML suite files in order to be able to dynamically split the test suite into multiple Evergreen task which may run concurrently. Handling this behavior can be achieved by propagating self.config_options.suite as a new --originSuite command line option to resmoke.py through the _generate_resmoke_args() function.
- The sub-suite definitions are uploaded to Evergreen in the *_gen task as "Generated Task Config" but we don't really want engineers to have to worry about using them.
- Always remove the command line options not seen in the compact form above. The implementation should explicitly list the command line options to remove so that new ones still appear by default. It might be possible to be a little clever about trying to remove all the options from the evergreen_options group so that new ones added to that section never appear.
- related to
-
SERVER-40801 resmoke.py logs invalid --excludeWithAnyTags command line argument for local execution
- Closed
-
SERVER-40245 Use attach.artifacts to link to GitHub wiki from every task page
- Closed