|
| 1 | +--- |
| 2 | +title: "8.4" |
| 3 | +description: DipDup 8.4 release notes |
| 4 | +--- |
| 5 | + |
| 6 | +<!-- markdownlint-disable no-inline-html --> |
| 7 | + |
| 8 | +# Release Notes: 8.4 |
| 9 | + |
| 10 | +DipDup 8.4 introduces improvements to environment variable management, a new watchdog service for enhanced reliability, and numerous stability fixes. |
| 11 | + |
| 12 | +## Watchdog service |
| 13 | + |
| 14 | +A new watchdog service has been added to help detect and handle situations where the indexer may become unresponsive. Common causes for the indexer hanging include: |
| 15 | + |
| 16 | +- Long-running callback functions. Possible causes include infinite loops, heavy computations, or blocking I/O operations. |
| 17 | +- Stalled SQL transactions, which can occur due to deadlocks or long-running queries. |
| 18 | +- Unresponsive Websocket connections (ping-pong successful but no data received). |
| 19 | + |
| 20 | +The watchdog monitors these triggers and take action if they exceed a specified timeout. Actions can be set to `warning`, `exception`, or `ignore` for each type. |
| 21 | + |
| 22 | +Example configuration with default values: |
| 23 | + |
| 24 | +```yaml |
| 25 | +advanced: |
| 26 | + watchdog: |
| 27 | + callback: |
| 28 | + action: warning |
| 29 | + timeout: 10 |
| 30 | + transaction: |
| 31 | + action: warning |
| 32 | + timeout: 10 |
| 33 | + websocket: |
| 34 | + action: warning |
| 35 | + timeout: 60 |
| 36 | +``` |
| 37 | +
|
| 38 | +## Managing env variables |
| 39 | +
|
| 40 | +### Envvfile generation |
| 41 | +
|
| 42 | +Before this release, DipDup used `.env.default` files to help users manage environment variables. These files were automatically generated on every `init` call and included in the project package. When setting up new environments, users were expected to copy the `.env.default` file to `.env` and modify it as needed. This approach had several drawbacks: |
| 43 | + |
| 44 | +- `.env.default` stubs could easily become outdated, leading to potential misconfiguration. |
| 45 | +- Including any envfile-alike files in the project package increased the risk of accidentally committing secrets to git. |
| 46 | + |
| 47 | +In this release, `.env.default` files have been removed. Instead, use the `config env` command to manage environment variables in a more robust and flexible way. It ensures that your environment is always up to date, allows you to resolve the current environment, chain configuration files as needed, and add internal `DIPDUP_` variables. |
| 48 | + |
| 49 | +```shell [Terminal] |
| 50 | +# Show variables used in the root config |
| 51 | +dipdup config env |
| 52 | +
|
| 53 | +# Create a new envfile for `compose` environment |
| 54 | +dipdup -C compose config env -o .env |
| 55 | + |
| 56 | +# Add another config to the chain and include internal variables |
| 57 | +dipdup -C compose -C dev config env -o .env --internal |
| 58 | +``` |
| 59 | + |
| 60 | +### `dipdup.env` file |
| 61 | + |
| 62 | +Now you can create a `dipdup.env` file in the current working directory. It will be loaded automatically when you run DipDup and take precedence over other sources. This is mostly useful for internal variables. |
| 63 | + |
| 64 | +```shell |
| 65 | +## Enable debug mode for every `dipdup` command from cwd |
| 66 | +echo "DIPDUP_DEBUG=1" >> dipdup.env |
| 67 | +``` |
| 68 | + |
| 69 | +{{ #include 9.release-notes/_8.4_changelog.md }} |
| 70 | +{{ #include 9.release-notes/_footer.md }} |
0 commit comments