Total cost of ownership (TCO) analysis
All functional changes must be analyzed for the impact on merchant total cost of ownership (TCO) and the results of the analysis should be added to the pull request or issue description to meet the "Definition of Done" (DoD).
The goal of TCO analysis is to identify:
-
If the changes have impact on TCO
-
The value of the impact, that consists of:
- The level of the change (patch/minor/major)
- Potential number of affected extensions/customizations (several/many/most/all)
Changes that have impact TCO
Changes can impact total cost of ownership if the extensions or customizations, established processes or integrations within the projects build on Adobe Commerce framework may need to be adjusted to accommodate the changes.
Some changes that have impact on TCO:
-
Result in SVC build failure on pull request
-
JavaScript changes (not covered by SVC build)
- Introduced or removed javascript events, classes, methods, properties or parameters
- Changed javascript event ordering
-
URL/Request changes
- Removed URL paths
- Removed or introduced required or optional request parameters
-
CLI commands changes
- Introduced or removed/renamed console commands, arguments or return codes
-
Events changes
- Removed or added events and their arguments
-
Removing, changing or adding default parameter values for methods
-
Removing or adding traits
-
Changing arguments or return value format of methods
-
Changing topics or consumers in message queue
-
Any layout or block changes
-
Removing or renaming of any files
Level of change
If the changes may have a TCO impact, the level of the change should be identified. If the backward incompatible change results an a SVC build failure - the level of change can be viewed in the SVC build result. This table lists the levels for the changes that are not currently covered by SVC:
Potential number of affected customizations
In order to identify the scope of the impact, usage of the changed code should be detected in the available code/extensions/customizations.
The analysis result should indicate the proportion of reviewed modules to the modules referencing (using) the changed code.
TCO analysis result example
The analysis should indicate all the changes that have TCO impact or state that there is "No TCO impact".
For example, if the non-api "SomeClass::someMethod" was changed and the new required argument was added to the CLI command, the analysis result may look like:
Changes have TCO impact.
Change to SomeClass::someMethod is PATCH level but impacts 5 out of 10 reviewed custom modules.
Change to CLI command is MAJOR level, it impacts 2 out of 10 reviewed custom modules.
A custom module is a module that is not part of the Adobe Commerce product. A change impacts a custom module if its code needs to be changed in response.