Ensure Config Reload Before Deploy#906
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| const { sendAppAssetsDeployedAuditLog, sendAppDeployAuditLog } = require('../../lib/audit-logger') | ||
| const { setRuntimeApiHostAndAuthHandler, getAccessToken } = require('../../lib/auth-helper') | ||
| const logActions = require('../../lib/log-actions') | ||
| const aioConfigLoader = require('@adobe/aio-lib-core-config') |
|
There is a potential side-effect here. There are numerous places where the in-mem config is modified, it is an object reference that gets passed around and multiple modules write to it or modify it. Forcing a reload in its entirety could lead to broken workflows not neccessarily exposed by our tests. |
what if we re-read the .env file and merge the new values into process.env, rather than reloading the entire config store. Something like:
|
Description
Ensure config is reloaded just before deploying runtime actions. This ensures any change to
.envfiles during build orpre-deployhooks are picked by the code that resolvesyamlinputs into actual variables (when readingprocess.env)Context: https://magento.slack.com/archives/C013UDBFBGB/p1775048141970419?thread_ts=1774551027.799259&cid=C013UDBFBGB