Skip to content

Commit ebab1b1

Browse files
DEVPROD-14400 Update docs (#89)
1 parent 71c0f50 commit ebab1b1

File tree

4 files changed

+77
-90
lines changed

4 files changed

+77
-90
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
name = "mongo-task-generator"
3-
description = "Dynamically split evergreen tasks into subtasks for testing the mongodb/mongo project."
3+
description = "Dynamically split evergreen tasks into subtasks for testing the 10gen/mongo project."
44
license = "Apache-2.0"
55
version = "0.7.22"
66
repository = "https://github.com/mongodb/mongo-task-generator"
7-
authors = ["Decision Automation Group <dev-prod-dag@mongodb.com>"]
7+
authors = ["DevProd Correctness Team <devprod-correctness-team@mongodb.com>"]
88
edition = "2018"
99

1010
[dependencies]

README.md

+37-28
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Mongo Task Generator
22

3-
Dynamically split evergreen tasks into subtasks for testing the mongodb/mongo project.
3+
Dynamically split evergreen tasks into subtasks for testing the 10gen/mongo project.
44

55
## Table of contents
66

@@ -27,11 +27,11 @@ Dynamically split evergreen tasks into subtasks for testing the mongodb/mongo pr
2727

2828
## Description
2929

30-
A tool to dynamically generate and split resmoke tests for the mongodb/mongo project into sub-tasks
30+
A tool to dynamically generate and split resmoke tests for the 10gen/mongo project into sub-tasks
3131
that can be run in parallel. For example, a task that runs in 2 hours could be split into 4 sub-tasks
3232
that can be run in parallel to reduce the wall-clock time of to closer to 30 minutes.
3333

34-
The tool will use [Evergreen Test Stats](https://github.com/evergreen-ci/evergreen/wiki/REST-V2-Usage#teststats)
34+
The tool will use [Evergreen Test Stats](https://docs.devprod.prod.corp.mongodb.com/evergreen/Project-Configuration/Evergreen-Data-for-Analytics#evergreen-test-statistics)
3535
to determine how to divide the tests between sub-tasks. If test stats are not available for any
3636
reason, it will fallback to splitting tests so that each sub-tasks contains an equal number of tests.
3737

@@ -46,12 +46,12 @@ For example, if `n_files=3` and `n_tasks=5`, a total of 15 files will be run in
4646

4747
### What's the right channel to ask my question?
4848

49-
If you have a question about _Mongo Task Generator_, please reach out on slack in the #server-testing
50-
channel, or email us at dev-prod-dag@mongodb.com.
49+
If you have a question about _Mongo Task Generator_, please reach out on slack in #ask-devprod-correctness or #server-testing
50+
channel, or email us at devprod-correctness-team@mongodb.com.
5151

5252
### How can I request a change/report a bug in _Mongo Task Generator_?
5353

54-
Create a [DAG ticket](https://jira.mongodb.org/browse/DAG) in Jira.
54+
Create a [DEVPROD ticket](https://jira.mongodb.org/browse/DEVPROD) in Jira.
5555

5656
### What should I include in my ticket or question?
5757

@@ -67,13 +67,13 @@ Please include the following:
6767

6868
This project is built to run on linux. It is tested on Ubuntu 18.04.
6969

70-
The [evergreen CLI](https://github.com/evergreen-ci/evergreen/wiki/Using-the-Command-Line-Tool) is
70+
The [evergreen CLI](https://docs.devprod.prod.corp.mongodb.com/evergreen/CLI) is
7171
required.
7272

7373
## Installation
7474

7575
The tool can be downloaded from the [github releases](https://github.com/mongodb/mongo-task-generator/releases)
76-
page. It is currently built on Ubuntu 18.04 and should work on recent x86 linux distributions.
76+
page. It is currently built on Ubuntu 20.04 and should work on recent x86 linux distributions.
7777

7878
The install can be automated using a tool like `wget` or `curl`:
7979

@@ -86,27 +86,36 @@ wget https://github.com/mongodb/mongo-task-generator/releases/download/v0.1.0/mo
8686
To generate the task information, run the `mongo-task-generator` command at the root of the
8787
mongodb repository. The generated configuration will be created in the `generated_resmoke_config`
8888
directory. The `evergreen_config.json` file in that directory should be passed to evergreen as
89-
part of a [`generate.tasks`](https://github.com/evergreen-ci/evergreen/wiki/Project-Commands#generatetasks)
89+
part of a [`generate.tasks`](https://docs.devprod.prod.corp.mongodb.com/evergreen/Project-Configuration/Project-Commands#generatetasks)
9090
command call.
9191

9292
```bash
93-
mongo-task-generator
94-
95-
USAGE:
96-
mongo-task-generator --evg-project-file <EVG_PROJECT_FILE> --expansion-file <EXPANSION_FILE> --evg-auth-file <EVG_AUTH_FILE>
97-
98-
OPTIONS:
99-
--evg-auth-file <EVG_AUTH_FILE>
100-
File with information on how to authenticate against the evergreen API
101-
102-
--evg-project-file <EVG_PROJECT_FILE>
103-
File containing evergreen project configuration
104-
105-
--expansion-file <EXPANSION_FILE>
106-
File containing expansions that impact task generation
107-
108-
-h, --help
109-
Print help information
93+
mongo-task-generator --help
94+
Usage: mongo-task-generator [OPTIONS] --expansion-file <EXPANSION_FILE>
95+
96+
Options:
97+
--evg-project-file <EVG_PROJECT_FILE>
98+
File containing evergreen project configuration [default: etc/evergreen.yml]
99+
--expansion-file <EXPANSION_FILE>
100+
File containing expansions that impact task generation
101+
--evg-auth-file <EVG_AUTH_FILE>
102+
File with information on how to authenticate against the evergreen API [default: ~/.evergreen.yml]
103+
--target-directory <TARGET_DIRECTORY>
104+
Directory to write generated configuration files [default: generated_resmoke_config]
105+
--use-task-split-fallback
106+
Disable evergreen task-history queries and use task splitting fallback
107+
--resmoke-command <RESMOKE_COMMAND>
108+
Command to invoke resmoke [default: "python buildscripts/resmoke.py"]
109+
--generate-sub-tasks-config <GENERATE_SUB_TASKS_CONFIG>
110+
File containing configuration for generating sub-tasks
111+
--burn-in
112+
Generate burn_in related tasks
113+
--burn-in-tests-command <BURN_IN_TESTS_COMMAND>
114+
Command to invoke burn_in_tests [default: "python buildscripts/burn_in_tests.py run"]
115+
--s3-test-stats-endpoint <S3_TEST_STATS_ENDPOINT>
116+
S3 endpoint to get test stats from [default: https://mongo-test-stats.s3.amazonaws.com]
117+
-h, --help
118+
Print help
110119
```
111120

112121
## Documentation
@@ -190,5 +199,5 @@ for the project.
190199

191200
## Resources
192201

193-
- [Evergreen generate.tasks documentation](https://github.com/evergreen-ci/evergreen/wiki/Project-Commands#generatetasks)
194-
- [Evergreen test stats documentation](https://github.com/evergreen-ci/evergreen/wiki/REST-V2-Usage#teststats)
202+
- [Evergreen generate.tasks documentation](https://docs.devprod.prod.corp.mongodb.com/evergreen/Project-Configuration/Project-Commands#generatetasks)
203+
- [Evergreen test stats documentation](https://docs.devprod.prod.corp.mongodb.com/evergreen/Project-Configuration/Evergreen-Data-for-Analytics#evergreen-test-statistics)

docs/generating_tasks.md

+37-59
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Generating tasks
22

33
Generating tasks is a way to dynamically create tasks in Evergreen builds. This is done via the
4-
['generate.tasks'](https://github.com/evergreen-ci/evergreen/wiki/Project-Commands#generatetasks)
4+
['generate.tasks'](https://docs.devprod.prod.corp.mongodb.com/evergreen/Project-Configuration/Project-Commands#generatetasks)
55
evergreen command.
66

77
## Use-cases
88

9-
The `mongo-task-generator` is used by the [mongodb/mongo](https://github.com/mongodb/mongo) project
9+
The `mongo-task-generator` is used by the [10gen/mongo](https://github.com/10gen/mongo) project
1010
testing to generate most of the dynamic tasks in an evergreen version.
1111

1212
The following 3 use-cases of dynamic task creation are supported:
@@ -72,16 +72,14 @@ bottleneck in the overall runtime of a build, we can use dynamic task generation
7272
test suites into sub-suites that can be run in parallel on different hosts.
7373

7474
For tasks appropriately marked, the `mongo-task-generator` will query the
75-
[runtime stats](https://github.com/evergreen-ci/evergreen/wiki/REST-V2-Usage#teststats)
76-
for the last 2 weeks and use those to divide up the tests into sub-suite with roughly even
77-
runtimes. It will then generate "sub-tasks" for each of the "sub-suites" to actually run the
78-
tests.
75+
[runtime stats](https://docs.devprod.prod.corp.mongodb.com/evergreen/Project-Configuration/Evergreen-Data-for-Analytics#evergreen-test-statistics)
76+
endpoint https://mongo-test-stats.s3.amazonaws.com/{evg-project-name}/{variant-name}/{task-name}
77+
and use those stats to divide up the tests into sub-suite with roughly even runtimes.
78+
It will then generate "sub-tasks" for each of the "sub-suites" to actually run the tests.
7979

80-
We also generate a sub-suite with the suffix "_misc". Since the generated sub-suites are based
81-
on the runtime history of tests, there is a chance that a test exists that has no history -- for
82-
example, a newly added tests. The "_misc" sub-task will try to run all the tests, but exclude any
83-
tests that were included in the generated sub-tasks. This is used to catch any tasks without test
84-
runtime history.
80+
Since the generated sub-suites are based on the runtime history of tests, there is a chance that
81+
a test exists that has no history -- for example, a newly added tests. Such tests will be
82+
distributed with a roughly equal number of tests among all sub-tasks.
8583

8684
If for any reason the runtime history cannot be obtained (e.g. errors in querying, a task having no
8785
runtime history, etc), task splitting will fallback to splitting the tests into sub-tasks that
@@ -180,6 +178,7 @@ the `"no_multiversion_generate_tasks"` tag should also be included. This is typi
180178
run_no_feature_flag_tests: "true
181179
```
182180
The `"initialize multiversion tasks"` function has all of the related suites to run as sub-tasks of this task as variable names and the "old" version to run against as the values. The absence of the `"no_multiversion_generate_tasks"` tag indicates to the task generator to generate sub-tasks for this task according to the `"initialize multiversion tasks"` function variables. Because the `suite` name is embedded in the `"initialize multiversion tasks"` variables, a `suite` variable passed to `"generate resmoke tasks"` will have no effect. Additionally, the variable/suite names in `"initialize multiversion tasks"` must be globally unique because these are ultimately going to become the sub-task name and evergreen requires task names to be unique.
181+
183182
### Burn in tests, burn in tags and burn in tasks
184183

185184
Newly added or modified tests might become flaky. In order to avoid that, those tests can be run
@@ -266,7 +265,7 @@ Burn-in related tasks are generated when `--burn-in` is passed.
266265
## Working with generated tasks
267266

268267
A generated tasks is typically composed of a number of related sub-tasks. Because evergreen does
269-
not actually support the concept of sub-tasks, [display tasks](https://github.com/evergreen-ci/evergreen/wiki/Project-Configuration-Files#display-tasks)
268+
not actually support the concept of sub-tasks, [display tasks](https://docs.devprod.prod.corp.mongodb.com/evergreen/Project-Configuration/Project-Configuration-Files#display-tasks)
270269
are used to instead.
271270

272271
In evergreen, a display task is a container for a number of "execution tasks". The "execution tasks"
@@ -287,7 +286,7 @@ directory. The generate.tasks configuration will be the "evergreen_config.json"
287286
### expansions-file
288287

289288
In order to execute the command, you must provide an "expansion" file. When running in
290-
evergreen, the [expansions.write](https://github.com/evergreen-ci/evergreen/wiki/Project-Commands#expansions-write)
289+
evergreen, the [expansions.write](https://docs.devprod.prod.corp.mongodb.com/evergreen/Project-Configuration/Project-Commands#expansionswrite)
291290
command will generate this file for you.
292291

293292
This file should be yaml and must contain the following entries:
@@ -312,56 +311,35 @@ You must provide the expansion file when running the `mongo-task-generator` comm
312311
mongo-task-generator --expansion-file expansions.yml
313312
```
314313

315-
### Other options
316-
317-
There are several other details the command needs to run correctly, you may specify them
318-
if the default value does not apply.
319-
320-
* **evg-auth-file**: A yaml file containing information for how to authenticate with the evergreen
321-
API. This should follow the same format used by the [Evergreen CLI tool](https://github.com/evergreen-ci/evergreen/wiki/Using-the-Command-Line-Tool#downloading-the-command-line-tool).
322-
This defaults to `~/.evergreen.yml`.
323-
* **evg-project-file**: The yaml file containing the evergreen project configuration for the
324-
project being run against. This defaults to `etc/evergreen.yml`.
325-
* **resmoke-command**: How to invoke the resmoke command. The resmoke command is used to determine
326-
configuration about the tests being run. It defaults to `python buildscripts/resmoke.py`. If you
327-
store your resmokeconfig is a different directory, you can adjust this value:
328-
`python buildscripts/resmoke.py --configDir=path/to/resmokeconfig`.
329-
* **target-directory**: Directory to write generated configuration to. This defaults to `generated_resmoke_config`.
330-
* **burn-in**: Whether to generate burn_in related tasks. If specified only burn_in tasks will be
331-
generated.
332-
* **burn-in-tests-command**: How to invoke the burn_in_tests command. The burn_in_tests command is
333-
used to discover modified or added tests and the tasks they being run on. It defaults to
334-
`python buildscripts/burn_in_tests.py run`.
335-
336314
## Usage help
337315

338316
You can run with the `--help` options to get information on the command usage:
339317

340318
```bash
341319
$ mongo-task-generator --help
342-
USAGE:
343-
mongo-task-generator [OPTIONS] --expansion-file <EXPANSION_FILE>
344-
345-
OPTIONS:
346-
--burn-in
347-
Generate burn_in related tasks
348-
--burn-in-tests-command <BURN_IN_TESTS_COMMAND>
349-
Command to invoke burn_in_tests [default: "python buildscripts/burn_in_tests.py run"]
350-
--evg-auth-file <EVG_AUTH_FILE>
351-
File with information on how to authenticate against the evergreen API [default:
352-
~/.evergreen.yml]
353-
--evg-project-file <EVG_PROJECT_FILE>
354-
File containing evergreen project configuration [default: etc/evergreen.yml]
355-
--expansion-file <EXPANSION_FILE>
356-
File containing expansions that impact task generation
357-
--generate-sub-tasks-config <GENERATE_SUB_TASKS_CONFIG>
358-
File containing configuration for generating sub-tasks
359-
-h, --help
360-
Print help information
361-
--resmoke-command <RESMOKE_COMMAND>
362-
Command to invoke resmoke [default: "python buildscripts/resmoke.py"]
363-
--target-directory <TARGET_DIRECTORY>
364-
Directory to write generated configuration files [default: generated_resmoke_config]
365-
--use-task-split-fallback
366-
Disable evergreen task-history queries and use task splitting fallback
320+
Usage: mongo-task-generator [OPTIONS] --expansion-file <EXPANSION_FILE>
321+
322+
Options:
323+
--evg-project-file <EVG_PROJECT_FILE>
324+
File containing evergreen project configuration [default: etc/evergreen.yml]
325+
--expansion-file <EXPANSION_FILE>
326+
File containing expansions that impact task generation
327+
--evg-auth-file <EVG_AUTH_FILE>
328+
File with information on how to authenticate against the evergreen API [default: ~/.evergreen.yml]
329+
--target-directory <TARGET_DIRECTORY>
330+
Directory to write generated configuration files [default: generated_resmoke_config]
331+
--use-task-split-fallback
332+
Disable evergreen task-history queries and use task splitting fallback
333+
--resmoke-command <RESMOKE_COMMAND>
334+
Command to invoke resmoke [default: "python buildscripts/resmoke.py"]
335+
--generate-sub-tasks-config <GENERATE_SUB_TASKS_CONFIG>
336+
File containing configuration for generating sub-tasks
337+
--burn-in
338+
Generate burn_in related tasks
339+
--burn-in-tests-command <BURN_IN_TESTS_COMMAND>
340+
Command to invoke burn_in_tests [default: "python buildscripts/burn_in_tests.py run"]
341+
--s3-test-stats-endpoint <S3_TEST_STATS_ENDPOINT>
342+
S3 endpoint to get test stats from [default: https://mongo-test-stats.s3.amazonaws.com]
343+
-h, --help
344+
Print help
367345
```

src/evergreen_names.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Names referencing items in the mongodb/mongo etc/evergreen.yml.
1+
//! Names referencing items in the 10gen/mongo etc/evergreen.yml.
22
33
// Module Names
44
/// Name of enterprise module.

0 commit comments

Comments
 (0)