diff --git a/oas_docs/output/kibana.yaml b/oas_docs/output/kibana.yaml index d8ef873b11456..96d0172823dc1 100644 --- a/oas_docs/output/kibana.yaml +++ b/oas_docs/output/kibana.yaml @@ -45501,6 +45501,7 @@ components: - green - yellow - red + - unavailable - unknown type: string id: diff --git a/package.json b/package.json index 74fd9fd6467ec..9a90f81f7e1c1 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "@elastic/datemath": "5.0.3", "@elastic/ebt": "^1.3.1", "@elastic/ecs": "^8.11.5", - "@elastic/elasticsearch": "^8.18.2", + "@elastic/elasticsearch": "^8.19.0", "@elastic/ems-client": "8.6.3", "@elastic/eui": "104.0.0-amsterdam.0", "@elastic/eui-amsterdam": "npm:@elastic/eui@104.0.0-amsterdam.0", diff --git a/src/core/packages/saved-objects/api-server-internal/src/lib/apis/utils/internal_utils.ts b/src/core/packages/saved-objects/api-server-internal/src/lib/apis/utils/internal_utils.ts index 411d452b1a82f..510fd139ae71a 100644 --- a/src/core/packages/saved-objects/api-server-internal/src/lib/apis/utils/internal_utils.ts +++ b/src/core/packages/saved-objects/api-server-internal/src/lib/apis/utils/internal_utils.ts @@ -38,7 +38,7 @@ export function getBulkOperationError( id: string, rawResponse: { status: number; - error?: { type: string; reason?: string; index: string }; + error?: { type: string; reason?: string | null; index: string }; // Other fields are present on a bulk operation result but they are irrelevant for this function } ): Payload | undefined { diff --git a/src/core/packages/saved-objects/migration-server-internal/src/actions/es_errors.ts b/src/core/packages/saved-objects/migration-server-internal/src/actions/es_errors.ts index 0ea6ccc227cba..d2c47e40a0fb1 100644 --- a/src/core/packages/saved-objects/migration-server-internal/src/actions/es_errors.ts +++ b/src/core/packages/saved-objects/migration-server-internal/src/actions/es_errors.ts @@ -41,7 +41,10 @@ export const isClusterShardLimitExceeded = (errorCause?: ErrorCause): boolean => ); }; -export const hasAllKeywordsInOrder = (message: string | undefined, keywords: string[]): boolean => { +export const hasAllKeywordsInOrder = ( + message: string | null | undefined, + keywords: string[] +): boolean => { if (!message || !keywords.length) { return false; } diff --git a/src/core/packages/saved-objects/migration-server-internal/src/actions/wait_for_task.ts b/src/core/packages/saved-objects/migration-server-internal/src/actions/wait_for_task.ts index 2660d94431f5d..588ec10c6a0ce 100644 --- a/src/core/packages/saved-objects/migration-server-internal/src/actions/wait_for_task.ts +++ b/src/core/packages/saved-objects/migration-server-internal/src/actions/wait_for_task.ts @@ -20,7 +20,7 @@ import { /** @internal */ export interface WaitForTaskResponse { - error: Option.Option<{ type: string; reason?: string; index?: string }>; + error: Option.Option<{ type: string; reason?: string | null; index?: string }>; completed: boolean; failures: Option.Option; description?: string; diff --git a/src/core/packages/security/server/src/authentication/api_keys/api_keys.ts b/src/core/packages/security/server/src/authentication/api_keys/api_keys.ts index 56974f5dcf409..07d8c20fd74ed 100644 --- a/src/core/packages/security/server/src/authentication/api_keys/api_keys.ts +++ b/src/core/packages/security/server/src/authentication/api_keys/api_keys.ts @@ -203,10 +203,10 @@ export interface InvalidateAPIKeyResult { */ error_details?: Array<{ type?: string; - reason?: string; + reason?: string | null; caused_by?: { type?: string; - reason?: string; + reason?: string | null; }; }>; } diff --git a/x-pack/platform/packages/shared/ml/error_utils/src/process_errors.ts b/x-pack/platform/packages/shared/ml/error_utils/src/process_errors.ts index 49d4e81f51a11..a1a4b1006147c 100644 --- a/x-pack/platform/packages/shared/ml/error_utils/src/process_errors.ts +++ b/x-pack/platform/packages/shared/ml/error_utils/src/process_errors.ts @@ -75,7 +75,8 @@ export const extractErrorProperties = (error: ErrorType): MLErrorObject => { ) { errObj.causedBy = error.body.attributes.body.error.caused_by?.caused_by?.reason || - error.body.attributes.body.error.caused_by?.reason; + error.body.attributes.body.error.caused_by?.reason || + undefined; // Remove 'null' option from the types } if ( Array.isArray(error.body.attributes.body.error.root_cause) && diff --git a/x-pack/platform/plugins/private/index_lifecycle_management/__jest__/extend_index_management.test.tsx b/x-pack/platform/plugins/private/index_lifecycle_management/__jest__/extend_index_management.test.tsx index df5f7c381787a..fb904c0985707 100644 --- a/x-pack/platform/plugins/private/index_lifecycle_management/__jest__/extend_index_management.test.tsx +++ b/x-pack/platform/plugins/private/index_lifecycle_management/__jest__/extend_index_management.test.tsx @@ -79,6 +79,7 @@ const indexWithLifecyclePolicy: Index = { action_time_millis: 1544187775867, step: 'complete', step_time_millis: 1544187775867, + skip: false, }, }; @@ -112,6 +113,7 @@ const indexWithLifecycleError: Index = { type: 'illegal_argument_exception', reason: 'setting [index.lifecycle.rollover_alias] for index [testy3] is empty or not defined', }, + skip: false, }, }; const indexWithLifecyclePhaseDefinition: Index = { @@ -145,6 +147,7 @@ const indexWithLifecyclePhaseDefinition: Index = { version: 1, modified_date_in_millis: 1544031699844, }, + skip: false, }, }; const indexWithLifecycleWaitingStep: Index = { @@ -178,6 +181,7 @@ const indexWithLifecycleWaitingStep: Index = { all_shards_active: false, number_of_replicas: 2, }, + skip: false, }, }; const indexWithNonExistentPolicyError: Index = { @@ -205,6 +209,7 @@ const indexWithNonExistentPolicyError: Index = { type: 'illegal_argument_exception', reason: 'policy [testy] does not exist', }, + skip: false, }, }; diff --git a/x-pack/platform/plugins/shared/alerting/server/alert_deletion/lib/delete_alerts_for_query.ts b/x-pack/platform/plugins/shared/alerting/server/alert_deletion/lib/delete_alerts_for_query.ts index 71aa4425d3986..0ca7b000bbe37 100644 --- a/x-pack/platform/plugins/shared/alerting/server/alert_deletion/lib/delete_alerts_for_query.ts +++ b/x-pack/platform/plugins/shared/alerting/server/alert_deletion/lib/delete_alerts_for_query.ts @@ -104,7 +104,7 @@ export const deleteAlertsForQuery = async ( action: AlertAuditAction.DELETE, id: alertUuid, outcome: 'failure', - error: new Error(item.delete?.error?.reason), + error: new Error(item.delete?.error?.reason ?? undefined), // reason can be null and it's not a valid parameter for Error }) ); errors.push(`Error deleting alert "${alertUuid!}" - ${item.delete?.error?.reason}`); diff --git a/x-pack/platform/plugins/shared/fleet/server/services/agents/update_agent_tags_action_runner.ts b/x-pack/platform/plugins/shared/fleet/server/services/agents/update_agent_tags_action_runner.ts index 309aa80f4d8c2..a12e2dcddb05e 100644 --- a/x-pack/platform/plugins/shared/fleet/server/services/agents/update_agent_tags_action_runner.ts +++ b/x-pack/platform/plugins/shared/fleet/server/services/agents/update_agent_tags_action_runner.ts @@ -196,7 +196,7 @@ export async function updateTagsBatch( agentId: failure.id, actionId, namespace: spaceId, - error: failure.cause.reason, + error: failure.cause.reason ?? undefined, // reason can be null and we want to replace it with undefined })) ); appContextService.getLogger().debug(`action failed result wrote on ${failureCount} agents`); diff --git a/x-pack/platform/plugins/shared/fleet/server/services/artifacts/artifacts.ts b/x-pack/platform/plugins/shared/fleet/server/services/artifacts/artifacts.ts index c6173f1eb8e89..fe80613ac1065 100644 --- a/x-pack/platform/plugins/shared/fleet/server/services/artifacts/artifacts.ts +++ b/x-pack/platform/plugins/shared/fleet/server/services/artifacts/artifacts.ts @@ -227,7 +227,7 @@ export const bulkDeleteArtifacts = async ( if (res.errors) { errors = res.items.reduce((acc, item) => { if (item.delete?.error) { - acc.push(new Error(item.delete.error.reason)); + acc.push(new Error(item.delete.error.reason ?? undefined)); // reason can be null and it's not a valid parameter for Error } return acc; }, []); diff --git a/x-pack/platform/plugins/shared/ml/public/application/model_management/test_models/models/inference_base.ts b/x-pack/platform/plugins/shared/ml/public/application/model_management/test_models/models/inference_base.ts index 82fbab3042a94..8426cdae9c37f 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/model_management/test_models/models/inference_base.ts +++ b/x-pack/platform/plugins/shared/ml/public/application/model_management/test_models/models/inference_base.ts @@ -389,12 +389,12 @@ export abstract class InferenceBase { }; } - protected getDocFromResponse({ doc, error }: estypes.IngestPipelineSimulation) { + protected getDocFromResponse({ doc, error }: estypes.IngestSimulateDocumentResult) { if (doc === undefined) { if (error) { // @ts-expect-error Error is now typed in estypes. However, I doubt that it doesn't get the expected HTTP wrapper. this.setFinishedWithErrors(error); - throw Error(error.reason); + throw Error(error.reason ?? undefined); // reason can be null and it's not a valid parameter for Error } throw Error( diff --git a/x-pack/platform/plugins/shared/security/server/security_checkup/check_cluster_data.test.ts b/x-pack/platform/plugins/shared/security/server/security_checkup/check_cluster_data.test.ts index f8a8b72901486..3e50367d02f44 100644 --- a/x-pack/platform/plugins/shared/security/server/security_checkup/check_cluster_data.test.ts +++ b/x-pack/platform/plugins/shared/security/server/security_checkup/check_cluster_data.test.ts @@ -113,7 +113,7 @@ function mockIndicesStatsResponseFactory( listOfIndicesWithCount.forEach((indexPair) => { result!.indices![indexPair.name] = { - total: { docs: { count: indexPair.count } }, + total: { docs: { count: indexPair.count, total_size_in_bytes: 0 } }, }; }); diff --git a/x-pack/platform/plugins/shared/streams/server/lib/streams/lifecycle/ilm_phases.test.ts b/x-pack/platform/plugins/shared/streams/server/lib/streams/lifecycle/ilm_phases.test.ts index a6723b81b8799..41bc1127cbf5a 100644 --- a/x-pack/platform/plugins/shared/streams/server/lib/streams/lifecycle/ilm_phases.test.ts +++ b/x-pack/platform/plugins/shared/streams/server/lib/streams/lifecycle/ilm_phases.test.ts @@ -26,36 +26,42 @@ describe('lifecycle helpers', () => { managed: true, phase: 'frozen', policy: 'mypolicy', + skip: true, }, index_name_002: { index: 'index_name_002', managed: true, phase: 'frozen', policy: 'mypolicy', + skip: true, }, index_name_003: { index: 'index_name_003', managed: true, phase: 'cold', policy: 'mypolicy', + skip: true, }, index_name_004: { index: 'index_name_004', managed: true, phase: 'warm', policy: 'mypolicy', + skip: true, }, index_name_005: { index: 'index_name_005', managed: true, phase: 'hot', policy: 'mypolicy', + skip: true, }, index_name_006: { index: 'index_name_006', managed: true, phase: 'hot', policy: 'mypolicy', + skip: true, }, }, indicesStats: { @@ -102,12 +108,14 @@ describe('lifecycle helpers', () => { managed: true, phase: 'hot', policy: 'mypolicy', + skip: true, }, index_name_002: { index: 'index_name_002', managed: true, phase: 'hot', policy: 'mypolicy', + skip: true, }, index_name_003: { index: 'index_name_003', diff --git a/x-pack/platform/plugins/shared/streams/server/routes/internal/streams/processing/simulation_handler.ts b/x-pack/platform/plugins/shared/streams/server/routes/internal/streams/processing/simulation_handler.ts index edf5b10d422d0..89b5fcf7ffb27 100644 --- a/x-pack/platform/plugins/shared/streams/server/routes/internal/streams/processing/simulation_handler.ts +++ b/x-pack/platform/plugins/shared/streams/server/routes/internal/streams/processing/simulation_handler.ts @@ -12,13 +12,13 @@ import { IngestDocument, IngestProcessorContainer, IngestSimulateRequest, - IngestPipelineSimulation, IngestSimulateDocumentResult, SimulateIngestRequest, IndicesIndexState, SimulateIngestResponse, SimulateIngestSimulateIngestDocumentResult, FieldCapsResponse, + type IngestPipelineProcessorResult, } from '@elastic/elasticsearch/lib/api/types'; import { IScopedClusterClient } from '@kbn/core/server'; import { flattenObjectNestedLast, calculateObjectDiff } from '@kbn/object-utils'; @@ -854,14 +854,13 @@ const computeMappingProperties = (detectedFields: NamedFieldDefinitionConfig[]) * Guard helpers */ const isSuccessfulProcessor = ( - processor: IngestPipelineSimulation -): processor is WithRequired => + processor: IngestPipelineProcessorResult +): processor is WithRequired => processor.status === 'success' && !!processor.tag; const isSkippedProcessor = ( - processor: IngestPipelineSimulation -): processor is WithRequired => - // @ts-expect-error Looks like the IngestPipelineSimulation.status is not typed correctly and misses the 'skipped' status + processor: IngestPipelineProcessorResult +): processor is WithRequired => processor.status === 'skipped'; const isMappingFailure = (entry: SimulateIngestSimulateIngestDocumentResult) => diff --git a/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_lifecycle/hooks/use_ingestion_rate.tsx b/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_lifecycle/hooks/use_ingestion_rate.tsx index d188a04845210..9c68b760c0cba 100644 --- a/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_lifecycle/hooks/use_ingestion_rate.tsx +++ b/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_lifecycle/hooks/use_ingestion_rate.tsx @@ -271,7 +271,7 @@ export const useIngestionRatePerTier = ({ const countByTier = indices.buckets.reduce((tiers, index) => { const explain = ilmExplain.indices[index.key]; const tier = - explain.managed && explain.phase in ilmPhases + explain.managed && explain.phase && explain.phase in ilmPhases ? (explain.phase as PhaseNameWithoutDelete) : fallbackTier; tiers[tier] = (tiers[tier] ?? 0) + index.doc_count; diff --git a/x-pack/platform/plugins/shared/task_manager/server/monitoring/workload_statistics.ts b/x-pack/platform/plugins/shared/task_manager/server/monitoring/workload_statistics.ts index f5978bc52a5c7..668349425ebef 100644 --- a/x-pack/platform/plugins/shared/task_manager/server/monitoring/workload_statistics.ts +++ b/x-pack/platform/plugins/shared/task_manager/server/monitoring/workload_statistics.ts @@ -488,7 +488,7 @@ export interface TaskTypeAggregation extends estypes.AggregationsFiltersAggregat } export interface ScheduleAggregation extends estypes.AggregationsFiltersAggregate { - buckets: Array<{ doc_count: number; key: string | number }>; + buckets: Array<{ doc_count: number; key: string }>; doc_count_error_upper_bound?: number | undefined; sum_other_doc_count?: number | undefined; } diff --git a/x-pack/platform/plugins/shared/task_manager/server/task_store.ts b/x-pack/platform/plugins/shared/task_manager/server/task_store.ts index 7f5ad321effc4..746229cb8e55e 100644 --- a/x-pack/platform/plugins/shared/task_manager/server/task_store.ts +++ b/x-pack/platform/plugins/shared/task_manager/server/task_store.ts @@ -636,7 +636,7 @@ export class TaskStore { if (item.update?.error) { const err = new BulkUpdateError({ - message: item.update.error.reason, + message: item.update.error.reason ?? undefined, // reason can be null, and we want to keep `message` as string | undefined type: item.update.error.type, statusCode: item.update.status, }); diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/constants/health_colors.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/constants/health_colors.ts index 66c114f6899e1..4f64b634b9006 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/constants/health_colors.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/constants/health_colors.ts @@ -24,6 +24,8 @@ export const healthColorsMapSelectable = { GREEN: 'success', yellow: 'warning', YELLOW: 'warning', + unknown: '', + unavailable: '', }; export const indexHealthToHealthColor = (health?: HealthStatus | 'unavailable'): IconColor => { diff --git a/x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/text_analysis.ts b/x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/text_analysis.ts index 0885b00dd079e..06ab83e0b2fdd 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/text_analysis.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/text_analysis.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { AnalysisTokenFilter } from '@elastic/elasticsearch/lib/api/types'; +import { AnalysisTokenFilter, AnalysisStopWords } from '@elastic/elasticsearch/lib/api/types'; interface LanguageDataEntry { custom_filter_definitions?: object; name: string; stemmer: string; - stop_words: string; + stop_words: AnalysisStopWords; postpended_filters?: string[]; prepended_filters?: string[]; } diff --git a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/ilm_phase_counts/index.test.tsx b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/ilm_phase_counts/index.test.tsx index 5de02814fd5cd..8112b3f095107 100644 --- a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/ilm_phase_counts/index.test.tsx +++ b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/ilm_phase_counts/index.test.tsx @@ -36,6 +36,7 @@ const hot: IlmExplainLifecycleLifecycleExplainManaged = { version: 1, modified_date_in_millis: 1675536751205, }, + skip: true, }; const warm = { ...hot, diff --git a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/utils/ilm_explain.test.ts b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/utils/ilm_explain.test.ts index ad588af866c88..a6b3cf645d3a1 100644 --- a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/utils/ilm_explain.test.ts +++ b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/utils/ilm_explain.test.ts @@ -34,6 +34,7 @@ const hot: IlmExplainLifecycleLifecycleExplainManaged = { version: 1, modified_date_in_millis: 1675536751205, }, + skip: true, }; const warm = { ...hot, diff --git a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/hooks/use_results_rollup/utils/get_pattern_rollups_with_latest_check_result.test.ts b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/hooks/use_results_rollup/utils/get_pattern_rollups_with_latest_check_result.test.ts index 4ab545db53dda..938c1f00d89c0 100644 --- a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/hooks/use_results_rollup/utils/get_pattern_rollups_with_latest_check_result.test.ts +++ b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/hooks/use_results_rollup/utils/get_pattern_rollups_with_latest_check_result.test.ts @@ -73,6 +73,7 @@ describe('updateResultOnCheckCompleted', () => { phase_time_millis: 1675536751809, action: 'rollover', action_time_millis: 1675536751809, + skip: true, step: 'check-rollover-ready', step_time_millis: 1675536751809, phase_execution: { @@ -93,6 +94,7 @@ describe('updateResultOnCheckCompleted', () => { phase_time_millis: 1675536774416, action: 'rollover', action_time_millis: 1675536774416, + skip: true, step: 'check-rollover-ready', step_time_millis: 1675536774416, phase_execution: { @@ -175,6 +177,7 @@ describe('updateResultOnCheckCompleted', () => { phase_time_millis: 1675536751809, action: 'rollover', action_time_millis: 1675536751809, + skip: true, step: 'check-rollover-ready', step_time_millis: 1675536751809, phase_execution: { @@ -195,6 +198,7 @@ describe('updateResultOnCheckCompleted', () => { phase_time_millis: 1675536774416, action: 'rollover', action_time_millis: 1675536774416, + skip: true, step: 'check-rollover-ready', step_time_millis: 1675536774416, phase_execution: { @@ -272,6 +276,7 @@ describe('updateResultOnCheckCompleted', () => { phase_time_millis: 1675536751809, action: 'rollover', action_time_millis: 1675536751809, + skip: true, step: 'check-rollover-ready', step_time_millis: 1675536751809, phase_execution: { @@ -292,6 +297,7 @@ describe('updateResultOnCheckCompleted', () => { phase_time_millis: 1675536774416, action: 'rollover', action_time_millis: 1675536774416, + skip: true, step: 'check-rollover-ready', step_time_millis: 1675536774416, phase_execution: { diff --git a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/mock/ilm_explain/mock_ilm_explain.ts b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/mock/ilm_explain/mock_ilm_explain.ts index b5b35064a7320..bfce9b441e5fe 100644 --- a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/mock/ilm_explain/mock_ilm_explain.ts +++ b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/mock/ilm_explain/mock_ilm_explain.ts @@ -27,6 +27,7 @@ export const mockIlmExplain: Record version: 1, modified_date_in_millis: 1675536751205, }, + skip: true, }, '.ds-packetbeat-8.5.3-2023.02.04-000001': { index: '.ds-packetbeat-8.5.3-2023.02.04-000001', @@ -47,6 +48,7 @@ export const mockIlmExplain: Record version: 1, modified_date_in_millis: 1675536751205, }, + skip: true, }, 'auditbeat-custom-index-1': { index: 'auditbeat-custom-index-1', diff --git a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_alerts_pattern_rollup.ts b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_alerts_pattern_rollup.ts index 984bf9f117de8..70dd4c3d94cfc 100644 --- a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_alerts_pattern_rollup.ts +++ b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_alerts_pattern_rollup.ts @@ -21,6 +21,7 @@ export const alertIndexNoResults: PatternRollup = { managed: true, policy: '.alerts-ilm-policy', phase: 'hot', + skip: true, }, }, ilmExplainPhaseCounts: { @@ -57,6 +58,7 @@ export const alertIndexWithAllResults: PatternRollup = { managed: true, policy: '.alerts-ilm-policy', phase: 'hot', + skip: true, }, }, ilmExplainPhaseCounts: { diff --git a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_auditbeat_pattern_rollup.ts b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_auditbeat_pattern_rollup.ts index 9d0e09ef57d96..d7f9295534228 100644 --- a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_auditbeat_pattern_rollup.ts +++ b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_auditbeat_pattern_rollup.ts @@ -25,6 +25,7 @@ export const auditbeatNoResults: PatternRollup = { managed: true, policy: 'auditbeat', phase: 'hot', + skip: true, }, 'auditbeat-custom-empty-index-1': { index: 'auditbeat-custom-empty-index-1', @@ -90,6 +91,7 @@ export const auditbeatWithAllResults: PatternRollup = { managed: true, policy: 'auditbeat', phase: 'hot', + skip: true, }, 'auditbeat-custom-empty-index-1': { index: 'auditbeat-custom-empty-index-1', diff --git a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_packetbeat_pattern_rollup.ts b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_packetbeat_pattern_rollup.ts index ae6199c8ae178..6c0e65cd70a2d 100644 --- a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_packetbeat_pattern_rollup.ts +++ b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_packetbeat_pattern_rollup.ts @@ -25,12 +25,14 @@ export const packetbeatNoResults: PatternRollup = { managed: true, policy: 'packetbeat', phase: 'hot', + skip: true, }, '.ds-packetbeat-8.5.3-2023.02.04-000001': { index: '.ds-packetbeat-8.5.3-2023.02.04-000001', managed: true, policy: 'packetbeat', phase: 'hot', + skip: true, }, }, ilmExplainPhaseCounts: { @@ -80,12 +82,14 @@ export const packetbeatWithSomeErrors: PatternRollup = { managed: true, policy: 'packetbeat', phase: 'hot', + skip: true, }, '.ds-packetbeat-8.5.3-2023.02.04-000001': { index: '.ds-packetbeat-8.5.3-2023.02.04-000001', managed: true, policy: 'packetbeat', phase: 'hot', + skip: true, }, }, ilmExplainPhaseCounts: { @@ -162,6 +166,7 @@ export const mockPacketbeatPatternRollup: PatternRollup = { version: 1, modified_date_in_millis: 1675536751205, }, + skip: true, }, '.ds-packetbeat-8.5.3-2023.02.04-000001': { index: '.ds-packetbeat-8.5.3-2023.02.04-000001', @@ -182,6 +187,7 @@ export const mockPacketbeatPatternRollup: PatternRollup = { version: 1, modified_date_in_millis: 1675536751205, }, + skip: true, }, }, ilmExplainPhaseCounts: { diff --git a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/stub/get_pattern_rollup_stub/index.ts b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/stub/get_pattern_rollup_stub/index.ts index 38aa129a6ec9a..a2b17c8198a1b 100644 --- a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/stub/get_pattern_rollup_stub/index.ts +++ b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/stub/get_pattern_rollup_stub/index.ts @@ -40,6 +40,7 @@ export const getPatternRollupStub = ( managed: true, policy: pattern, phase, + skip: true, }, ]; }) diff --git a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/utils/get_ilm_phase.test.ts b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/utils/get_ilm_phase.test.ts index dd92e3700c18a..f4ab0545ca340 100644 --- a/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/utils/get_ilm_phase.test.ts +++ b/x-pack/solutions/security/packages/ecs-data-quality-dashboard/impl/data_quality_panel/utils/get_ilm_phase.test.ts @@ -31,6 +31,7 @@ const hot: IlmExplainLifecycleLifecycleExplainManaged = { version: 1, modified_date_in_millis: 1675536751205, }, + skip: true, }; const warm = { diff --git a/x-pack/solutions/security/plugins/ecs_data_quality_dashboard/server/__mocks__/mock_stats_green_index.ts b/x-pack/solutions/security/plugins/ecs_data_quality_dashboard/server/__mocks__/mock_stats_green_index.ts index 399d4d1b45977..47bc1f0544c27 100644 --- a/x-pack/solutions/security/plugins/ecs_data_quality_dashboard/server/__mocks__/mock_stats_green_index.ts +++ b/x-pack/solutions/security/plugins/ecs_data_quality_dashboard/server/__mocks__/mock_stats_green_index.ts @@ -23,6 +23,7 @@ export const mockStatsGreenIndex: Record = { docs: { count: 4, deleted: 0, + total_size_in_bytes: 0, }, shard_stats: { total_count: 1, @@ -109,6 +110,7 @@ export const mockStatsGreenIndex: Record = { fielddata: { memory_size_in_bytes: 608, evictions: 0, + global_ordinals: { build_time_in_millis: 0 }, }, completion: { size_in_bytes: 0, @@ -158,6 +160,7 @@ export const mockStatsGreenIndex: Record = { docs: { count: 8, deleted: 0, + total_size_in_bytes: 0, }, shard_stats: { total_count: 2, @@ -244,6 +247,7 @@ export const mockStatsGreenIndex: Record = { fielddata: { memory_size_in_bytes: 608, evictions: 0, + global_ordinals: { build_time_in_millis: 0 }, }, completion: { size_in_bytes: 0, diff --git a/x-pack/solutions/security/plugins/ecs_data_quality_dashboard/server/__mocks__/mock_stats_yellow_index.ts b/x-pack/solutions/security/plugins/ecs_data_quality_dashboard/server/__mocks__/mock_stats_yellow_index.ts index 8f699983b6515..f662ebae3a16d 100644 --- a/x-pack/solutions/security/plugins/ecs_data_quality_dashboard/server/__mocks__/mock_stats_yellow_index.ts +++ b/x-pack/solutions/security/plugins/ecs_data_quality_dashboard/server/__mocks__/mock_stats_yellow_index.ts @@ -22,6 +22,7 @@ export const mockStatsYellowIndex: Record = { docs: { count: 1628343, deleted: 0, + total_size_in_bytes: 0, }, shard_stats: { total_count: 1, @@ -108,6 +109,7 @@ export const mockStatsYellowIndex: Record = { fielddata: { memory_size_in_bytes: 1080, evictions: 0, + global_ordinals: { build_time_in_millis: 0 }, }, completion: { size_in_bytes: 0, @@ -157,6 +159,7 @@ export const mockStatsYellowIndex: Record = { docs: { count: 1628343, deleted: 0, + total_size_in_bytes: 0, }, shard_stats: { total_count: 1, @@ -243,6 +246,7 @@ export const mockStatsYellowIndex: Record = { fielddata: { memory_size_in_bytes: 1080, evictions: 0, + global_ordinals: { build_time_in_millis: 0 }, }, completion: { size_in_bytes: 0, @@ -297,6 +301,7 @@ export const mockStatsYellowIndex: Record = { docs: { count: 1630289, deleted: 0, + total_size_in_bytes: 0, }, shard_stats: { total_count: 1, @@ -383,6 +388,7 @@ export const mockStatsYellowIndex: Record = { fielddata: { memory_size_in_bytes: 1168, evictions: 0, + global_ordinals: { build_time_in_millis: 0 }, }, completion: { size_in_bytes: 0, @@ -432,6 +438,7 @@ export const mockStatsYellowIndex: Record = { docs: { count: 1630289, deleted: 0, + total_size_in_bytes: 0, }, shard_stats: { total_count: 1, @@ -518,6 +525,7 @@ export const mockStatsYellowIndex: Record = { fielddata: { memory_size_in_bytes: 1168, evictions: 0, + global_ordinals: { build_time_in_millis: 0 }, }, completion: { size_in_bytes: 0, diff --git a/x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/entity_store/common.gen.ts b/x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/entity_store/common.gen.ts index 8acd996501349..f5af870b38951 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/entity_store/common.gen.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/entity_store/common.gen.ts @@ -86,7 +86,7 @@ export const EngineComponentStatus = z.object({ id: z.string(), installed: z.boolean(), resource: EngineComponentResource, - health: z.enum(['green', 'yellow', 'red', 'unknown']).optional(), + health: z.enum(['green', 'yellow', 'red', 'unavailable', 'unknown']).optional(), errors: z .array( z.object({ diff --git a/x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/entity_store/common.schema.yaml b/x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/entity_store/common.schema.yaml index b5ae92ba8d496..50dcf0430f59d 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/entity_store/common.schema.yaml +++ b/x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/entity_store/common.schema.yaml @@ -92,6 +92,7 @@ components: - green - yellow - red + - unavailable - unknown errors: type: array diff --git a/x-pack/solutions/security/plugins/security_solution/docs/openapi/ess/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml b/x-pack/solutions/security/plugins/security_solution/docs/openapi/ess/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml index a2f6cbacac5ed..a5961d571fe7a 100644 --- a/x-pack/solutions/security/plugins/security_solution/docs/openapi/ess/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml +++ b/x-pack/solutions/security/plugins/security_solution/docs/openapi/ess/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml @@ -1035,6 +1035,7 @@ components: - green - yellow - red + - unavailable - unknown type: string id: diff --git a/x-pack/solutions/security/plugins/security_solution/docs/openapi/serverless/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml b/x-pack/solutions/security/plugins/security_solution/docs/openapi/serverless/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml index 2e72951fd436e..06d9bfe310fed 100644 --- a/x-pack/solutions/security/plugins/security_solution/docs/openapi/serverless/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml +++ b/x-pack/solutions/security/plugins/security_solution/docs/openapi/serverless/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml @@ -1035,6 +1035,7 @@ components: - green - yellow - red + - unavailable - unknown type: string id: diff --git a/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_store/components/engines_status/hooks/use_columns.tsx b/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_store/components/engines_status/hooks/use_columns.tsx index 2b8e3861a98de..4a9469cd6de49 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_store/components/engines_status/hooks/use_columns.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_store/components/engines_status/hooks/use_columns.tsx @@ -30,6 +30,7 @@ export const HEALTH_COLOR: Record['health'], Ico unknown: 'subdued', yellow: 'warning', red: 'danger', + unavailable: 'danger', } as const; const RESOURCE_TO_TEXT: Record = { diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/types.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/types.ts index 6d20331e770ab..403c0b597073c 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/types.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/types.ts @@ -27,12 +27,12 @@ export type ShardError = Partial<{ node: string; reason: Partial<{ type: string; - reason: string; + reason: string | null; index_uuid: string; index: string; caused_by: Partial<{ type: string; - reason: string; + reason: string | null; }>; }>; }>; diff --git a/x-pack/solutions/security/plugins/security_solution/server/usage/risk_engine/get_risk_engine_metrics.mocks.ts b/x-pack/solutions/security/plugins/security_solution/server/usage/risk_engine/get_risk_engine_metrics.mocks.ts index 3890c93d3d496..afe3a9e48af3e 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/usage/risk_engine/get_risk_engine_metrics.mocks.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/usage/risk_engine/get_risk_engine_metrics.mocks.ts @@ -34,7 +34,7 @@ export const getStatsResultMock = ({ size }: { size: number }): IndicesStatsResp _shards: { total: 2, successful: 1, failed: 0 }, _all: { primaries: { - docs: { count: 200000, deleted: 0 }, + docs: { count: 200000, deleted: 0, total_size_in_bytes: 2 }, shard_stats: { total_count: 1 }, store: { size_in_bytes: size, diff --git a/yarn.lock b/yarn.lock index 4306608268e25..5faadc742527a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2109,10 +2109,10 @@ "@elastic/transport" "^8.3.1" tslib "^2.4.0" -"@elastic/elasticsearch@^8.18.2": - version "8.18.2" - resolved "https://registry.yarnpkg.com/@elastic/elasticsearch/-/elasticsearch-8.18.2.tgz#0916b6e3b5bde29ad12c2f2a241b14bf7429e4a7" - integrity sha512-2pOc/hGdxkbaDavfAlnUfjJdVsFRCGqg7fpsWJfJ2UzpgViIyojdViHg8zOCT1J14lAwvDgb9CNETWa3SBZRfw== +"@elastic/elasticsearch@^8.19.0": + version "8.19.0" + resolved "https://registry.yarnpkg.com/@elastic/elasticsearch/-/elasticsearch-8.19.0.tgz#7fef627e41151cb16771ffad1a9005e100a9d17c" + integrity sha512-bBCP78nYTNYmy0zngTM9cSpflMZScXeahC8hirtsSZ03UiywDqefEEmsQcEihb0Mw08PjFYbdx8TznHqDnRULg== dependencies: "@elastic/transport" "^8.9.6" apache-arrow "18.x - 19.x"