Skip to content

Commit

Permalink
Merge branch 'main' into remove-atp-on-policy-unassign
Browse files Browse the repository at this point in the history
  • Loading branch information
szwarckonrad authored Sep 16, 2024
2 parents 51f4c63 + 1199a5c commit 67cd49c
Show file tree
Hide file tree
Showing 165 changed files with 5,222 additions and 2,044 deletions.
12 changes: 6 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ src/plugins/field_formats @elastic/kibana-data-discovery
packages/kbn-field-types @elastic/kibana-data-discovery
packages/kbn-field-utils @elastic/kibana-data-discovery
x-pack/plugins/fields_metadata @elastic/obs-ux-logs-team
x-pack/plugins/file_upload @elastic/kibana-gis @elastic/ml-ui
x-pack/plugins/file_upload @elastic/kibana-presentation @elastic/ml-ui
examples/files_example @elastic/appex-sharedux
src/plugins/files_management @elastic/appex-sharedux
src/plugins/files @elastic/appex-sharedux
Expand Down Expand Up @@ -583,11 +583,11 @@ packages/kbn-management/settings/types @elastic/kibana-management
packages/kbn-management/settings/utilities @elastic/kibana-management
packages/kbn-management/storybook/config @elastic/kibana-management
test/plugin_functional/plugins/management_test_plugin @elastic/kibana-management
packages/kbn-mapbox-gl @elastic/kibana-gis
x-pack/examples/third_party_maps_source_example @elastic/kibana-gis
src/plugins/maps_ems @elastic/kibana-gis
x-pack/plugins/maps @elastic/kibana-gis
x-pack/packages/maps/vector_tile_utils @elastic/kibana-gis
packages/kbn-mapbox-gl @elastic/kibana-presentation
x-pack/examples/third_party_maps_source_example @elastic/kibana-presentation
src/plugins/maps_ems @elastic/kibana-presentation
x-pack/plugins/maps @elastic/kibana-presentation
x-pack/packages/maps/vector_tile_utils @elastic/kibana-presentation
x-pack/plugins/observability_solution/metrics_data_access @elastic/obs-knowledge-team @elastic/obs-ux-infra_services-team
x-pack/packages/ml/agg_utils @elastic/ml-ui
x-pack/packages/ml/anomaly_utils @elastic/ml-ui
Expand Down
2 changes: 1 addition & 1 deletion docs/setup/access.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ For example:
* When {kib} is unable to connect to a healthy {es} cluster, errors like `master_not_discovered_exception` or `unable to revive connection` or `license is not available` errors appear.
* When one or more {kib}-backing indices are unhealthy, the `index_not_green_timeout` error appears.

For more information, refer to our https://www.elastic.co/blog/troubleshooting-kibana-health[walkthrough on troubleshooting Kibana Health].
You can find a Kibana health troubleshooting walkthrough in https://www.elastic.co/blog/troubleshooting-kibana-health[this blog] or in link:https://www.youtube.com/watch?v=AlgGYcpGvOA[this video].
6 changes: 6 additions & 0 deletions packages/kbn-check-mappings-update-cli/current_fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,12 @@
"entity-discovery-api-key": [
"apiKey"
],
"entity-engine-status": [
"filter",
"indexPattern",
"status",
"type"
],
"epm-packages": [
"additional_spaces_installed_kibana",
"es_index_patterns",
Expand Down
17 changes: 17 additions & 0 deletions packages/kbn-check-mappings-update-cli/current_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,23 @@
}
}
},
"entity-engine-status": {
"dynamic": false,
"properties": {
"filter": {
"type": "keyword"
},
"indexPattern": {
"type": "keyword"
},
"status": {
"type": "keyword"
},
"type": {
"type": "keyword"
}
}
},
"epm-packages": {
"properties": {
"additional_spaces_installed_kibana": {
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
searchApplicationsSearch: `${ELASTICSEARCH_DOCS}search-application-client.html`,
searchLabs: `${SEARCH_LABS_URL}`,
searchLabsRepo: `${SEARCH_LABS_REPO}`,
semanticSearch: `${ELASTICSEARCH_DOCS}semantic-search.html`,
searchTemplates: `${ELASTICSEARCH_DOCS}search-template.html`,
semanticTextField: `${ELASTICSEARCH_DOCS}semantic-text.html`,
start: `${ENTERPRISE_SEARCH_DOCS}start.html`,
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ export interface DocLinks {
readonly searchApplicationsSearch: string;
readonly searchLabs: string;
readonly searchLabsRepo: string;
readonly semanticSearch: string;
readonly searchTemplates: string;
readonly semanticTextField: string;
readonly start: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-ftr-common-functional-services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { KibanaServerProvider } from './services/kibana_server';
export { KibanaServerProvider } from './services/kibana_server';
export type KibanaServer = ProvidedType<typeof KibanaServerProvider>;

export { RetryService } from './services/retry';
export { RetryService, type TryWithRetriesOptions } from './services/retry';

import { EsArchiverProvider } from './services/es_archiver';
export type EsArchiver = ProvidedType<typeof EsArchiverProvider>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

export { RetryService } from './retry';
export { RetryService, type TryWithRetriesOptions } from './retry';
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { FtrService } from '../ftr_provider_context';
import { retryForSuccess } from './retry_for_success';
import { retryForTruthy } from './retry_for_truthy';

interface TryWithRetriesOptions {
export interface TryWithRetriesOptions {
retryCount: number;
retryDelay?: number;
timeout?: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export async function retryForSuccess<T>(log: ToolingLog, options: Options<T>) {
if (lastError && onFailureBlock) {
const before = await runAttempt(onFailureBlock);
if ('error' in before) {
log.debug(`--- onRetryBlock error: ${before.error.message}`);
log.debug(`--- onRetryBlock error: ${before.error.message} - Attempt #: ${attemptCounter}`);
}
}

Expand All @@ -104,9 +104,13 @@ export async function retryForSuccess<T>(log: ToolingLog, options: Options<T>) {

if ('error' in attempt) {
if (lastError && lastError.message === attempt.error.message) {
log.debug(`--- ${methodName} failed again with the same message...`);
log.debug(
`--- ${methodName} failed again with the same message... - Attempt #: ${attemptCounter}`
);
} else {
log.debug(`--- ${methodName} error: ${attempt.error.message}`);
log.debug(
`--- ${methodName} error: ${attempt.error.message} - Attempt #: ${attemptCounter}`
);
}

lastError = attempt.error;
Expand Down
6 changes: 4 additions & 2 deletions packages/kbn-investigation-shared/src/rest_specs/find.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ const findInvestigationsParamsSchema = z
query: z
.object({
alertId: z.string(),
page: z.string(),
perPage: z.string(),
search: z.string(),
filter: z.string(),
page: z.coerce.number(),
perPage: z.coerce.number(),
})
.partial(),
})
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the "Elastic License
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { z } from '@kbn/zod';

const getAllInvestigationTagsParamsSchema = z.object({
query: z.object({}),
});

const getAllInvestigationTagsResponseSchema = z.string().array();

type GetAllInvestigationTagsResponse = z.output<typeof getAllInvestigationTagsResponseSchema>;

export { getAllInvestigationTagsParamsSchema, getAllInvestigationTagsResponseSchema };
export type { GetAllInvestigationTagsResponse };
2 changes: 2 additions & 0 deletions packages/kbn-investigation-shared/src/rest_specs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export type * from './find';
export type * from './get';
export type * from './get_items';
export type * from './get_notes';
export type * from './get_all_investigation_tags';
export type * from './investigation';
export type * from './investigation_item';
export type * from './investigation_note';
Expand All @@ -34,6 +35,7 @@ export * from './find';
export * from './get';
export * from './get_items';
export * from './get_notes';
export * from './get_all_investigation_tags';
export * from './investigation';
export * from './investigation_item';
export * from './investigation_note';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const investigationSchema = z.object({
title: z.string(),
createdAt: z.number(),
createdBy: z.string(),
updatedAt: z.number(),
params: z.object({
timeRange: z.object({ from: z.number(), to: z.number() }),
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const investigationItemSchema = z.intersection(
id: z.string(),
createdAt: z.number(),
createdBy: z.string(),
updatedAt: z.number(),
}),
itemSchema
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const investigationNoteSchema = z.object({
id: z.string(),
content: z.string(),
createdAt: z.number(),
updatedAt: z.number(),
createdBy: z.string(),
});

Expand Down
1 change: 1 addition & 0 deletions packages/kbn-management/settings/setting_ids/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export const OBSERVABILITY_AI_ASSISTANT_SIMULATED_FUNCTION_CALLING =
'observability:aiAssistantSimulatedFunctionCalling';
export const OBSERVABILITY_AI_ASSISTANT_SEARCH_CONNECTOR_INDEX_PATTERN =
'observability:aiAssistantSearchConnectorIndexPattern';
export const OBSERVABILITY_SEARCH_EXCLUDED_DATA_TIERS = 'observability:searchExcludedDataTiers';

// Reporting settings
export const XPACK_REPORTING_CUSTOM_PDF_LOGO_ID = 'xpackReporting:customPdfLogo';
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-mapbox-gl/kibana.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"type": "shared-common",
"id": "@kbn/mapbox-gl",
"owner": "@elastic/kibana-gis"
"owner": "@elastic/kibana-presentation"
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ export const OBSERVABILITY_PROJECT_SETTINGS = [
settings.OBSERVABILITY_AI_ASSISTANT_LOGS_INDEX_PATTERN_ID,
settings.OBSERVABILITY_AI_ASSISTANT_SIMULATED_FUNCTION_CALLING,
settings.OBSERVABILITY_AI_ASSISTANT_SEARCH_CONNECTOR_INDEX_PATTERN,
settings.OBSERVABILITY_SEARCH_EXCLUDED_DATA_TIERS,
];
1 change: 0 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@
"team:kibana-presentation",
"team:kibana-data-discovery",
"team:kibana-management",
"team:kibana-gis",
"team:security-solution"
],
"matchBaseBranches": ["main"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ describe('checking migration metadata changes on all registered SO types', () =>
"enterprise_search_telemetry": "9ac912e1417fc8681e0cd383775382117c9e3d3d",
"entity-definition": "61be3e95966045122b55e181bb39658b1dc9bbe9",
"entity-discovery-api-key": "c267a65c69171d1804362155c1378365f5acef88",
"entity-engine-status": "0738aa1a06d3361911740f8f166071ea43a00927",
"epm-packages": "8042d4a1522f6c4e6f5486e791b3ffe3a22f88fd",
"epm-packages-assets": "7a3e58efd9a14191d0d1a00b8aaed30a145fd0b1",
"event-annotation-group": "715ba867d8c68f3c9438052210ea1c30a9362582",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ const previouslyRegisteredTypes = [
'security-rule',
'security-solution-signals-migration',
'risk-engine-configuration',
'entity-engine-status',
'server',
'siem-detection-engine-rule-actions',
'siem-detection-engine-rule-execution-info',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,4 +694,11 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
},
'observability:searchExcludedDataTiers': {
type: 'array',
items: {
type: 'keyword',
_meta: { description: 'Non-default value of setting.' },
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,5 @@ export interface UsageStats {
'aiAssistant:preferredAIAssistantType': string;
'observability:profilingFetchTopNFunctionsFromStacktraces': boolean;
'securitySolution:excludedDataTiersForRuleExecution': string[];
'observability:searchExcludedDataTiers': string[];
}
2 changes: 1 addition & 1 deletion src/plugins/maps_ems/kibana.jsonc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "plugin",
"id": "@kbn/maps-ems-plugin",
"owner": "@elastic/kibana-gis",
"owner": "@elastic/kibana-presentation",
"plugin": {
"id": "mapsEms",
"server": true,
Expand Down
9 changes: 9 additions & 0 deletions src/plugins/telemetry/schema/oss_plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -10355,6 +10355,15 @@
}
}
},
"observability:searchExcludedDataTiers": {
"type": "array",
"items": {
"type": "keyword",
"_meta": {
"description": "Non-default value of setting."
}
}
},
"banners:placement": {
"type": "keyword",
"_meta": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "plugin",
"id": "@kbn/maps-custom-raster-source-plugin",
"owner": "@elastic/kibana-gis",
"owner": "@elastic/kibana-presentation",
"description": "An example plugin for creating a custom raster source for Elastic Maps",
"plugin": {
"id": "mapsCustomRasterSource",
Expand Down
2 changes: 1 addition & 1 deletion x-pack/packages/maps/vector_tile_utils/kibana.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"type": "shared-common",
"id": "@kbn/maps-vector-tile-utils",
"owner": "@elastic/kibana-gis"
"owner": "@elastic/kibana-presentation"
}
2 changes: 1 addition & 1 deletion x-pack/plugins/file_upload/kibana.jsonc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "plugin",
"id": "@kbn/file-upload-plugin",
"owner": ["@elastic/kibana-gis", "@elastic/ml-ui"],
"owner": ["@elastic/kibana-presentation", "@elastic/ml-ui"],
"description": "The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON.",
"plugin": {
"id": "fileUpload",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function createPackageManifestDict(
],
owner: {
github: package_owner,
type: 'elastic',
type: 'community',
},
};

Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/maps/kibana.jsonc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "plugin",
"id": "@kbn/maps-plugin",
"owner": "@elastic/kibana-gis",
"owner": "@elastic/kibana-presentation",
"plugin": {
"id": "maps",
"server": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { i18n } from '@kbn/i18n';
import React from 'react';
import { Controller, useFormContext } from 'react-hook-form';
import { InvestigationForm } from '../investigation_edit_form';
import { useFetchAllInvestigationTags } from '../../../hooks/use_fetch_all_investigation_tags';

const I18N_TAGS_LABEL = i18n.translate(
'xpack.investigateApp.investigationEditForm.span.tagsLabel',
Expand All @@ -18,6 +19,7 @@ const I18N_TAGS_LABEL = i18n.translate(

export function TagsField() {
const { control, getFieldState } = useFormContext<InvestigationForm>();
const { isLoading, data: tags } = useFetchAllInvestigationTags();

return (
<EuiFormRow label={I18N_TAGS_LABEL} fullWidth isInvalid={getFieldState('tags').invalid}>
Expand All @@ -32,10 +34,10 @@ export function TagsField() {
aria-label={I18N_TAGS_LABEL}
placeholder={I18N_TAGS_LABEL}
fullWidth
noSuggestions
isInvalid={fieldState.invalid}
isClearable
options={[]}
isLoading={isLoading}
options={tags?.map((tag) => ({ label: tag, value: tag })) ?? []}
selectedOptions={generateTagOptions(field.value)}
onChange={(selected) => {
if (selected.length) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@

export const investigationKeys = {
all: ['investigations'] as const,
tags: () => [...investigationKeys.all, 'tags'] as const,
lists: () => [...investigationKeys.all, 'list'] as const,
list: (params: { page: number; perPage: number }) =>
list: (params: { page: number; perPage: number; search?: string; filter?: string }) =>
[...investigationKeys.lists(), params] as const,
details: () => [...investigationKeys.all, 'detail'] as const,
detail: (investigationId: string) => [...investigationKeys.details(), investigationId] as const,
Expand Down
Loading

0 comments on commit 67cd49c

Please sign in to comment.