Repository navigation
feat: reload the app config after pre hooks with AIO_RELOAD_CONFIG_ON_PRE_HOOKS - #948
Open
iivvaannxx wants to merge 3 commits into
Open
iivvaannxx wants to merge 3 commits into
iivvaannxx wants to merge 3 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
… for AIO_RELOAD_CONFIG_ON_PRE_HOOKS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
AIO_RELOAD_CONFIG_ON_PRE_HOOKS, off by default. When it is on for a pre hook, the command reloadsapp.config.yamland its$includefiles after that hook, so changes the hook made to the config take effect in the same run. It takes the list syntax from the base PR.pre-app-buildaio app build,aio app deploypre-app-deployaio app deploypre-app-runaio app runOther hook names in the list are ignored, and
pre-app-undeployis not supported. A reload only happens if the extension defines that hook.reloadExtConfigsand the added/removed logging live inBaseCommand, so build, deploy and run share them. If a reload fails, for example on invalid yaml, the command fails withFailed to reload the app config after the <hook> hook.Evidence
app.config.yamlonly takes effect on the next run.After: tests cover a reload that adds an extension and one that removes the current one (build and deploy), the
pre-app-deployrefresh, thepre-app-runrefresh,-eafter a removal, invalid yaml, the variable off, and thefreshoption.npm testand eslint pass.Merge Danger
Door: two-way
Blast Radius: build and deploy loops
Behavior is unchanged with the variable off.
buildOneExtis called with the same arguments as before. Known edges: a failed reload mid-deploy can happen after earlier extensions were already deployed,aio app rundoes not re-validate "nothing to run" after a reload, and the standalone-app check in deploy is computed once at the start. This branch includes the commit from the base PR, which drops out of the diff once that PR merges.