|
| 1 | + |
1 | 2 | # Changes |
2 | 3 |
|
3 | 4 | [//]: # (NOTES:) |
|
14 | 15 | [Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest) |
15 | 16 | ------------------------------------------------------------------------------------------------------------------ |
16 | 17 |
|
17 | | -[//]: # (list changes here, using '-' for each new entry, remove this when items are added) |
| 18 | +## Fixes |
| 19 | +- Enforce the load order of components defined in env.local |
| 20 | + |
| 21 | + Extra components defined in the `EXTRA_CONF_DIRS` variables were being loaded before the dependant components |
| 22 | + defined in the `COMPONENT_DEPENDENCIES` variables in each default.env file. This meant that if an extra component |
| 23 | + was meant to override some setting defined in a dependant component, the setting would not be overridden by the |
| 24 | + extra component. |
| 25 | + |
| 26 | + This change enforces the following load order rules: |
| 27 | + |
| 28 | + - components defined in `DEFAULT_CONF_DIRS` are loaded before those in `EXTRA_CONF_DIRS` |
| 29 | + - components are loaded in the order they appear in either `DEFAULT_CONF_DIRS` or `EXTRA_CONF_DIRS` |
| 30 | + - components that appear in `COMPONENT_DEPENDENCIES` variable are immediately loaded unless they have already been |
| 31 | + loaded |
| 32 | + |
| 33 | + For example, with the following files in place: |
| 34 | + |
| 35 | + ```shell |
| 36 | + # env.local |
| 37 | + DEFAULT_CONF_DIRS=" |
| 38 | + ./config/twitcher |
| 39 | + ./config/project-api |
| 40 | + ./config/magpie |
| 41 | + " |
| 42 | + EXTRA_CONF_DIRS=" |
| 43 | + ./optional-components/generic_bird |
| 44 | + ./components/cowbird |
| 45 | + " |
| 46 | + |
| 47 | + # config/twitcher/default.env |
| 48 | + COMPONENT_DEPENDENCIES=" |
| 49 | + ./config/magpie |
| 50 | + " |
| 51 | + # optional-components/generic_bird/default.env |
| 52 | + COMPONENT_DEPENDENCIES=" |
| 53 | + ./config/wps_outputs-volume |
| 54 | + " |
| 55 | + ``` |
| 56 | + |
| 57 | + the load order is: |
| 58 | + |
| 59 | + - ./config/twitcher |
| 60 | + - ./config/magpie (loaded as a dependency of twitcher, not loaded a second time after project-api) |
| 61 | + - ./config/project-api |
| 62 | + - ./optional-components/generic_bird |
| 63 | + - ./config/wps_outputs-volume (loaded as a dependency of generic_bird) |
| 64 | + - ./components/cowbird |
18 | 65 |
|
19 | 66 | [1.24.0](https://github.com/bird-house/birdhouse-deploy/tree/1.24.0) (2023-03-22) |
20 | 67 | ------------------------------------------------------------------------------------------------------------------ |
|
0 commit comments