Skip to content

Read Tyler versions from config files#376

Open
rajeswari1301 wants to merge 4 commits into
mainfrom
tyler_version
Open

Read Tyler versions from config files#376
rajeswari1301 wants to merge 4 commits into
mainfrom
tyler_version

Conversation

@rajeswari1301
Copy link
Copy Markdown
Contributor

Instead of hardcoding Tyler API versions(#218) in TylerClients.java, versions are now read from the existing application.stage.properties and application.prod.properties files in the config/ directory

  • Added Tyler version keys to config/application.stage.properties and config/application.prod.properties
  • Updated TylerClients.getVersion() to load versions from the config file instead of hardcoded version maps
  • Added scripts/tyler_versions.sh to print configured versions and added test resources

To check configured versions locally use, bash scripts/tyler_versions.sh stage/ bash scripts/tyler_versions.sh prod

Comment thread scripts/tyler_versions.sh Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this script used anywhere? TBH I don't see much use for it over keeping the config files organized.

};

if (!versionMap.containsKey(domain.jurisdiction())) {
String propertiesFile = "application." + domain.env().getName() + ".properties";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code looks good! But I think that it should happen at start time instead of call time; we can load the properties file at start time and put it into the STAGE_VERSION_MAP and PROD_VERSION_MAP that was there before, and specifically can check that the config file is formatted / written correctly right as the server starts (and ideally erroring out immediately), rather than waiting for a specific call to those services, where an error like this could hide for longer.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, I’ll load the config at startup and build the version maps from it so any config issues show up immediately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants