Cumulative MR #1 Overall Feature Aggregation for Transformer and Provider Configuration and Command Management
Type of change
-
Feature
Linked Issues:
- Closes #465 (closed), #519, #520, #521, #535 (closed), #536 (closed), #537 (closed), #538 (closed), #539 (closed), #540 (closed), #547 (closed), #548 (closed), #549 (closed), #550 (closed)
- Replaces MRs !269 (closed), !273 (closed), !274 (closed), !275 (closed), !276 (closed), !279 (closed)
Does this introduce a change in the core logic?
- YES
Does this introduce a change in the cloud provider implementation, if so which cloud?
-
AWS -
Azure -
GCP -
IBM
Does this introduce a breaking change?
- NO
What is the current behavior?
- Transformer app lacks live configuration updates, and configuration is only possible via deployment-time properties files.
- There is no API for managing TransformerLoadStatusCache.
- Validation of
Kind
properties lacks depth. - No API exists for consuming logs with flexible date ranges and pagination.
- Cache management, cron expression validation, and the description field in
Kind
are missing. - There is no capability to reset configurations to their initial state or apply new configurations dynamically.
What is the new/expected behavior?
This merge request aggregates several significant features into one comprehensive update across both Transformer and Provider services:
#465 (closed), #519)
1. Live Configuration Updates for Transformer (- Configuration externalized: Transformer now supports live configuration updates without downtime.
-
Ambassador API: CRUD operations for
KindCacheConfiguration
and real-time configuration updates for caches. - Scalability: Support for multiple replicas with task load-balancing and zero-outage scaling.
- Persistence: Optional persistent mode, even for local profiles, to test post-restart recovery.
#520)
2. TransformerLoadStatusCache API (- Introduced the
TransformerLoadStatusController
to manage TransformerLoadStatusCache with GET, PUT, and PATCH operations. - Refactored TransformerLoadStatusCache into an interface and service layer to manage data access more effectively.
#521)
3. Enhanced Kind Validation and Testing (- Externalized validation logic for
Kind
structure and entity type identifiers intoKindUtil
andTransformerConfigurationCacheService
. - Added robust exception handling and comprehensive unit tests for
ValidKindConstraintValidator
.
#535 (closed))
4. Log Consumption API with Pagination (- Introduced
/gcz/transformer/admin/logs
API for retrieving logs with support for:- Date range filtering using flexible date formats (ISO and simple).
- Pagination and keyword-based filtering.
- Validation of log stream identifiers via
LogStream
enum.
- Swagger and OpenAPI documentation enhanced with usage examples.
Kind
Description (#536 (closed), #537 (closed), #538 (closed), #540 (closed))
5. Cache Update API, Cron Expression Validator, and - Cache Update API: Supports updating a single cache or a list of caches via new API endpoints.
-
Cron Expression Validation: Added
CronValidator
compatible with Spring’sCronTrigger
and validated via unit tests. -
Description Field: Introduced a
description
field in theKind
class for better contextual information. - Config File Download: Support for downloading Transformer (YAML) and Provider (JSON) configuration files.
#539 (closed))
6. Reset Configuration for Transformer and Provider (-
Transformer:
/admin/transformerConfig/reset
API added for resetting configurations, either to the initial state or applying a new custom configuration (JSON, YAML, or properties). -
Provider:
/admin/providerConfig/reset
API allows resetting provider configurations similarly, ensuring transactional consistency withLayerDefinition
entities.
#547 (closed))
7. Provider Command Cache Management (- Implemented
ProviderCommandCacheService
to manage provider commands, with an auto-incremented ID system and command persistence. - Refactored the polling mechanism to process only the latest unread command per type, with
lastProcessedId.txt
persisted for continuity after restarts. - Koop.js Lifecycle: Refactored Koop.js server lifecycle to manage start, stop, and reload processes upon command detection.
#548 (closed), #549 (closed))
8. Support for "Disabled" Property in Transformer and Provider (- Added
disabled
property toKindCacheConfig
for Transformer andLayerDefinition
for Provider. - This property allows disabling specific caches and layers, respectively, making the configuration more flexible.
- These properties are configurable through the respective APIs and are supported by validation and persistence mechanisms in both services.
Testing and Validation
-
Configuration Updates:
- Test live configuration updates by using the Ambassador API for KindCache CRUD operations.
- Test scaling with multiple replicas, ensuring no conflicts or duplicated task executions.
-
Log Consumption API:
- Test log retrieval with date range filters, pagination, and keyword-based searches.
- Validate correct log stream handling using the
LogStream
enum.
-
Cache Updates:
- Test the new cache update API for both single and group updates, verifying success and failure responses.
-
Reset Configuration:
- Test resetting both Transformer and Provider configurations to their initial state or applying new configurations using the API.
-
Provider Command Cache:
- Test the polling mechanism and verify proper command processing and logging in both Provider and Transformer services.
-
"Disabled" Property:
- Test disabling specific
KindCacheConfig
in Transformer andLayerDefinition
in Provider using the API. - Ensure that the disabled caches and layers do not process updates and are skipped during operations.
- Test disabling specific
Swagger Documentation and API Endpoints
- All new API endpoints are documented and include examples for log consumption, cache management, and configuration reset operations.
- Swagger doc examples are provided for each API method in
/gcz/transformer/admin/swagger-ui
.
Have you added/updated Unit Tests and Integration Tests?
- YES: Unit tests have been added and updated across multiple services, including cache management, configuration resets, command handling, and log consumption.
Edited by Rostislav Dublin (EPAM)