Reputation: 71
Some time ago we modularized our monolith into many small components. Each of them is stored in dedicated git repository and is versioned/released independently by different teams
We run into the problem that we have defined in many places public static final constants which are used by other modules. It means when you build dependent module it will compile constant value into its byte code
Our module software packages are delivered to customer which has running Production (last stable milestone) and Quality (newly implemented features which needs to be tested before they go on production) environments
To simplify and illustrate the problem let's say we have below modules delivered and running on Production environment
| Module | version |
| A | 1.1.0 |
| B | 1.2.0 |
| Common | 1.0.0 |
We have defined a public staic final constants in Common module and both A and B are using them
In current sprint we modified module A and Common (we are updating one of the constants in it). Module A and common were recompiled and released, so customer would receive package installer:
| Module | version |
| A | 1.2.0 |
| B | 1.2.0 |
| Common | 1.1.0 |
This will lead to problem that module B has compiled in bytecode old value of the constant which was updated in last sprint
If we decide to recompile as well module B:
how to detect all modules which are using public constants from Common module (we have hundreds of them developed by many different teams)
should we increase than the version of module B if there was no java code change done on it?
if we decide to rebuild B and keep same version than we have a problem when we would need to deliver a bug fix for Production release which would require only a change in A - module B will be delivered compiled constant value from last sprint which should not be included as we are delivering older version of Common
Am I tackling this problem from wrong side as non of the solutions seems 100% solve the problem or would require lot of effort to achieve it?
Thanks in advance for any suggestions
Upvotes: 2
Views: 75