You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
config: allow to call config:get() from app script
It is convenient to access configuration using `config:get()` from the
application script (`app.file` or `app.module`).
However, before this commit, it was not possible, because the
configuration was not considered as applied before the application
script is loaded.
Now, the script loading is moved into the post-apply phase.
The resulting sequence of steps on startup/reload is the following.
* collect configuration information (from all the sources)
* <if the previous step is failed, set `check_errors` status and break>
* apply the configuration (call all the appliers)
* <if the previous step is failed, set `check_errors` status and break>
* <set the new successful status: `ready` or `check_warnings`>
* call post-apply hooks (including application script loading)
* <if the previous step is failed, set `check_errors` status and break>
* <set the new successful status: `ready` or `check_warnings`>
I would like to briefly comment the changes in the tests.
* `app_test.lua`: added the check for the new behavior (call
config:get() from the app script)
* `appliers_test.lua`: fixed the applier call (`.apply` ->
`.post_apply`)
* `config_test.lua`: fixed status observed in the app script
(`*_in_progress` -> `ready`)
Part of tarantool#8862
NO_DOC=reflected in tarantool/doc#3544
0 commit comments