This commit is contained in:
Mohit Yadav 2025-04-29 11:31:31 +05:30 committed by GitHub
parent dabb0b725b
commit 40a23f1b95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 29 additions and 19 deletions

View File

@ -216,7 +216,7 @@ public class DataInsightsApp extends AbstractNativeApplication {
super.init(app); super.init(app);
DataInsightsAppConfig config = DataInsightsAppConfig config =
JsonUtils.convertValue(app.getAppConfiguration(), DataInsightsAppConfig.class); JsonUtils.convertValue(app.getAppConfiguration(), DataInsightsAppConfig.class);
JsonUtils.validateJsonSchema(config, DataInsightsAppConfig.class);
// Get the configuration for the different modules // Get the configuration for the different modules
costAnalysisConfig = config.getModuleConfiguration().getCostAnalysis(); costAnalysisConfig = config.getModuleConfiguration().getCostAnalysis();
dataAssetsConfig = parseDataAssetsConfig(config.getModuleConfiguration().getDataAssets()); dataAssetsConfig = parseDataAssetsConfig(config.getModuleConfiguration().getDataAssets());

View File

@ -100,6 +100,7 @@ public class SearchIndexApp extends AbstractNativeApplication {
EventPublisherJob request = EventPublisherJob request =
JsonUtils.convertValue(app.getAppConfiguration(), EventPublisherJob.class) JsonUtils.convertValue(app.getAppConfiguration(), EventPublisherJob.class)
.withStats(new Stats()); .withStats(new Stats());
JsonUtils.validateJsonSchema(request, EventPublisherJob.class);
if (request.getEntities().size() == 1 && request.getEntities().contains(ALL)) { if (request.getEntities().size() == 1 && request.getEntities().contains(ALL)) {
SearchRepository searchRepo = Entity.getSearchRepo(); SearchRepository searchRepo = Entity.getSearchRepo();

View File

@ -56,7 +56,8 @@
"title": "Data Retention (Days)", "title": "Data Retention (Days)",
"description": "Defines the number of days the Data Assets Insights information will be kept. After it they will be deleted.", "description": "Defines the number of days the Data Assets Insights information will be kept. After it they will be deleted.",
"type": "integer", "type": "integer",
"default": 7 "default": 7,
"minimum": 0
}, },
"serviceFilter": { "serviceFilter": {
"type": "object", "type": "object",
@ -154,7 +155,8 @@
"batchSize": { "batchSize": {
"description": "Maximum number of events processed at a time (Default 100).", "description": "Maximum number of events processed at a time (Default 100).",
"type": "integer", "type": "integer",
"default": 100 "default": 100,
"minimum": 0
}, },
"recreateDataAssetsIndex": { "recreateDataAssetsIndex": {
"title": "Recreate DataInsights DataAssets Index", "title": "Recreate DataInsights DataAssets Index",

View File

@ -113,55 +113,64 @@
"batchSize": { "batchSize": {
"description": "Maximum number of events sent in a batch (Default 10).", "description": "Maximum number of events sent in a batch (Default 10).",
"type": "integer", "type": "integer",
"default": 100 "default": 100,
"minimum": 1
}, },
"payLoadSize": { "payLoadSize": {
"description": "Payload size in bytes depending on config.", "description": "Payload size in bytes depending on config.",
"type": "integer", "type": "integer",
"existingJavaType": "java.lang.Long", "existingJavaType": "java.lang.Long",
"default": 104857600 "default": 104857600,
"minimum": 1
}, },
"producerThreads": { "producerThreads": {
"title": "Number of Producer Threads to use", "title": "Number of Producer Threads to use",
"description": "Number of producer threads to use for reindexing", "description": "Number of producer threads to use for reindexing",
"type": "integer", "type": "integer",
"default": 1 "default": 1,
"minimum": 1
}, },
"consumerThreads": { "consumerThreads": {
"title": "Number of Consumer Threads to use", "title": "Number of Consumer Threads to use",
"description": "Number of consumer threads to use for reindexing", "description": "Number of consumer threads to use for reindexing",
"type": "integer", "type": "integer",
"default": 1 "default": 1,
"minimum": 1
}, },
"queueSize": { "queueSize": {
"title": "Queue Size to use.", "title": "Queue Size to use.",
"description": "Queue Size to use internally for reindexing.", "description": "Queue Size to use internally for reindexing.",
"type": "integer", "type": "integer",
"default": 100 "default": 100,
"minimum": 1
}, },
"maxConcurrentRequests": { "maxConcurrentRequests": {
"title": "Max Concurrent Requests", "title": "Max Concurrent Requests",
"description": "Maximum number of concurrent requests to the search index", "description": "Maximum number of concurrent requests to the search index",
"type": "integer", "type": "integer",
"default": 100 "default": 100,
"minimum": 1
}, },
"maxRetries": { "maxRetries": {
"title": "Max Retries", "title": "Max Retries",
"description": "Maximum number of retries for a failed request", "description": "Maximum number of retries for a failed request",
"type": "integer", "type": "integer",
"default": 5 "default": 5,
"minimum": 0
}, },
"initialBackoff": { "initialBackoff": {
"title": "Initial Backoff Millis", "title": "Initial Backoff Millis",
"description": "Initial backoff time in milliseconds", "description": "Initial backoff time in milliseconds",
"type": "integer", "type": "integer",
"default": 1000 "default": 1000,
"minimum": 0
}, },
"maxBackoff": { "maxBackoff": {
"title": "Max Backoff Millis", "title": "Max Backoff Millis",
"description": "Maximum backoff time in milliseconds", "description": "Maximum backoff time in milliseconds",
"type": "integer", "type": "integer",
"default": 10000 "default": 10000,
"minimum": 0
}, },
"searchIndexMappingLanguage": { "searchIndexMappingLanguage": {
"description": "Recreate Indexes with updated Language", "description": "Recreate Indexes with updated Language",
@ -172,9 +181,5 @@
"type": "string" "type": "string"
} }
}, },
"required": [
"timestamp",
"status"
],
"additionalProperties": false "additionalProperties": false
} }

View File

@ -78,14 +78,15 @@ export interface EventPublisherJob {
/** /**
* This schema publisher run job status. * This schema publisher run job status.
*/ */
status: Status; status?: Status;
timestamp: number; timestamp?: number;
} }
/** /**
* Failure for the job * Failure for the job
* *
* This schema defines Event Publisher Job Error Schema. * This schema defines Event Publisher Job Error Schema. Additional properties exist for
* backward compatibility. Don't use it.
*/ */
export interface IndexingAppError { export interface IndexingAppError {
errorSource?: ErrorSource; errorSource?: ErrorSource;
@ -97,6 +98,7 @@ export interface IndexingAppError {
stackTrace?: string; stackTrace?: string;
submittedCount?: number; submittedCount?: number;
successCount?: number; successCount?: number;
[property: string]: any;
} }
export enum ErrorSource { export enum ErrorSource {