Skip to content

Commit 8dede05

Browse files
committed
[FIX] runbot: fix a bunch of typos and mistackes
1 parent 01697cb commit 8dede05

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

runbot/documentation/dynamic_config.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Dynamic configs
22

3-
Dynamics configs are a way to define how to install, tests, create build or even run script from a json file that can be either defined on the config server side, or in the code in a specified path.
3+
Dynamic configs are a way to define how to install, test, create builds, or even run scripts from a JSON file that can be defined either on the config server side or in the code at a specified path.
44

5-
Dynamic config can also be extended to define custom behaviour in another repository (extend a blacklist, change behaviour, ...) but also on the config, to define a final layer of configuration.
5+
Dynamic configs can also be extended to define custom behavior in another repository (extend a blacklist, change behavior, ...) or on the config itself, to define a final layer of configuration.
66

77
## Example
88

9-
An [example file](../tests/test_build_config_step_dynamic.json) is available and used for testing. It is a simplified version of the parallel tesing used on runbot and will be used as a reference since it is quite complete.
9+
An [example file](../tests/test_build_config_step_dynamic.json) is available and used for testing. It is a simplified version of the parallel testing used on runbot and will be used as a reference since it is quite complete.
1010

1111
## Config Schema
1212

1313
### Config root
14-
The config structure is define this way:
14+
The config structure is defined as follows:
1515
```python
1616
{
1717
'name': REQUIRED(NAME),
@@ -21,21 +21,21 @@ The config structure is define this way:
2121
}
2222
```
2323

24-
The steps are the sequence of operation to execute inside a single build. At least one step is required.
24+
The steps are the sequence of operations to execute inside a single build. At least one step is required.
2525

26-
The name is mandatory and should idealy be unique. It is used for display and can also be used as an anchor when using extensions. The NAME can contain alphanumerical character, spaces, _ and -.
26+
The name is mandatory and should ideally be unique. It is used for display and can also be used as an anchor when using extensions. The NAME can contain alphanumerical characters, spaces, _ and -.
2727
```json
2828
"name": "Parallel testing",
2929
```
30-
The vars is a dictionary of variables. This can be used to define some values that will be used in multiple places in the config. Variables are currently supported by `description`, `install_modules` and `test_tags`
30+
The vars key is a dictionary of variables. This can be used to define values that will be used in multiple places in the config. Variables are currently supported by `description`, `install_modules`, and `test_tags`.
3131

3232
```json
3333
"vars": {
3434
"module_filter": "*,-hw_*"
3535
},
3636
```
3737

38-
The steps key is a list of step, each step defining a name, a job_type and some parameters specific to the job_type
38+
The steps key is a list of steps, each step defining a name, a job_type, and some parameters specific to the job_type.
3939

4040
```json
4141
"steps": [
@@ -48,15 +48,15 @@ The steps key is a list of step, each step defining a name, a job_type and some
4848
]
4949
```
5050

51-
The description can be used to add a custom description to the build, usually used when creating multiple children to differenciate them.
51+
The description can be used to add a custom description to the build, usually used when creating multiple children to differentiate them.
5252

5353
```json
5454
"description": "Post install tests for **{{test_module_filter}}**",
5555
```
5656

5757
### Config steps
5858

59-
The config steps are mainly defined by their `job_type`. The `name` key is also mandatory for display and extensions purposes.
59+
The config steps are mainly defined by their `job_type`. The `name` key is also mandatory for display and extension purposes.
6060

6161
#### Odoo step
6262
```python
@@ -83,7 +83,7 @@ Both entries will use the value as a runbot module filter, and then passed as th
8383
```
8484
In this example, `module_filter` is a variable defined in the vars section.
8585

86-
test_tags is used to define which tests to run and will be passed to odoo.
86+
test_tags is used to define which tests to run and will be passed to odoo.
8787

8888
```json
8989
"test_tags": "-post_install,-/test_lint"
@@ -95,11 +95,11 @@ test_tags is also a dynamic value and can use variables, as well as [filter](#fi
9595
```
9696

9797

98-
`demo_mode` is used to define the if the flag --with-demo or --without-demo should be passed to odoo during installation. The default value is 'default' meaning that no flag will be passed (behaviour depends on the odoo default behaviour, changed in 18.2)
98+
`demo_mode` is used to define whether the flag --with-demo or --without-demo should be passed to odoo during installation. The default value is 'default', meaning that no flag will be passed (behavior depends on the odoo default, changed in 18.2).
9999

100100
`enable_auto_tags` is True by default and will enable the automatic addition of test-tags when running tests. The automatic test tags are based on build errors.
101101

102-
`cpu_limit` is the maximum cpu time that cans be used by the docker. This is also used as a execution time limit for the step. It is mostly useful to avoid having a build stuck and taking a slot for too long. It is not adviced to set this value in the config since it could start to break randomly if the execution time is to close to the limit. This can be set using an [extension](#extensions) on the config in database.
102+
`cpu_limit` is the maximum CPU time that can be used by the docker. This is also used as an execution time limit for the step. It is mostly useful to avoid having a build stuck and taking a slot for too long. It is not advised to set this value in the config since it could start to break randomly if the execution time is too close to the limit. This can be set using an [extension](#extensions) on the config in the database.
103103

104104
#### Create build step
105105
```python
@@ -111,7 +111,7 @@ test_tags is also a dynamic value and can use variables, as well as [filter](#fi
111111
}
112112
```
113113

114-
`children` is a list of config, each child will have one of the config defined in the list.
114+
`children` is a list of configs, each child will use one of the configs defined in the list.
115115

116116
```json
117117
{
@@ -141,9 +141,9 @@ test_tags is also a dynamic value and can use variables, as well as [filter](#fi
141141
}
142142
```
143143

144-
In this example two children will be created, one testing at_install tests of all modules, the other testing test_lint only.
144+
In this example, two children will be created: one testing at_install tests of all modules, the other testing test_lint only.
145145

146-
It is also possible to define `for_each_vars`, which is a list of variable dictionaries. For each entry in the list, a child will be created for each config in the children list, with the variables overriden by the for_each_vars entry.
146+
It is also possible to define `for_each_vars`, which is a list of variable dictionaries. For each entry in the list, a child will be created for each config in the children list, with the variables overridden by the for_each_vars entry.
147147

148148
```json
149149
{
@@ -169,7 +169,7 @@ It is also possible to define `for_each_vars`, which is a list of variable dicti
169169
}
170170
```
171171

172-
In this example, two children will be created, both using the same config, but one will test the mail module, the other the web module. The description is also using the variable to differenciate the two builds.
172+
In this example, two children will be created, both using the same config, but one will test the mail module and the other the web module. The description also uses the variable to differentiate the two builds.
173173

174174
This is how the runbot post install builds are created, using [filters](#filters) to transform module filters into test tags.
175175
```json
@@ -217,7 +217,7 @@ This job type will restore a database
217217
By default, it will restore a db "all" in the parent build.
218218
A `db_name` can be provided to change the database name from "all" to any other value.
219219
A `build_id` can be provided to restore from another build instead of the parent one.
220-
A `trigger_id` can be provided to restore from the build created by a specific trigger instead of the parent one by default it will look for such a trigger in the batch from a base branch that was used to create the current batch (base_reference_batch_id). This is mainly usefull for multibuild, restoring a database that is close enough of the current commits automatically when we only want to run the tests. Alternatively, if `use_current_batch` is set to True, the trigger will be searched in the current batch instead of the base_reference_batch_id one. Note that it will most likely fail if executed before the build creating the dump is finished, but can still be usefull for manual triggers when the build will be run manually after the main database is installed, when some model/data changes are needed.
220+
A `trigger_id` can be provided to restore from the build created by a specific trigger instead of the parent one. By default, it will look for such a trigger in the batch from a base branch that was used to create the current batch (base_reference_batch_id). This is mainly useful for multibuild, restoring a database that is close enough to the current commits automatically when we only want to run the tests. Alternatively, if `use_current_batch` is set to True, the trigger will be searched in the current batch instead of the base_reference_batch_id one. Note that it will most likely fail if executed before the build creating the dump is finished, but can still be useful for manual triggers when the build will be run manually after the main database is installed, when some model/data changes are needed.
221221

222222

223223
### Command steps
@@ -236,7 +236,7 @@ A `trigger_id` can be provided to restore from the build created by a specific t
236236

237237
The `command` step will run a custom command inside the odoo container.
238238

239-
The `command` is a dynamic value that will be formated with some basic values: `db_name`, `data_dir`, `addons_path`, `exports`, `exports_paths`
239+
The `command` is a dynamic value that will be formatted with some basic values: `db_name`, `data_dir`, `addons_path`, `exports`, `exports_paths`
240240

241241
Example:
242242
```json
@@ -247,13 +247,13 @@ Example:
247247
"command": "odoo/odoo/tests/test_module_operations.py -d {{db_name}} --data-dir {{data_dir}} --addons-path {{addons_path}} --standalone all_l10n"
248248
}
249249
```
250-
Note: db_name is not the same as the db_name passed in parametter, the parameter is actually a suffix where the parameter is the complete dbname (with build dest prefix)
250+
Note: db_name is not the same as the db_name passed in the parameter; the parameter is actually a suffix, while the parameter is the complete dbname (with build destination prefix).
251251

252252

253253

254254
## Extensions
255255

256-
It is possible to extend a dynamic config by defining an extension either on the config server side, or in another file/repository.
256+
It is possible to extend a dynamic config by defining an extension either on the config server side or in another file/repository.
257257
```json
258258
{
259259
"extension": true,
@@ -277,8 +277,8 @@ This will alter the variable `module_filter` append `,-l10n_*`, effectively excl
277277
```
278278
This will search in all steps for a step named "install all" and set its cpu_limit to 6500.
279279

280-
The basic logic of extension is that both the basic and extension structure are explored on all matching entries, until one of the entry of the extension is a command (a two elements list with a command and a value). The command is then applied to the base value.
281-
When parcouring a list, the matching is done using all keys starting with `@`. In the previous example, the step with name "install all" is matched using the `@name` key. If no key was given, all steps would have been extended.
280+
The basic logic of extension is that both the base and extension structures are explored on all matching entries, until one of the entries of the extension is a command (a two-element list with a command and a value). The command is then applied to the base value.
281+
When traversing a list, the matching is done using all keys starting with `@`. In the previous example, the step with name "install all" is matched using the `@name` key. If no key was given, all steps would have been extended.
282282

283283
Currently available commands are:
284284

@@ -288,32 +288,32 @@ Currently available commands are:
288288

289289
## Module selection
290290

291-
The runbot module selection works by parsing all filters/selectors (comma separated list) in the given order, each element adding or removing modules from the selection.
291+
The runbot module selection works by parsing all filters/selectors (comma-separated list) in the given order, each element adding or removing modules from the selection.
292292

293293
The basic selector is a fnmatch on a module name.
294294

295-
Selector can be prefixed with a `-` to exclude modules matching the selector.
295+
Selectors can be prefixed with a `-` to exclude modules matching the selector.
296296

297297
If not prefixed with a `-`, the selector will add all available modules matching the selector to the selection.
298298

299299
The first selector is usually `*`, meaning to select all modules, or '-*', to ensure that we start with an empty list.
300300

301301
`*,-hw_*` means to select all modules except those starting with `hw_`.
302302
`*,-*l10n_*,test_l10n*` means to select all modules except those containing `l10n_`, but still includes modules starting with `test_l10n`.
303-
`blacklisted_module` will force to include a `blacklisted_module` even if it is blacklisted. Since the selection is not starting with `*`, only module not blacklisted on the repo will be added by default. Note that once a `*` is added at some point, the repo blacklist is completely ignored.
303+
`blacklisted_module` will force inclusion of a `blacklisted_module` even if it is blacklisted. Since the selection is not starting with `*`, only modules not blacklisted on the repo will be added by default. Note that once a `*` is added at some point, the repo blacklist is completely ignored.
304304

305-
Additionally, some filters cans also be used to filter the current list of modules using a range based on alphanumeric sorting of module names:
306-
`[!]<m1> -> [!]<m1>`
305+
Additionally, some filters can also be used to filter the current list of modules using a range based on alphanumeric sorting of module names:
306+
`[!]<m1> -> [!]<m2>`
307307

308-
The -> defines a range, selecting all module between m1 and m2 inclusively. If m1 is omitted, the range starts at the beginning of the list, if m2 is omitted, the range ends at the end of the list.
309-
The ! negates the module, meaning that modules itself will be excluded from the selection.
308+
The -> defines a range, selecting all modules between m1 and m2 inclusively. If m1 is omitted, the range starts at the beginning of the list; if m2 is omitted, the range ends at the end of the list.
309+
The ! negates the module, meaning that the module itself will be excluded from the selection.
310310

311311
`-> !mail` will keep only modules that are before `mail` in alphanumeric order, excluding mail.
312312
`mail -> !web` will keep only modules between mail and web, excluding web but including mail.
313313
`web -> web` will keep web.
314314
`!web ->` will keep only modules after web, excluding web.
315315

316-
Note that using `web` instead of `web->web` would include web, but also all modules before and after web, effectively selecting all modules. An equivalent solution could be to do `-*,web`
316+
Note that using `web` instead of `web->web` would include web, but also all modules before and after web, effectively selecting all modules. An equivalent solution could be to use `-*,web`.
317317

318318

319319
## Filters

0 commit comments

Comments
 (0)