Open jfmcquade opened 1 year ago
One of the issues noticed, is that because the isConfigUpToDate()
check that happens in packages\scripts\src\commands\deployment\utils.ts
uses file timestamps to verify if up-to-date (comparing config.ts
with compiled config.json
), any updates to files referenced from within the config.ts
won't be taken into account.
E.g. if a deployment imports data from a child skins folder or loads encryptedConfig, then changes within those imported files won't prompt recompile.
As a short term/initial solution it might be worth just changing the default behaviour so that when if you run yarn workflow deployment set [deployment_name]
whilst the active deployment is already [deployment_name]
then it forces recompilation. Alternatively a flag could be added like --force
, to force recompilation.
Describe the bug
Making changes to a deployment config should cause the config to recompile when setting the active deployment. Whilst this works as expected when editing the deployment's
config.ts
file directly, sometimes changes made to other files have effects on the config and should also therefore trigger a recompile. There are two main cases where changes made to other files do not trigger the deployment config to recompile as it should, which can cause knock-on issues:The following bugs are addressed by #1885, whereby a dev can manually bump the
DEPLOYMENT_CONFIG_VERSION
number (this feature was already available but less prominent)packages/data-models/deployment.model.ts
, which should affect all deployment configspackages/data-models/appConfig.ts
, which should affect all deployment configs, as aboveTo Reproduce
1.
plh
andplh_global
.yarn workflow deployment set plh_global
to ensure the child's config is compiled.idems_app/deployments/plh/config.ts
, changeconfig.app_config.APP_LANGUAGES.default = "gb_en"
toconfig.app_config.APP_LANGUAGES.default = "test"
yarn workflow deployment set plh_global
. This will trigger theplh
config to recompile, but these changes will not be reflected in the compiled child's config. You can see this by inspecting.idems_app/deployments/plh_global/config.json
This bug is now resolved by #1885:
Workaround
There is a general workaround for this issue, which involves manually forcing the deployment config to recompile. One way to do this is to delete the relevant config.json file, e.g.
.idems_app/deployments/plh_global/config.json
, and then runyarn workflow deployment set
.