Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare Config files should override the order of configs using the order of config files readings #930

Open
brianbolt opened this issue Apr 19, 2022 · 0 comments
Assignees

Comments

@brianbolt
Copy link
Contributor

Expected Behavior

ACAS should be able to run PrepareConfigFiles successfully when custom deployments add new configurations that is not in base ACAS which override configurations in base ACAS through interpolation.

deployName=blahblah
client.cmpdreg.clientUILabels.applicationNameForTitleBar=${deployName}
client.moduleMenus.homePageMessage=Welcome to ${deployName} ACAS

Current Behavior

PrepareConfigFiles erros with:

acas_1       | Problem parsing /home/runner/build/conf/zzz-config.properties: Error: The property "deployName" does not exist

Steps to Reproduce

  1. Create a zzz config
  2. Add variables like in the description
  3. ACAS runs prepare config files and errors like above

Workaround

Hardcode the string in your variables

Possible Solution

The reason this happens is because ACAS uses _.extend allConf, newConf when combining configs. Because of this, existing configs like client.cmpdreg.clientUILabels.applicationNameForTitleBar are left at the top of the object and new configs like deployName are added to the end. When ACAS parses the configs and tries to interpolate the ${deployName} variable, it is not yet defined. The solution will be to mix in these variables but move existing configs to the bottom of the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant