Skip to content

Commit

Permalink
Module Execution Config
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoxaAntoxic committed Nov 29, 2024
1 parent 3c6d39d commit 1bb22af
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions prebid-server/pbs-modules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,17 @@ describe where the config file lives and what format it should take.

### 3.1 Admin Module Execution Configuration

`hooks.admin.module-execution` is a key-value map, where a key is a module name and a value is a boolean. It defines whether module's hooks should be always executed or not if it's present in the execution plan.
`hooks.admin.module-execution` is a key-value map, where a key is a module name and a value is a boolean. It defines whether module's hooks should/should not be always executed.
This property can be configured on the host level at initialization as well as via account-config mechanism (a runtime config).
The host level config has precedence over the account config.

`settings.modules.require-config-to-invoke` is a host-level boolean property. When enabled it requires a runtime config to exist for a module.

Both properties work together:

- `hooks.admin.module-execution` is able to make the modules that doesn't require the runtime config to be always executed even if the `settings.modules.require-config-to-invoke` set to `true`
- `hooks.admin.module-execution` allows to disable a module execution even if the module is present in the execution plan
- if a module is not specified in the `hooks.admin.module-execution`, but present in the execution plan, it will be executed by default, except for the case when it requires a runtime config, the `settings.modules.require-config-to-invoke` set to `true`, but it doesn't have it
- since the `settings.modules.require-config-to-invoke` does not have any impact on Entrypoint hooks, the only way to disable them altogether with other hooks of the module is disabling it configuring `hooks.admin.module-execution` on the host level
* `hooks.admin.module-execution` is able to make the modules that doesn't require the runtime config to be always executed even if the `settings.modules.require-config-to-invoke` set to `true`

Check failure on line 151 in prebid-server/pbs-modules/index.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Lists should be surrounded by blank lines

prebid-server/pbs-modules/index.md:151 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "* `hooks.admin.module-executio..."] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md032.md
* `hooks.admin.module-execution` allows to disable a module execution even if the module is present in the execution plan
* if a module is not specified in the `hooks.admin.module-execution`, but present in the execution plan, it will be executed by default, except for the case when it requires a runtime config, the `settings.modules.require-config-to-invoke` set to `true`, but it doesn't have it
* since the `settings.modules.require-config-to-invoke` does not have any impact on Entrypoint hooks, the only way to disable them altogether with other hooks of the module is disabling it configuring `hooks.admin.module-execution` on the host level

Example:
```yaml

Check failure on line 157 in prebid-server/pbs-modules/index.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Fenced code blocks should be surrounded by blank lines

prebid-server/pbs-modules/index.md:157 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```yaml"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md031.md
Expand Down

0 comments on commit 1bb22af

Please sign in to comment.