#536 #537 #538 #540 Add Download Support for Config Endpoints, Cron Expression Validator, Cache Update API, and Description Field in Kind
Type of change
-
Bug Fix -
Feature
Please provide link to gitlab issue or ADR(Architecture Decision Record)
Linked Issues: Task #538, Task #540, Task #536, Task #537
Does this introduce a change in the core logic?
- [YES]
The core logic for handling file downloads, cron expression validation, cache description, and update requests has been modified.
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]
The changes are backward-compatible and do not introduce breaking changes.
What is the current behavior?
- The
generateAppYaml
andgenerateKoopConfig
methods store config files on the backend filesystem and return a status message. - The
cronExpr
field inKind
is not validated. - There is no API support for updating caches, either singly or as a group.
- The
Kind
class does not have adescription
field.
What is the new/expected behavior?
-
Transformer and Provider Config Files (Task #538 (closed)):
-
Transformer GCZ: Support for downloading the YAML file via the
download=true
query parameter has been added. -
Provider GCZ: Support for downloading the JSON file via the
download=true
query parameter has been added. - A new
POST
method has been introduced for thegenerateKoopConfig
endpoint to handle request bodies, fixing the spec discrepancy in theGET
method as per RFC 7231, section 4.3.1.
-
Transformer GCZ: Support for downloading the YAML file via the
-
Cron Expression Validator (Task #536 (closed)):
- The
cronExpr
field is validated using a customCronValidator
compatible with Spring'sConcurrentTaskScheduler
andCronTrigger
. - The implementation includes unit tests for valid, invalid, and complex CRON expressions.
- The
-
Single/Group Cache Update API (Task #537 (closed)):
- API endpoints for updating a single cache (
updateCacheForSingle
) or a group of caches (updateCacheForList
) have been implemented. - Detailed success and failure responses are provided for both single and group updates, with asynchronous queueing of updates.
- API endpoints for updating a single cache (
-
Kind Description Field (Task #540 (closed)):
- The
description
field has been added to theKind
class and is available in the API and services.
- The
Have you added/updated Unit Tests and Integration Tests?
No, unit tests have not been added yet. However, mock-based unit tests can be written to verify:
- File downloads and status message responses.
- Cron expression validation.
- Cache update behavior for single and group operations.
Any other useful information
- Swagger documentation has been updated to reflect the new endpoints and validations.
- Test steps include:
- Test downloading Transformer and Provider config files with both
download=true
anddownload=false
. - Ensure cron expression validation in API inputs.
- Test single and group cache update API functionality, with success and failure cases.
- Ensure the
description
field inKind
is correctly exposed and handled.
- Test downloading Transformer and Provider config files with both
Closes #538 (closed), #540 (closed), #536 (closed), #537 (closed)