From 1727a5ed77dca39c3b8ae7090225323f6f3b340c Mon Sep 17 00:00:00 2001 From: Sander Philipse <94373878+sphilipse@users.noreply.github.com> Date: Thu, 13 Jul 2023 18:47:43 +0800 Subject: [PATCH 01/21] [Enterprise Search] Fix documents pagination (#161830) ## Summary This fixes broken pagination in access control indices, by splitting the fetching logic out and making it unique per index name. --- .../api/mappings/mappings_logic.ts | 7 +- .../search_documents_api_logic.ts | 34 ++- .../document_list/document_list.test.tsx | 39 ++- .../document_list/document_list.tsx | 43 ++-- .../components/search_index/documents.tsx | 70 ++++- .../search_index/documents_logic.test.ts | 243 ------------------ .../search_index/documents_logic.ts | 165 ------------ .../search_index/index_mappings.tsx | 8 +- .../shared/api_logic/create_api_logic.ts | 1 + .../shared/result/result_fields.tsx | 1 + 10 files changed, 138 insertions(+), 473 deletions(-) delete mode 100644 x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.test.ts delete mode 100644 x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.ts diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/mappings/mappings_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/mappings/mappings_logic.ts index b68ae1f4e1775..d3db6837d0b59 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/mappings/mappings_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/mappings/mappings_logic.ts @@ -7,7 +7,7 @@ import type { IndicesGetMappingIndexMappingRecord } from '@elastic/elasticsearch/lib/api/types'; -import { createApiLogic } from '../../../shared/api_logic/create_api_logic'; +import { Actions, createApiLogic } from '../../../shared/api_logic/create_api_logic'; import { HttpLogic } from '../../../shared/http'; export interface GetMappingsArgs { @@ -16,10 +16,15 @@ export interface GetMappingsArgs { export type GetMappingsResponse = IndicesGetMappingIndexMappingRecord; +export type GetMappingsActions = Actions; + export const getMappings = async ({ indexName }: GetMappingsArgs) => { const route = `/internal/enterprise_search/mappings/${indexName}`; return await HttpLogic.values.http.get(route); }; +export const mappingsWithPropsApiLogic = (indexName: string) => + createApiLogic(['mappings_api_logic', indexName], getMappings); + export const MappingsApiLogic = createApiLogic(['mappings_api_logic'], getMappings); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/search_documents/search_documents_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/search_documents/search_documents_api_logic.ts index eb4edd6114d33..893a46ced350a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/search_documents/search_documents_api_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/search_documents/search_documents_api_logic.ts @@ -9,20 +9,32 @@ import { SearchResponseBody } from '@elastic/elasticsearch/lib/api/types'; import { Meta } from '../../../../../common/types'; -import { createApiLogic } from '../../../shared/api_logic/create_api_logic'; +import { Actions, createApiLogic } from '../../../shared/api_logic/create_api_logic'; import { HttpLogic } from '../../../shared/http'; +export interface SearchDocumentsApiLogicArgs { + docsPerPage?: number; + indexName: string; + pagination: { pageIndex: number; pageSize: number }; + query?: string; +} + +export interface SearchDocumentsApiLogicValues { + meta: Meta; + results: SearchResponseBody; +} + +export type SearchDocumentsApiLogicActions = Actions< + SearchDocumentsApiLogicArgs, + SearchDocumentsApiLogicValues +>; + export const searchDocuments = async ({ docsPerPage, indexName, pagination, query: searchQuery, -}: { - docsPerPage?: number; - indexName: string; - pagination: { pageIndex: number; pageSize: number }; - query?: string; -}) => { +}: SearchDocumentsApiLogicArgs) => { const newIndexName = encodeURIComponent(indexName); const route = `/internal/enterprise_search/indices/${newIndexName}/search`; const query = { @@ -30,7 +42,7 @@ export const searchDocuments = async ({ size: docsPerPage || pagination.pageSize, }; - return await HttpLogic.values.http.post<{ meta: Meta; results: SearchResponseBody }>(route, { + return await HttpLogic.values.http.post(route, { body: JSON.stringify({ searchQuery, }), @@ -38,7 +50,5 @@ export const searchDocuments = async ({ }); }; -export const SearchDocumentsApiLogic = createApiLogic( - ['search_documents_api_logic'], - searchDocuments -); +export const searchDocumentsApiLogic = (indexName: string) => + createApiLogic(['search_documents_api_logic', indexName], searchDocuments); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.test.tsx index f59f6f4e54a58..2fa1b89294807 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.test.tsx @@ -13,26 +13,22 @@ import { shallow } from 'enzyme'; import { EuiCallOut, EuiPagination } from '@elastic/eui'; -import { Status } from '../../../../../../../common/types/api'; - import { Result } from '../../../../../shared/result/result'; -import { INDEX_DOCUMENTS_META_DEFAULT } from '../../documents_logic'; +import { INDEX_DOCUMENTS_META_DEFAULT } from '../../documents'; import { DocumentList } from './document_list'; const mockActions = {}; export const DEFAULT_VALUES = { - data: undefined, - indexName: 'indexName', + docs: [], + docsPerPage: 25, isLoading: true, - mappingData: undefined, - mappingStatus: 0, + mappings: undefined, meta: INDEX_DOCUMENTS_META_DEFAULT, - query: '', - results: [], - status: Status.IDLE, + onPaginate: () => {}, + setDocsPerPage: () => {}, }; const mockValues = { ...DEFAULT_VALUES }; @@ -44,15 +40,15 @@ describe('DocumentList', () => { setMockActions(mockActions); }); it('renders empty', () => { - const wrapper = shallow(); + const wrapper = shallow(); expect(wrapper.find(Result)).toHaveLength(0); expect(wrapper.find(EuiPagination)).toHaveLength(2); }); it('renders documents when results when there is data and mappings', () => { - setMockValues({ - ...mockValues, - results: [ + const values = { + ...DEFAULT_VALUES, + docs: [ { _id: 'M9ntXoIBTq5dF-1Xnc8A', _index: 'kibana_sample_data_flights', @@ -70,19 +66,20 @@ describe('DocumentList', () => { }, }, ], - simplifiedMapping: { + mappings: { AvgTicketPrice: { - type: 'float', + type: 'float' as const, }, }, - }); + }; - const wrapper = shallow(); + const wrapper = shallow(); expect(wrapper.find(Result)).toHaveLength(2); }); it('renders callout when total results are 10.000', () => { - setMockValues({ + const values = { + ...DEFAULT_VALUES, ...mockValues, meta: { page: { @@ -90,8 +87,8 @@ describe('DocumentList', () => { total_results: 10000, }, }, - }); - const wrapper = shallow(); + }; + const wrapper = shallow(); expect(wrapper.find(EuiCallOut)).toHaveLength(1); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.tsx index ef89c30e16c89..5a331283aee67 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/document_list/document_list.tsx @@ -7,9 +7,9 @@ import React, { useState } from 'react'; -import { useActions, useValues } from 'kea'; +import { useValues } from 'kea'; -import { SearchHit } from '@elastic/elasticsearch/lib/api/types'; +import { MappingProperty, SearchHit } from '@elastic/elasticsearch/lib/api/types'; import { EuiButtonEmpty, @@ -29,22 +29,33 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage, FormattedNumber } from '@kbn/i18n-react'; +import { Meta } from '../../../../../../../common/types'; + import { Result } from '../../../../../shared/result/result'; import { resultMetaData } from '../../../../../shared/result/result_metadata'; -import { DocumentsLogic } from '../../documents_logic'; import { IndexViewLogic } from '../../index_view_logic'; -export const DocumentList: React.FC = () => { - const { - docsPerPage, - isLoading, - meta, - results, - simplifiedMapping: mappings, - } = useValues(DocumentsLogic); +interface DocumentListProps { + docs: SearchHit[]; + docsPerPage: number; + isLoading: boolean; + mappings: Record | undefined; + meta: Meta; + onPaginate: (newPageIndex: number) => void; + setDocsPerPage: (docsPerPage: number) => void; +} + +export const DocumentList: React.FC = ({ + docs, + docsPerPage, + isLoading, + mappings, + meta, + onPaginate, + setDocsPerPage, +}) => { const { ingestionMethod } = useValues(IndexViewLogic); - const { onPaginate, setDocsPerPage } = useActions(DocumentsLogic); const [isPopoverOpen, setIsPopoverOpen] = useState(false); const resultToField = (result: SearchHit) => { @@ -88,7 +99,7 @@ export const DocumentList: React.FC = () => { maximum: , results: ( - + ), total: ( @@ -102,10 +113,10 @@ export const DocumentList: React.FC = () => { {isLoading && } - {results.map((result) => { + {docs.map((doc) => { return ( - - + + ); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents.tsx index ea1b1aaecd23f..b82305b4c4d04 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents.tsx @@ -20,25 +20,46 @@ import { import { i18n } from '@kbn/i18n'; -import { CONNECTORS_ACCESS_CONTROL_INDEX_PREFIX } from '../../../../../common/constants'; +import { + CONNECTORS_ACCESS_CONTROL_INDEX_PREFIX, + ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT, +} from '../../../../../common/constants'; +import { Status } from '../../../../../common/types/api'; +import { DEFAULT_META } from '../../../shared/constants'; import { KibanaLogic } from '../../../shared/kibana'; +import { mappingsWithPropsApiLogic } from '../../api/mappings/mappings_logic'; + +import { searchDocumentsApiLogic } from '../../api/search_documents/search_documents_api_logic'; + import { AccessControlIndexSelector, AccessControlSelectorOption, } from './components/access_control_index_selector/access_control_index_selector'; import { DocumentList } from './components/document_list/document_list'; -import { DocumentsLogic, DEFAULT_PAGINATION } from './documents_logic'; import { IndexNameLogic } from './index_name_logic'; import { IndexViewLogic } from './index_view_logic'; import './documents.scss'; +export const INDEX_DOCUMENTS_META_DEFAULT = { + page: { + current: 0, + size: ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT, + total_pages: 0, + total_results: 0, + }, +}; + +export const DEFAULT_PAGINATION = { + pageIndex: INDEX_DOCUMENTS_META_DEFAULT.page.current, + pageSize: INDEX_DOCUMENTS_META_DEFAULT.page.size, + totalItemCount: INDEX_DOCUMENTS_META_DEFAULT.page.total_results, +}; + export const SearchIndexDocuments: React.FC = () => { const { indexName } = useValues(IndexNameLogic); const { ingestionMethod, hasDocumentLevelSecurityFeature } = useValues(IndexViewLogic); - const { simplifiedMapping } = useValues(DocumentsLogic); - const { makeRequest, makeMappingRequest, setSearchQuery } = useActions(DocumentsLogic); const { productFeatures } = useValues(KibanaLogic); const [selectedIndexType, setSelectedIndexType] = @@ -47,18 +68,35 @@ export const SearchIndexDocuments: React.FC = () => { selectedIndexType === 'content-index' ? indexName : indexName.replace('search-', CONNECTORS_ACCESS_CONTROL_INDEX_PREFIX); + const mappingLogic = mappingsWithPropsApiLogic(indexToShow); + const documentLogic = searchDocumentsApiLogic(indexToShow); + + const { makeRequest: getDocuments } = useActions(documentLogic); + const { makeRequest: getMappings } = useActions(mappingLogic); + const { data, status } = useValues(documentLogic); + const { data: mappingData, status: mappingStatus } = useValues(mappingLogic); + + const docs = data?.results?.hits.hits ?? []; + + const [pagination, setPagination] = useState(DEFAULT_PAGINATION); + const [searchQuery, setSearchQuery] = useState(''); const shouldShowAccessControlSwitcher = hasDocumentLevelSecurityFeature && productFeatures.hasDocumentLevelSecurityEnabled; useEffect(() => { - makeRequest({ + getDocuments({ indexName: indexToShow, - pagination: DEFAULT_PAGINATION, - query: '', + pagination, + query: searchQuery, }); - makeMappingRequest({ indexName: indexToShow }); - }, [indexToShow, indexName]); + }, [indexToShow, pagination, searchQuery]); + + useEffect(() => { + setSearchQuery(''); + setPagination(DEFAULT_PAGINATION); + getMappings({ indexName: indexToShow }); + }, [indexToShow]); return ( @@ -102,11 +140,21 @@ export const SearchIndexDocuments: React.FC = () => { - {!simplifiedMapping && + {docs.length === 0 && i18n.translate('xpack.enterpriseSearch.content.searchIndex.documents.noMappings', { defaultMessage: 'No documents found for index', })} - {simplifiedMapping && } + {docs.length > 0 && ( + setPagination({ ...pagination, pageIndex })} + setDocsPerPage={(pageSize) => setPagination({ ...pagination, pageSize })} + /> + )} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.test.ts deleted file mode 100644 index 3dd9c0f41533c..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.test.ts +++ /dev/null @@ -1,243 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { LogicMounter } from '../../../__mocks__/kea_logic'; - -import { nextTick } from '@kbn/test-jest-helpers'; - -import { HttpError, Status } from '../../../../../common/types/api'; -import { MappingsApiLogic } from '../../api/mappings/mappings_logic'; -import { SearchDocumentsApiLogic } from '../../api/search_documents/search_documents_api_logic'; - -import { - DocumentsLogic, - INDEX_DOCUMENTS_META_DEFAULT, - convertMetaToPagination, -} from './documents_logic'; -import { IndexNameLogic } from './index_name_logic'; - -export const DEFAULT_VALUES = { - data: undefined, - docsPerPage: 25, - indexName: 'indexName', - isLoading: true, - mappingData: undefined, - mappingStatus: 0, - meta: INDEX_DOCUMENTS_META_DEFAULT, - query: '', - results: [], - status: Status.IDLE, -}; - -describe('DocumentsLogic', () => { - const { mount: mountIndexNameLogic } = new LogicMounter(IndexNameLogic); - const { mount: mountSearchDocumentsApiLogic } = new LogicMounter(SearchDocumentsApiLogic); - const { mount: mountMappingsApiLogic } = new LogicMounter(MappingsApiLogic); - const { mount } = new LogicMounter(DocumentsLogic); - - beforeEach(() => { - jest.clearAllMocks(); - const indexNameLogic = mountIndexNameLogic(); - mountMappingsApiLogic(); - mountSearchDocumentsApiLogic(); - mount(); - indexNameLogic.actions.setIndexName('indexName'); - }); - - it('has expected default values', () => { - expect(DocumentsLogic.values).toEqual(DEFAULT_VALUES); - }); - - describe('actions', () => { - describe('setSearchQuery', () => { - it('sets query string', () => { - const newQueryString = 'foo'; - expect(DocumentsLogic.values).toEqual({ ...DEFAULT_VALUES }); - DocumentsLogic.actions.setSearchQuery(newQueryString); - expect(DocumentsLogic.values).toEqual({ ...DEFAULT_VALUES, query: newQueryString }); - }); - }); - describe('setDocsPerPage', () => { - it('sets documents to show per page', () => { - const docsToShow = 50; - expect(DocumentsLogic.values).toEqual({ ...DEFAULT_VALUES }); - DocumentsLogic.actions.setDocsPerPage(docsToShow); - expect(DocumentsLogic.values).toEqual({ - ...DEFAULT_VALUES, - docsPerPage: docsToShow, - meta: { - page: { - ...INDEX_DOCUMENTS_META_DEFAULT.page, - size: docsToShow, - }, - }, - simplifiedMapping: undefined, - status: Status.LOADING, - }); - }); - }); - }); - describe('listeners', () => { - describe('setSearchQuery', () => { - it('make documents apiRequest request after 250ms debounce', async () => { - jest.useFakeTimers({ legacyFakeTimers: true }); - DocumentsLogic.actions.makeRequest = jest.fn(); - DocumentsLogic.actions.setSearchQuery('test'); - await nextTick(); - expect(DocumentsLogic.actions.makeRequest).not.toHaveBeenCalled(); - jest.advanceTimersByTime(250); - await nextTick(); - expect(DocumentsLogic.actions.makeRequest).toHaveBeenCalledWith({ - docsPerPage: 25, - indexName: 'indexName', - pagination: convertMetaToPagination(INDEX_DOCUMENTS_META_DEFAULT), - query: 'test', - }); - jest.useRealTimers(); - }); - }); - }); - describe('selectors', () => { - describe('isLoading', () => { - it('sets isLoading false when mapping and documents requests are success', () => { - const mockSuccessData = { - _shards: { failed: 0, successful: 3, total: 3 }, - hits: { hits: [] }, - timed_out: false, - took: 3, - }; - expect(DocumentsLogic.values).toEqual({ ...DEFAULT_VALUES }); - MappingsApiLogic.actions.apiSuccess({ mappings: {} }); - SearchDocumentsApiLogic.actions.apiSuccess({ - meta: INDEX_DOCUMENTS_META_DEFAULT, - results: mockSuccessData, - }); - - expect(DocumentsLogic.values).toEqual({ - ...DEFAULT_VALUES, - data: { - meta: INDEX_DOCUMENTS_META_DEFAULT, - results: mockSuccessData, - }, - isLoading: false, - mappingData: { - mappings: {}, - }, - mappingStatus: Status.SUCCESS, - status: Status.SUCCESS, - }); - }); - - it('sets isLoading false when one of mappings or documents requests are not done', () => { - expect(DocumentsLogic.values).toEqual({ ...DEFAULT_VALUES }); - MappingsApiLogic.actions.apiError({} as HttpError); - expect(DocumentsLogic.values).toEqual({ - ...DEFAULT_VALUES, - isLoading: true, - mappingStatus: Status.ERROR, - status: Status.IDLE, - }); - }); - }); - - describe('results', () => { - it('selects searchHits from the response body', () => { - const mockSuccessData = { - _shards: { failed: 0, successful: 3, total: 3 }, - hits: { hits: [{ _id: '123', _index: 'indexName', searchHit: true }] }, - timed_out: false, - took: 3, - }; - - MappingsApiLogic.actions.apiSuccess({ mappings: {} }); - SearchDocumentsApiLogic.actions.apiSuccess({ - meta: { - page: { - ...INDEX_DOCUMENTS_META_DEFAULT.page, - total_pages: 1, - total_results: 1, - }, - }, - results: mockSuccessData, - }); - - expect(DocumentsLogic.values).toEqual({ - ...DEFAULT_VALUES, - data: { - meta: { - page: { - ...INDEX_DOCUMENTS_META_DEFAULT.page, - total_pages: 1, - total_results: 1, - }, - }, - results: mockSuccessData, - }, - isLoading: false, - mappingData: { - mappings: {}, - }, - mappingStatus: Status.SUCCESS, - meta: { - page: { - ...INDEX_DOCUMENTS_META_DEFAULT.page, - total_pages: 1, - total_results: 1, - }, - }, - results: [{ _id: '123', _index: 'indexName', searchHit: true }], - simplifiedMapping: undefined, - status: Status.SUCCESS, - }); - }); - it("returns empty when response doesn't have hits", () => { - const mockSuccessData = { - _shards: { failed: 0, successful: 3, total: 3 }, - hits: { hits: [] }, - timed_out: false, - took: 3, - }; - - MappingsApiLogic.actions.apiSuccess({ mappings: {} }); - SearchDocumentsApiLogic.actions.apiSuccess({ - meta: INDEX_DOCUMENTS_META_DEFAULT, - results: mockSuccessData, - }); - - expect(DocumentsLogic.values).toEqual({ - ...DEFAULT_VALUES, - data: { meta: INDEX_DOCUMENTS_META_DEFAULT, results: mockSuccessData }, - isLoading: false, - mappingData: { - mappings: {}, - }, - mappingStatus: Status.SUCCESS, - results: [], - status: Status.SUCCESS, - }); - }); - }); - - describe('simplifiedMapping', () => { - it('selects properties from the response body', () => { - MappingsApiLogic.actions.apiSuccess({ - mappings: { properties: { some: { type: 'text' } } }, - }); - - expect(DocumentsLogic.values).toEqual({ - ...DEFAULT_VALUES, - isLoading: true, - mappingData: { - mappings: { properties: { some: { type: 'text' } } }, - }, - mappingStatus: Status.SUCCESS, - simplifiedMapping: { some: { type: 'text' } }, - }); - }); - }); - }); -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.ts deleted file mode 100644 index 093c4f5f399cc..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.ts +++ /dev/null @@ -1,165 +0,0 @@ -/* - * 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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { kea, MakeLogicType } from 'kea'; - -import { - IndicesGetMappingIndexMappingRecord, - MappingProperty, - SearchResponseBody, - SearchHit, -} from '@elastic/elasticsearch/lib/api/types'; - -import { ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT } from '../../../../../common/constants'; -import { Meta } from '../../../../../common/types'; -import { Status } from '../../../../../common/types/api'; - -import { updateMetaPageIndex } from '../../../shared/table_pagination'; - -import { MappingsApiLogic } from '../../api/mappings/mappings_logic'; -import { SearchDocumentsApiLogic } from '../../api/search_documents/search_documents_api_logic'; - -import { IndexNameLogic } from './index_name_logic'; - -export const INDEX_DOCUMENTS_META_DEFAULT = { - page: { - current: 0, - size: ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT, - total_pages: 0, - total_results: 0, - }, -}; - -export const DEFAULT_PAGINATION = { - pageIndex: INDEX_DOCUMENTS_META_DEFAULT.page.current, - pageSize: INDEX_DOCUMENTS_META_DEFAULT.page.size, - totalItemCount: INDEX_DOCUMENTS_META_DEFAULT.page.total_results, -}; - -interface DocumentsLogicActions { - apiReset: typeof SearchDocumentsApiLogic.actions.apiReset; - makeMappingRequest: typeof MappingsApiLogic.actions.makeRequest; - makeRequest: typeof SearchDocumentsApiLogic.actions.makeRequest; - onPaginate(newPageIndex: number): { newPageIndex: number }; - setDocsPerPage(docsPerPage: number): { docsPerPage: number }; - setSearchQuery(query: string): { query: string }; -} - -export interface DocumentsLogicValues { - data: typeof SearchDocumentsApiLogic.values.data; - docsPerPage: number; - indexName: typeof IndexNameLogic.values.indexName; - isLoading: boolean; - mappingData: IndicesGetMappingIndexMappingRecord; - mappingStatus: Status; - meta: Meta; - query: string; - results: SearchHit[]; - simplifiedMapping: Record | undefined; - status: Status; -} - -export const convertMetaToPagination = (meta: Meta) => ({ - pageIndex: meta.page.current, - pageSize: meta.page.size, - totalItemCount: meta.page.total_results, -}); - -export const DocumentsLogic = kea>({ - actions: { - onPaginate: (newPageIndex) => ({ newPageIndex }), - setDocsPerPage: (docsPerPage) => ({ docsPerPage }), - setSearchQuery: (query) => ({ query }), - }, - connect: { - actions: [ - SearchDocumentsApiLogic, - ['apiReset', 'apiSuccess', 'makeRequest'], - MappingsApiLogic, - ['makeRequest as makeMappingRequest'], - ], - values: [ - SearchDocumentsApiLogic, - ['data', 'status'], - MappingsApiLogic, - ['data as mappingData', 'status as mappingStatus'], - IndexNameLogic, - ['indexName'], - ], - }, - listeners: ({ actions, values }) => ({ - onPaginate: () => { - actions.makeRequest({ - docsPerPage: values.docsPerPage, - indexName: values.indexName, - pagination: convertMetaToPagination(values.meta), - query: values.query, - }); - }, - setDocsPerPage: () => { - actions.makeRequest({ - docsPerPage: values.docsPerPage, - indexName: values.indexName, - pagination: convertMetaToPagination(values.meta), - query: values.query, - }); - }, - setSearchQuery: async (_, breakpoint) => { - await breakpoint(250); - actions.makeRequest({ - docsPerPage: values.docsPerPage, - indexName: values.indexName, - pagination: convertMetaToPagination(values.meta), - query: values.query, - }); - }, - }), - path: ['enterprise_search', 'search_index', 'documents'], - reducers: () => ({ - docsPerPage: [ - ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT, - { - setDocsPerPage: (_, { docsPerPage }) => docsPerPage, - }, - ], - meta: [ - INDEX_DOCUMENTS_META_DEFAULT, - { - apiSuccess: (_, { meta }) => meta, - onPaginate: (state, { newPageIndex }) => updateMetaPageIndex(state, newPageIndex), - setDocsPerPage: (_, { docsPerPage }) => ({ - page: { ...INDEX_DOCUMENTS_META_DEFAULT.page, size: docsPerPage }, - }), - }, - ], - query: [ - '', - { - setSearchQuery: (_, { query }) => query, - }, - ], - }), - selectors: ({ selectors }) => ({ - isLoading: [ - () => [selectors.status, selectors.mappingStatus], - (status, mappingStatus) => status !== Status.SUCCESS || mappingStatus !== Status.SUCCESS, - ], - results: [ - () => [selectors.data], - (data: { results: SearchResponseBody }) => { - return data?.results?.hits?.hits || []; - }, - ], - simplifiedMapping: [ - () => [selectors.mappingStatus, selectors.mappingData], - (status: Status, mapping: IndicesGetMappingIndexMappingRecord) => { - if (status !== Status.SUCCESS) return; - return mapping?.mappings?.properties; - }, - ], - }), -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_mappings.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_mappings.tsx index 5ec31986b2fe4..24f126efebbad 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_mappings.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_mappings.tsx @@ -31,11 +31,12 @@ import { docLinks } from '../../../shared/doc_links'; import { KibanaLogic } from '../../../shared/kibana'; +import { mappingsWithPropsApiLogic } from '../../api/mappings/mappings_logic'; + import { AccessControlIndexSelector, AccessControlSelectorOption, } from './components/access_control_index_selector/access_control_index_selector'; -import { DocumentsLogic } from './documents_logic'; import { IndexNameLogic } from './index_name_logic'; import { IndexViewLogic } from './index_view_logic'; @@ -43,8 +44,6 @@ import './index_mappings.scss'; export const SearchIndexIndexMappings: React.FC = () => { const { indexName } = useValues(IndexNameLogic); - const { makeMappingRequest } = useActions(DocumentsLogic); - const { mappingData } = useValues(DocumentsLogic); const { hasDocumentLevelSecurityFeature } = useValues(IndexViewLogic); const { productFeatures } = useValues(KibanaLogic); @@ -54,7 +53,8 @@ export const SearchIndexIndexMappings: React.FC = () => { selectedIndexType === 'content-index' ? indexName : indexName.replace('search-', CONNECTORS_ACCESS_CONTROL_INDEX_PREFIX); - + const { makeRequest: makeMappingRequest } = useActions(mappingsWithPropsApiLogic(indexToShow)); + const { data: mappingData } = useValues(mappingsWithPropsApiLogic(indexToShow)); const shouldShowAccessControlSwitch = hasDocumentLevelSecurityFeature && productFeatures.hasDocumentLevelSecurityEnabled; useEffect(() => { diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/api_logic/create_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/shared/api_logic/create_api_logic.ts index 38ffd8ff8a438..2382a0d071440 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/api_logic/create_api_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/api_logic/create_api_logic.ts @@ -26,6 +26,7 @@ export interface Actions { export interface CreateApiOptions { clearFlashMessagesOnMakeRequest: boolean; + key: string; // for logics that use a key as a prop requestBreakpointMS?: number; showErrorFlash: boolean; showSuccessFlashFn?: (result: Result) => string; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/result/result_fields.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/result/result_fields.tsx index 7e41d65c15f8d..8e3fdc012ccaa 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/result/result_fields.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/result/result_fields.tsx @@ -27,6 +27,7 @@ export const ResultFields: React.FC = ({ fields, isExpanded }) => { fieldName={field.fieldName} fieldValue={field.fieldValue} fieldType={field.fieldType} + key={field.fieldName} /> ))} From ded257f35595e891af973bc42de782f6386cfeed Mon Sep 17 00:00:00 2001 From: Sander Philipse <94373878+sphilipse@users.noreply.github.com> Date: Thu, 13 Jul 2023 18:50:10 +0800 Subject: [PATCH 02/21] [Enterprise Search] Fix connectors jobs index name (#161824) ## Summary This fixes the wrong index name for the connectors job index. --- x-pack/plugins/enterprise_search/server/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/enterprise_search/server/index.ts b/x-pack/plugins/enterprise_search/server/index.ts index 1ba4584517912..120a8a231d6e8 100644 --- a/x-pack/plugins/enterprise_search/server/index.ts +++ b/x-pack/plugins/enterprise_search/server/index.ts @@ -51,6 +51,6 @@ export const config: PluginConfigDescriptor = { export const CONNECTORS_INDEX = '.elastic-connectors'; export const CURRENT_CONNECTORS_INDEX = '.elastic-connectors-v1'; export const CONNECTORS_JOBS_INDEX = '.elastic-connectors-sync-jobs'; -export const CURRENT_CONNECTORS_JOB_INDEX = '.elastic-connectors-v1'; +export const CURRENT_CONNECTORS_JOB_INDEX = '.elastic-connectors-sync-jobs-v1'; export const CONNECTORS_VERSION = 1; export const CRAWLERS_INDEX = '.ent-search-actastic-crawler2_configurations_v2'; From 64f525250501ead9c909e1451febd486abd002d6 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 13 Jul 2023 12:58:45 +0100 Subject: [PATCH 03/21] skip flaky suite (#161853) --- .../tests/agent_explorer/latest_agent_versions.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/apm_api_integration/tests/agent_explorer/latest_agent_versions.spec.ts b/x-pack/test/apm_api_integration/tests/agent_explorer/latest_agent_versions.spec.ts index 00e3fedf4620c..c114e8d846923 100644 --- a/x-pack/test/apm_api_integration/tests/agent_explorer/latest_agent_versions.spec.ts +++ b/x-pack/test/apm_api_integration/tests/agent_explorer/latest_agent_versions.spec.ts @@ -21,7 +21,8 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); } - registry.when( + // FLAKY: https://github.com/elastic/kibana/issues/161853 + registry.when.skip( 'Agent latest versions when configuration is defined', { config: 'basic', archives: [] }, () => { From d076300a52f4be0a4831c47118f80347e0a00346 Mon Sep 17 00:00:00 2001 From: Jeramy Soucy Date: Thu, 13 Jul 2023 08:51:55 -0400 Subject: [PATCH 04/21] Upgrades protobufjs 6.11.3 -> 7.2.4 (#161407) Upgrades protobufjs from 6.11.3 to 7.2.4 via... - @grpc/grpc-js 1.6.7 -> 1.6.8 - @opentelemetry/exporter-metrics-otlp-grpc 0.30.0 -> 0.34.0 Upgrades for compatibility... - @opentelemetry/api-metrics 0.30.0 -> 0.31.0 - @opentelemetry/exporter-prometheus 0.30.0 -> 0.31.0 - @opentelemetry/sdk-metrics-base 0.30.0 -> 0.31.0 --- package.json | 10 +- renovate.json | 495 +++++++++++++++++++++++++++++++++++++++----------- yarn.lock | 306 +++++++++++++++++-------------- 3 files changed, 563 insertions(+), 248 deletions(-) diff --git a/package.json b/package.json index 559f93a4d5360..a6fe03d4ab479 100644 --- a/package.json +++ b/package.json @@ -114,7 +114,7 @@ "@emotion/serialize": "^1.1.2", "@emotion/server": "^11.11.0", "@emotion/styled": "^11.11.0", - "@grpc/grpc-js": "^1.6.7", + "@grpc/grpc-js": "^1.6.8", "@hapi/accept": "^5.0.2", "@hapi/boom": "^9.1.4", "@hapi/cookie": "^11.0.2", @@ -758,11 +758,11 @@ "@mapbox/mapbox-gl-rtl-text": "0.2.3", "@mapbox/vector-tile": "1.3.1", "@opentelemetry/api": "^1.1.0", - "@opentelemetry/api-metrics": "^0.30.0", - "@opentelemetry/exporter-metrics-otlp-grpc": "^0.30.0", - "@opentelemetry/exporter-prometheus": "^0.30.0", + "@opentelemetry/api-metrics": "^0.31.0", + "@opentelemetry/exporter-metrics-otlp-grpc": "^0.34.0", + "@opentelemetry/exporter-prometheus": "^0.31.0", "@opentelemetry/resources": "^1.4.0", - "@opentelemetry/sdk-metrics-base": "^0.30.0", + "@opentelemetry/sdk-metrics-base": "^0.31.0", "@opentelemetry/semantic-conventions": "^1.4.0", "@reduxjs/toolkit": "1.7.2", "@slack/webhook": "^5.0.4", diff --git a/renovate.json b/renovate.json index bb1d043c30f48..a7a16d4fe0307 100644 --- a/renovate.json +++ b/renovate.json @@ -1,9 +1,20 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["config:base"], - "ignorePaths": ["**/__fixtures__/**", "**/fixtures/**"], - "enabledManagers": ["npm"], - "baseBranches": ["main", "7.16", "7.15"], + "extends": [ + "config:base" + ], + "ignorePaths": [ + "**/__fixtures__/**", + "**/fixtures/**" + ], + "enabledManagers": [ + "npm" + ], + "baseBranches": [ + "main", + "7.16", + "7.15" + ], "prConcurrentLimit": 0, "prHourlyLimit": 0, "separateMajorMinor": false, @@ -17,17 +28,31 @@ }, "packageRules": [ { - "matchPackagePatterns": [".*"], + "matchPackagePatterns": [ + ".*" + ], "enabled": false, "prCreation": "not-pending", "stabilityDays": 7 }, { "groupName": "@elastic/charts", - "matchPackageNames": ["@elastic/charts"], - "reviewers": ["team:visualizations", "markov00", "nickofthyme"], - "matchBaseBranches": ["main"], - "labels": ["release_note:skip", "backport:skip", "Team:Visualizations"], + "matchPackageNames": [ + "@elastic/charts" + ], + "reviewers": [ + "team:visualizations", + "markov00", + "nickofthyme" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "release_note:skip", + "backport:skip", + "Team:Visualizations" + ], "draftPR": true, "enabled": true, "assignAutomerge": true, @@ -35,86 +60,201 @@ }, { "groupName": "@elastic/elasticsearch", - "matchPackageNames": ["@elastic/elasticsearch"], - "reviewers": ["team:kibana-operations", "team:kibana-core"], - "matchBaseBranches": ["main"], - "labels": ["release_note:skip", "backport:skip", "Team:Operations", "Team:Core"], + "matchPackageNames": [ + "@elastic/elasticsearch" + ], + "reviewers": [ + "team:kibana-operations", + "team:kibana-core" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "release_note:skip", + "backport:skip", + "Team:Operations", + "Team:Core" + ], "enabled": true }, { "groupName": "@elastic/elasticsearch", - "matchPackageNames": ["@elastic/elasticsearch"], - "reviewers": ["team:kibana-operations", "team:kibana-core"], - "matchBaseBranches": ["8.1"], - "labels": ["release_note:skip", "Team:Operations", "Team:Core", "backport:skip"], + "matchPackageNames": [ + "@elastic/elasticsearch" + ], + "reviewers": [ + "team:kibana-operations", + "team:kibana-core" + ], + "matchBaseBranches": [ + "8.1" + ], + "labels": [ + "release_note:skip", + "Team:Operations", + "Team:Core", + "backport:skip" + ], "enabled": true }, { "groupName": "@elastic/elasticsearch", - "matchPackageNames": ["@elastic/elasticsearch"], - "reviewers": ["team:kibana-operations", "team:kibana-core"], - "matchBaseBranches": ["7.17"], - "labels": ["release_note:skip", "Team:Operations", "Team:Core", "backport:skip"], + "matchPackageNames": [ + "@elastic/elasticsearch" + ], + "reviewers": [ + "team:kibana-operations", + "team:kibana-core" + ], + "matchBaseBranches": [ + "7.17" + ], + "labels": [ + "release_note:skip", + "Team:Operations", + "Team:Core", + "backport:skip" + ], "enabled": true }, { "groupName": "APM", - "matchPackageNames": ["elastic-apm-node", "@elastic/apm-rum", "@elastic/apm-rum-react"], - "reviewers": ["team:kibana-core"], - "matchBaseBranches": ["main"], - "labels": ["release_note:skip", "Team:Core", "backport:skip"], + "matchPackageNames": [ + "elastic-apm-node", + "@elastic/apm-rum", + "@elastic/apm-rum-react" + ], + "reviewers": [ + "team:kibana-core" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "release_note:skip", + "Team:Core", + "backport:skip" + ], "enabled": true, "prCreation": "immediate" }, { "groupName": "babel", - "matchPackageNames": ["@types/babel__core"], - "matchPackagePatterns": ["^@babel", "^babel-plugin"], - "reviewers": ["team:kibana-operations"], - "matchBaseBranches": ["main"], - "labels": ["Team:Operations", "release_note:skip"], + "matchPackageNames": [ + "@types/babel__core" + ], + "matchPackagePatterns": [ + "^@babel", + "^babel-plugin" + ], + "reviewers": [ + "team:kibana-operations" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "Team:Operations", + "release_note:skip" + ], "enabled": true }, { "groupName": "typescript", - "matchPackageNames": ["typescript", "prettier", "@types/jsdom"], - "reviewers": ["team:kibana-operations"], - "matchBaseBranches": ["main"], - "labels": ["Team:Operations", "release_note:skip"], + "matchPackageNames": [ + "typescript", + "prettier", + "@types/jsdom" + ], + "reviewers": [ + "team:kibana-operations" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "Team:Operations", + "release_note:skip" + ], "enabled": true }, { "groupName": "typescript-eslint", - "matchPackagePatterns": ["^@typescript-eslint"], - "reviewers": ["team:kibana-operations"], - "matchBaseBranches": ["main"], - "labels": ["Team:Operations", "release_note:skip"], + "matchPackagePatterns": [ + "^@typescript-eslint" + ], + "reviewers": [ + "team:kibana-operations" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "Team:Operations", + "release_note:skip" + ], "enabled": true }, { "groupName": "polyfills", - "matchPackageNames": ["core-js"], - "matchPackagePatterns": ["polyfill"], - "reviewers": ["team:kibana-operations"], - "matchBaseBranches": ["main"], - "labels": ["Team:Operations", "release_note:skip"], + "matchPackageNames": [ + "core-js" + ], + "matchPackagePatterns": [ + "polyfill" + ], + "reviewers": [ + "team:kibana-operations" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "Team:Operations", + "release_note:skip" + ], "enabled": true }, { "groupName": "vega related modules", - "matchPackageNames": ["vega", "vega-lite", "vega-schema-url-parser", "vega-tooltip"], - "reviewers": ["team:kibana-visualizations"], - "matchBaseBranches": ["main"], - "labels": ["Feature:Vega", "Team:Visualizations"], + "matchPackageNames": [ + "vega", + "vega-lite", + "vega-schema-url-parser", + "vega-tooltip" + ], + "reviewers": [ + "team:kibana-visualizations" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "Feature:Vega", + "Team:Visualizations" + ], "enabled": true }, { "groupName": "cypress", - "matchPackageNames": ["eslint-plugin-cypress"], - "matchPackagePatterns": ["^cypress"], - "reviewers": ["Team:apm", "Team: SecuritySolution"], - "matchBaseBranches": ["main"], - "labels": ["buildkite-ci", "ci:all-cypress-suites"], + "matchPackageNames": [ + "eslint-plugin-cypress" + ], + "matchPackagePatterns": [ + "^cypress" + ], + "reviewers": [ + "Team:apm", + "Team: SecuritySolution" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "buildkite-ci", + "ci:all-cypress-suites" + ], "enabled": true }, { @@ -129,9 +269,17 @@ "xml-crypto", "@types/xml-crypto" ], - "reviewers": ["team:kibana-security"], - "matchBaseBranches": ["main"], - "labels": ["Team:Security", "release_note:skip", "backport:all-open"], + "reviewers": [ + "team:kibana-security" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "Team:Security", + "release_note:skip", + "backport:all-open" + ], "enabled": true }, { @@ -144,9 +292,16 @@ "ms-chromium-edge-driver", "selenium-webdriver" ], - "reviewers": ["team:kibana-operations"], - "matchBaseBranches": ["main"], - "labels": ["Team:Operations", "release_note:skip"], + "reviewers": [ + "team:kibana-operations" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "Team:Operations", + "release_note:skip" + ], "enabled": true }, { @@ -154,9 +309,17 @@ "packageNames": [ "node-sass" ], - "reviewers": ["team:kibana-operations"], - "matchBaseBranches": ["main"], - "labels": ["Team:Operations", "release_note:skip", "backport:all-open"], + "reviewers": [ + "team:kibana-operations" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "Team:Operations", + "release_note:skip", + "backport:all-open" + ], "enabled": true }, { @@ -165,9 +328,16 @@ "gulp-terser", "terser" ], - "reviewers": ["team:kibana-operations"], - "matchBaseBranches": ["main"], - "labels": ["Team:Operations", "release_note:skip"], + "reviewers": [ + "team:kibana-operations" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "Team:Operations", + "release_note:skip" + ], "enabled": true }, { @@ -180,9 +350,16 @@ "@testing-library/user-event", "@types/testing-library__jest-dom" ], - "reviewers": ["team:kibana-operations"], - "matchBaseBranches": ["main"], - "labels": ["Team:Operations", "release_note:skip"], + "reviewers": [ + "team:kibana-operations" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "Team:Operations", + "release_note:skip" + ], "enabled": true }, { @@ -203,22 +380,41 @@ "jest-runtime", "jest-snapshot" ], - "reviewers": ["team:kibana-operations"], - "matchBaseBranches": ["main"], - "labels": ["Team:Operations", "release_note:skip"], + "reviewers": [ + "team:kibana-operations" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "Team:Operations", + "release_note:skip" + ], "enabled": true }, { "groupName": "@storybook", - "reviewers": ["team:kibana-operations"], - "matchBaseBranches": ["main"], - "matchPackagePatterns": ["^@storybook"], - "labels": ["Team:Operations", "release_note:skip"], + "reviewers": [ + "team:kibana-operations" + ], + "matchBaseBranches": [ + "main" + ], + "matchPackagePatterns": [ + "^@storybook" + ], + "labels": [ + "Team:Operations", + "release_note:skip" + ], "enabled": true }, { "groupName": "react-query", - "packageNames": ["@tanstack/react-query", "@tanstack/react-query-devtools"], + "packageNames": [ + "@tanstack/react-query", + "@tanstack/react-query-devtools" + ], "reviewers": [ "team:response-ops", "team:kibana-cloud-security-posture", @@ -227,25 +423,42 @@ "team:awp-platform", "team:security-onboarding-and-lifecycle-mgt" ], - "matchBaseBranches": ["main"], - "labels": ["release_note:skip", "backport:skip", "ci:all-cypress-suites"], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "release_note:skip", + "backport:skip", + "ci:all-cypress-suites" + ], "enabled": true }, { "groupName": "react-hook-form", - "packageNames": ["react-hook-form"], + "packageNames": [ + "react-hook-form" + ], "reviewers": [ "team:security-asset-management", "team:uptime" ], - "matchBaseBranches": ["main"], - "labels": ["release_note:skip", "backport:skip", "ci:all-cypress-suites"], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "release_note:skip", + "backport:skip", + "ci:all-cypress-suites" + ], "enabled": true }, { "groupName": "redux", - "packageNames": ["redux", "react-redux"], - "reviewers":[ + "packageNames": [ + "redux", + "react-redux" + ], + "reviewers": [ "team:enterprise-search-frontend", "team:kibana-presentation", "team:kibana-data-discovery", @@ -254,57 +467,129 @@ "team:kibana-gis", "team:security-solution" ], - "matchBaseBranches": ["main"], - "labels": ["release_note:skip", "backport:skip", "ci:all-cypress-suites"], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "release_note:skip", + "backport:skip", + "ci:all-cypress-suites" + ], "enabled": true }, { "groupName": "Profiling", - "matchPackageNames": ["peggy", "@types/dagre"], - "reviewers": ["team:profiling-ui"], - "matchBaseBranches": ["main"], - "labels": ["release_note:skip", "backport:skip"], + "matchPackageNames": [ + "peggy", + "@types/dagre" + ], + "reviewers": [ + "team:profiling-ui" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "release_note:skip", + "backport:skip" + ], "enabled": true, "prCreation": "immediate" }, { "groupName": "TTY Output", - "matchPackageNames": ["xterm", "byte-size", "@types/byte-size"], - "reviewers": ["team:sec-cloudnative-integrations"], - "matchBaseBranches": ["main"], - "labels": ["Team: AWP: Visualization", "release_note:skip", "backport:skip"], + "matchPackageNames": [ + "xterm", + "byte-size", + "@types/byte-size" + ], + "reviewers": [ + "team:sec-cloudnative-integrations" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "Team: AWP: Visualization", + "release_note:skip", + "backport:skip" + ], "enabled": true, "prCreation": "immediate" }, { "groupName": "Cloud Defend", - "matchPackageNames": ["monaco-yaml"], - "reviewers": ["team:sec-cloudnative-integrations"], - "matchBaseBranches": ["main"], - "labels": ["Team: Cloud Native Integrations", "release_note:skip", "backport:skip"], + "matchPackageNames": [ + "monaco-yaml" + ], + "reviewers": [ + "team:sec-cloudnative-integrations" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "Team: Cloud Native Integrations", + "release_note:skip", + "backport:skip" + ], "enabled": true, "prCreation": "immediate" }, { "groupName": "JSON Web Token", - "matchPackageNames": ["jsonwebtoken"], + "matchPackageNames": [ + "jsonwebtoken" + ], "reviewers": [ "team:response-ops", "team:kibana-core" ], - "matchBaseBranches": ["main"], - "labels": ["release_note:skip", "backport:all-open"], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "release_note:skip", + "backport:all-open" + ], "enabled": true }, { "groupName": "XState", - "matchPackageNames": ["xstate"], - "matchPackagePrefixes": ["@xstate/"], - "reviewers": ["team:infra-monitoring-ui"], - "matchBaseBranches": ["main"], - "labels": ["Team:Infra Monitoring UI", "release_note:skip"], + "matchPackageNames": [ + "xstate" + ], + "matchPackagePrefixes": [ + "@xstate/" + ], + "reviewers": [ + "team:infra-monitoring-ui" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "Team:Infra Monitoring UI", + "release_note:skip" + ], "enabled": true, "prCreation": "immediate" + }, + { + "groupName": "OpenTelemetry modules", + "matchPackagePrefixes": [ + "@opentelemetry/" + ], + "reviewers": [ + "team:infra-monitoring-ui" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "Team:Infra Monitoring UI" + ], + "enabled": true } ] -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 0a81b7d2e5caf..ac8fd62ea9dcb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2050,24 +2050,24 @@ resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== -"@grpc/grpc-js@^1.5.9", "@grpc/grpc-js@^1.6.7": - version "1.6.7" - resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.6.7.tgz#4c4fa998ff719fe859ac19fe977fdef097bb99aa" - integrity sha512-eBM03pu9hd3VqDQG+kHahiG1x80RGkkqqRb1Pchcwqej/KkAH95gAvKs6laqaHCycYaPK+TKuNQnOz9UXYA8qw== +"@grpc/grpc-js@^1.6.8", "@grpc/grpc-js@^1.7.1": + version "1.8.17" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.8.17.tgz#a3a2f826fc033eae7d2f5ee41e0ab39cee948838" + integrity sha512-DGuSbtMFbaRsyffMf+VEkVu8HkSXEUfO3UyGJNtqxW9ABdtTIA+2UXAJpwbJS+xfQxuwqLUeELmL6FuZkOqPxw== dependencies: - "@grpc/proto-loader" "^0.6.4" + "@grpc/proto-loader" "^0.7.0" "@types/node" ">=12.12.47" -"@grpc/proto-loader@^0.6.4", "@grpc/proto-loader@^0.6.9": - version "0.6.13" - resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.6.13.tgz#008f989b72a40c60c96cd4088522f09b05ac66bc" - integrity sha512-FjxPYDRTn6Ec3V0arm1FtSpmP6V50wuph2yILpyvTKzjc76oDdoihXqM1DzOW5ubvCC8GivfCnNtfaRE8myJ7g== +"@grpc/proto-loader@^0.7.0", "@grpc/proto-loader@^0.7.3": + version "0.7.7" + resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.7.7.tgz#d33677a77eea8407f7c66e2abd97589b60eb4b21" + integrity sha512-1TIeXOi8TuSCQprPItwoMymZXxWT0CPxUhkrkeCUH+D8U7QDwQ6b7SUz2MaLuWM2llT+J/TVFLmQI5KtML3BhQ== dependencies: "@types/long" "^4.0.1" lodash.camelcase "^4.3.0" long "^4.0.0" - protobufjs "^6.11.3" - yargs "^16.2.0" + protobufjs "^7.0.0" + yargs "^17.7.2" "@gulp-sourcemaps/identity-map@1.X": version "1.0.2" @@ -6426,153 +6426,179 @@ "@mattiasbuelens/web-streams-adapter" "~0.1.0" web-streams-polyfill "~3.0.3" -"@opentelemetry/api-metrics@0.30.0", "@opentelemetry/api-metrics@^0.30.0": - version "0.30.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/api-metrics/-/api-metrics-0.30.0.tgz#b5defd10756e81d1c7ce8669ff8a8d2465ba0be8" - integrity sha512-jSb7iiYPY+DSUKIyzfGt0a5K1QGzWY5fSWtUB8Alfi27NhQGHBeuYYC5n9MaBP/HNWw5GpEIhXGEYCF9Pf8IEg== +"@opentelemetry/api-metrics@0.31.0", "@opentelemetry/api-metrics@^0.31.0": + version "0.31.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/api-metrics/-/api-metrics-0.31.0.tgz#0ed4cf4d7c731f968721c2b303eaf5e9fd42f736" + integrity sha512-PcL1x0kZtMie7NsNy67OyMvzLEXqf3xd0TZJKHHPMGTe89oMpNVrD1zJB1kZcwXOxLlHHb6tz21G3vvXPdXyZg== dependencies: "@opentelemetry/api" "^1.0.0" -"@opentelemetry/api@^1.0.0", "@opentelemetry/api@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.1.0.tgz#563539048255bbe1a5f4f586a4a10a1bb737f44a" - integrity sha512-hf+3bwuBwtXsugA2ULBc95qxrOqP2pOekLz34BJhcAKawt94vfeNyUKpYc0lZQ/3sCP6LqRa7UAdHA7i5UODzQ== - -"@opentelemetry/api@^1.4.1": +"@opentelemetry/api@^1.0.0", "@opentelemetry/api@^1.1.0", "@opentelemetry/api@^1.4.1": version "1.4.1" resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.4.1.tgz#ff22eb2e5d476fbc2450a196e40dd243cc20c28f" integrity sha512-O2yRJce1GOc6PAy3QxFM4NzFiWzvScDC1/5ihYBL6BUEVdq0XMWN01sppE+H6bBXbaFYipjwFLEWLg5PaSOThA== -"@opentelemetry/core@1.13.0", "@opentelemetry/core@^1.11.0": - version "1.13.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.13.0.tgz#7cdcb4176d260d279b0aa31456c4ce2ba7f410aa" - integrity sha512-2dBX3Sj99H96uwJKvc2w9NOiNgbvAO6mOFJFramNkKfS9O4Um+VWgpnlAazoYjT6kUJ1MP70KQ5ngD4ed+4NUw== - dependencies: - "@opentelemetry/semantic-conventions" "1.13.0" - -"@opentelemetry/core@1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.4.0.tgz#26839ab9e36583a174273a1e1c5b33336c163725" - integrity sha512-faq50VFEdyC7ICAOlhSi+yYZ+peznnGjTJToha9R63i9fVopzpKrkZt7AIdXUmz2+L2OqXrcJs7EIdN/oDyr5w== - dependencies: - "@opentelemetry/semantic-conventions" "1.4.0" - -"@opentelemetry/exporter-metrics-otlp-grpc@^0.30.0": - version "0.30.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/exporter-metrics-otlp-grpc/-/exporter-metrics-otlp-grpc-0.30.0.tgz#4117d07b94302ef407dc7625a1b599de308c5476" - integrity sha512-02WEAA3X7A6qveCYISr6mvg8eKl9NeNdZytQiAexzAIItW/ncN3mxmbuf8VVZHNPBe6osisSzxhPpFH3G6Gh+w== - dependencies: - "@grpc/grpc-js" "^1.5.9" - "@grpc/proto-loader" "^0.6.9" - "@opentelemetry/core" "1.4.0" - "@opentelemetry/exporter-metrics-otlp-http" "0.30.0" - "@opentelemetry/otlp-grpc-exporter-base" "0.30.0" - "@opentelemetry/otlp-transformer" "0.30.0" - "@opentelemetry/resources" "1.4.0" - "@opentelemetry/sdk-metrics-base" "0.30.0" - -"@opentelemetry/exporter-metrics-otlp-http@0.30.0": - version "0.30.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.30.0.tgz#9d87e4c3e796e14109ac83e6d4ce5bad215c2a1e" - integrity sha512-2NFR/D9jih1TtEnEyD7oIMR47yb9Kuy5v2x+Fu19vv2gTf1HOhdA+LT4SpkxH+dUixEnDw8n11XBIa/uhNfq3Q== - dependencies: - "@opentelemetry/api-metrics" "0.30.0" - "@opentelemetry/core" "1.4.0" - "@opentelemetry/otlp-exporter-base" "0.30.0" - "@opentelemetry/otlp-transformer" "0.30.0" - "@opentelemetry/resources" "1.4.0" - "@opentelemetry/sdk-metrics-base" "0.30.0" - -"@opentelemetry/exporter-prometheus@^0.30.0": - version "0.30.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.30.0.tgz#f81322d3cb000170e716bc76820600d5649be538" - integrity sha512-y0SXvpzoKR+Tk/UL6F1f7vAcCzqpCDP/cTEa+Z7sX57aEG0HDXLQiLmAgK/BHqcEN5MFQMZ+MDVDsUrvpa6/Jw== +"@opentelemetry/core@1.15.0", "@opentelemetry/core@^1.11.0": + version "1.15.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.15.0.tgz#2ba928df0443732825a72a766c2edae9a7f9863f" + integrity sha512-GGTS6BytfaN8OgbCUOnxg/a9WVsVUj0484zXHZuBzvIXx7V4Tmkb0IHnnhS7Q0cBLNLgjNuvrCpQaP8fIvO4bg== dependencies: - "@opentelemetry/api-metrics" "0.30.0" - "@opentelemetry/core" "1.4.0" - "@opentelemetry/sdk-metrics-base" "0.30.0" + "@opentelemetry/semantic-conventions" "1.15.0" + tslib "^2.3.1" -"@opentelemetry/otlp-exporter-base@0.30.0": - version "0.30.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.30.0.tgz#5f278b3529d38311dbdfc1ebcb764f5e5126e548" - integrity sha512-+dJnj2MSd3tsk+ooEw+0bF+dJs/NjGEVnCB3/FYxnUFaW9cCBbQQyt6X3YQYtYrEx4EEiTlwrW8pUpB1tsup7A== +"@opentelemetry/core@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.5.0.tgz#717bceee15d4c69d4c7321c1fe0f5a562b60eb81" + integrity sha512-B3DIMkQN0DANrr7XrMLS4pR6d2o/jqT09x4nZJz6wSJ9SHr4eQIqeFBNeEUQG1I+AuOcH2UbJtgFm7fKxLqd+w== dependencies: - "@opentelemetry/core" "1.4.0" + "@opentelemetry/semantic-conventions" "1.5.0" -"@opentelemetry/otlp-grpc-exporter-base@0.30.0": - version "0.30.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.30.0.tgz#3fa07667ddf604a028583a2a138b8b4ba8fa9bb0" - integrity sha512-86fuhZ7Z2un3L5Kd7jbH1oEn92v9DD92teErnYRXqYB/qyO61OLxaY6WxH9KOjmbs5CgCdLQ5bvED3wWDe3r7w== +"@opentelemetry/core@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.8.0.tgz#cca18594dd48ded6dc0d08c7e789c79af0315934" + integrity sha512-6SDjwBML4Am0AQmy7z1j6HGrWDgeK8awBRUvl1PGw6HayViMk4QpnUXvv4HTHisecgVBy43NE/cstWprm8tIfw== + dependencies: + "@opentelemetry/semantic-conventions" "1.8.0" + +"@opentelemetry/exporter-metrics-otlp-grpc@^0.34.0": + version "0.34.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/exporter-metrics-otlp-grpc/-/exporter-metrics-otlp-grpc-0.34.0.tgz#3a84f4e2c21ce5c9dce507ff36715cc2536bfa87" + integrity sha512-9INc1TBJ7OwpMsImqUjpPEvQeRyyU9tEiFQIYQ53kKQK7V8MqB5koyDeb5/qBSbNu4ZxSpukAOLPgBOEMDK6Qw== + dependencies: + "@grpc/grpc-js" "^1.7.1" + "@opentelemetry/core" "1.8.0" + "@opentelemetry/exporter-metrics-otlp-http" "0.34.0" + "@opentelemetry/otlp-grpc-exporter-base" "0.34.0" + "@opentelemetry/otlp-transformer" "0.34.0" + "@opentelemetry/resources" "1.8.0" + "@opentelemetry/sdk-metrics" "1.8.0" + +"@opentelemetry/exporter-metrics-otlp-http@0.34.0": + version "0.34.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.34.0.tgz#f890a83f695b60719e54492e72bcbfa21d2968ee" + integrity sha512-ToRJA4frErHGiKKnPCI3+cvdyK8rksRI+mV6xZ6Yt7HiIrArY9eDX7QaCEZcTLbQIib09LTlCX87TKEL3TToWQ== + dependencies: + "@opentelemetry/core" "1.8.0" + "@opentelemetry/otlp-exporter-base" "0.34.0" + "@opentelemetry/otlp-transformer" "0.34.0" + "@opentelemetry/resources" "1.8.0" + "@opentelemetry/sdk-metrics" "1.8.0" + +"@opentelemetry/exporter-prometheus@^0.31.0": + version "0.31.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.31.0.tgz#b0696be42542a961ec1145f3754a845efbda942e" + integrity sha512-EfWFzoCu/THw0kZiaA2RUrk6XIQbfaJHJ26LRrVIK7INwosW8Q+x4pGfiJ5nxhglYiG9OTqGrQ6nQ4T9q1UMpg== + dependencies: + "@opentelemetry/api-metrics" "0.31.0" + "@opentelemetry/core" "1.5.0" + "@opentelemetry/sdk-metrics-base" "0.31.0" + +"@opentelemetry/otlp-exporter-base@0.34.0": + version "0.34.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.34.0.tgz#c6020b63590d4b8ac3833eda345a6f582fa014b1" + integrity sha512-xVNvQm7oXeQogeI21iTZRnBrBYS0OVekPutEJgb7jQtHg7x2GWuCBQK9sDo84FRWNXBpNOgSYqsf8/+PxIJ2vA== + dependencies: + "@opentelemetry/core" "1.8.0" + +"@opentelemetry/otlp-grpc-exporter-base@0.34.0": + version "0.34.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.34.0.tgz#edc3a9d8449f48e47c63c2f73e2c63c5a2f25102" + integrity sha512-8k3CIVjf2+/kmnQNKIR8GtPIfRsQ5ZxBVh3uKof54stVXH/nX5ArceuQaoEfFoFQ8S8wayBZ1QsBwdab65UK0g== + dependencies: + "@grpc/grpc-js" "^1.7.1" + "@grpc/proto-loader" "^0.7.3" + "@opentelemetry/core" "1.8.0" + "@opentelemetry/otlp-exporter-base" "0.34.0" + +"@opentelemetry/otlp-transformer@0.34.0": + version "0.34.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-transformer/-/otlp-transformer-0.34.0.tgz#71023706233c7bc6c3cdcf954c749fea9338084c" + integrity sha512-NghPJvn3pVoWBuhWyBe1n/nWIrj1D1EFUH/bIkWEp0CMVWFLux6R+BkRPZQo5klTcj8xFhCZZIZsL/ubkYPryg== + dependencies: + "@opentelemetry/core" "1.8.0" + "@opentelemetry/resources" "1.8.0" + "@opentelemetry/sdk-metrics" "1.8.0" + "@opentelemetry/sdk-trace-base" "1.8.0" + +"@opentelemetry/resources@1.15.0", "@opentelemetry/resources@^1.4.0": + version "1.15.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.15.0.tgz#748a6ae9017636b8b30f5dee1fff3e166e51f63d" + integrity sha512-Sb8A6ZXHXDlgHv32UNRE3y8McWE3vkb5dsSttYArYa5ZpwjiF5ge0vnnKUUnG7bY0AgF9VBIOORZE8gsrnD2WA== dependencies: - "@grpc/grpc-js" "^1.5.9" - "@grpc/proto-loader" "^0.6.9" - "@opentelemetry/core" "1.4.0" - "@opentelemetry/otlp-exporter-base" "0.30.0" + "@opentelemetry/core" "1.15.0" + "@opentelemetry/semantic-conventions" "1.15.0" + tslib "^2.3.1" -"@opentelemetry/otlp-transformer@0.30.0": - version "0.30.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-transformer/-/otlp-transformer-0.30.0.tgz#d81e1ae68dfb31d66cd4ca03ca965cdaa2e2b288" - integrity sha512-BTLXyBPBlCQCG4tXYZjlso4pT+gGpnTjzkFYTPYs52fO5DMWvYHlV8ST/raOIqX7wsamiH2zeqJ9W91017MtdA== +"@opentelemetry/resources@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.5.0.tgz#ce7fbdaec3494e41bc279ddbed3c478ee2570b03" + integrity sha512-YeEfC6IY54U3xL3P2+UAiom+r50ZF2jM0J47RV5uTFGF19Xjd5zazSwDPgmxtAd6DwLX0/5S5iqrsH4nEXMYoA== dependencies: - "@opentelemetry/api-metrics" "0.30.0" - "@opentelemetry/core" "1.4.0" - "@opentelemetry/resources" "1.4.0" - "@opentelemetry/sdk-metrics-base" "0.30.0" - "@opentelemetry/sdk-trace-base" "1.4.0" + "@opentelemetry/core" "1.5.0" + "@opentelemetry/semantic-conventions" "1.5.0" -"@opentelemetry/resources@1.13.0": - version "1.13.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.13.0.tgz#436b33ea950004e66fce6575f2776a05faca7f8e" - integrity sha512-euqjOkiN6xhjE//0vQYGvbStxoD/WWQRhDiO0OTLlnLBO9Yw2Gd/VoSx2H+svsebjzYk5OxLuREBmcdw6rbUNg== +"@opentelemetry/resources@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.8.0.tgz#260be9742cf7bceccc0db928d8ca8d64391acfe3" + integrity sha512-KSyMH6Jvss/PFDy16z5qkCK0ERlpyqixb1xwb73wLMvVq+j7i89lobDjw3JkpCcd1Ws0J6jAI4fw28Zufj2ssg== dependencies: - "@opentelemetry/core" "1.13.0" - "@opentelemetry/semantic-conventions" "1.13.0" + "@opentelemetry/core" "1.8.0" + "@opentelemetry/semantic-conventions" "1.8.0" -"@opentelemetry/resources@1.4.0", "@opentelemetry/resources@^1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.4.0.tgz#5e23b0d7976158861059dec17e0ee36a35a5ab85" - integrity sha512-Q3pI5+pCM+Ur7YwK9GbG89UBipwJbfmuzSPAXTw964ZHFzSrz+JAgrETC9rqsUOYdUlj/V7LbRMG5bo72xE0Xw== +"@opentelemetry/sdk-metrics-base@0.31.0", "@opentelemetry/sdk-metrics-base@^0.31.0": + version "0.31.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.31.0.tgz#f797da702c8d9862a2fff55a1e7c70aa6845e535" + integrity sha512-4R2Bjl3wlqIGcq4bCoI9/pD49ld+tEoM9n85UfFzr/aUe+2huY2jTPq/BP9SVB8d2Zfg7mGTIFeapcEvAdKK7g== dependencies: - "@opentelemetry/core" "1.4.0" - "@opentelemetry/semantic-conventions" "1.4.0" + "@opentelemetry/api-metrics" "0.31.0" + "@opentelemetry/core" "1.5.0" + "@opentelemetry/resources" "1.5.0" + lodash.merge "4.6.2" -"@opentelemetry/sdk-metrics-base@0.30.0", "@opentelemetry/sdk-metrics-base@^0.30.0": - version "0.30.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.30.0.tgz#242d9260a89a1ac2bf1e167b3fda758f3883c769" - integrity sha512-3BDg1MYDInDyGvy+bSH8OuCX5nsue7omH6Y2eidCGTTDYRPxDmq9tsRJxnTUepoMAvWX+1sTwZ4JqTFmc1z8Mw== +"@opentelemetry/sdk-metrics@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-metrics/-/sdk-metrics-1.8.0.tgz#d061060f03861ab3f345d0f924922bc1a6396157" + integrity sha512-+KYb+uj0vHhl8xzJO+oChS4oP1e+/2Wl3SXoHoIdcEjd1TQfDV+lxOm4oqxWq6wykXvI35/JHyejxSoT+qxGmg== dependencies: - "@opentelemetry/api-metrics" "0.30.0" - "@opentelemetry/core" "1.4.0" - "@opentelemetry/resources" "1.4.0" + "@opentelemetry/core" "1.8.0" + "@opentelemetry/resources" "1.8.0" lodash.merge "4.6.2" "@opentelemetry/sdk-metrics@^1.12.0": - version "1.13.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-metrics/-/sdk-metrics-1.13.0.tgz#4e859107a7a4389bcda7b37d3952bc7dd34211d7" - integrity sha512-MOjZX6AnSOqLliCcZUrb+DQKjAWXBiGeICGbHAGe5w0BB18PJIeIo995lO5JSaFfHpmUMgJButTPfJJD27W3Vg== + version "1.15.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-metrics/-/sdk-metrics-1.15.0.tgz#e47ad688882fc2daedcbbe3db16a5c110feb23e8" + integrity sha512-fFUnAcPvlXO39nlIduGuaeCuiZyFtSLCn9gW/0djFRO5DFst4m4gcT6+llXvNWuUvtGB49s56NP10B9IZRN0Rw== dependencies: - "@opentelemetry/core" "1.13.0" - "@opentelemetry/resources" "1.13.0" - lodash.merge "4.6.2" + "@opentelemetry/core" "1.15.0" + "@opentelemetry/resources" "1.15.0" + lodash.merge "^4.6.2" + tslib "^2.3.1" -"@opentelemetry/sdk-trace-base@1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.4.0.tgz#e54d09c1258cd53d3fe726053ed1cbda9d74f023" - integrity sha512-l7EEjcOgYlKWK0hfxz4Jtkkk2DuGiqBDWmRZf7g2Is9RVneF1IgcrbYZTKGaVfBKA7lPuVtUiQ2qTv3R+dKJrw== +"@opentelemetry/sdk-trace-base@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.8.0.tgz#70713aab90978a16dea188c8335209f857be7384" + integrity sha512-iH41m0UTddnCKJzZx3M85vlhKzRcmT48pUeBbnzsGrq4nIay1oWVHKM5nhB5r8qRDGvd/n7f/YLCXClxwM0tvA== dependencies: - "@opentelemetry/core" "1.4.0" - "@opentelemetry/resources" "1.4.0" - "@opentelemetry/semantic-conventions" "1.4.0" + "@opentelemetry/core" "1.8.0" + "@opentelemetry/resources" "1.8.0" + "@opentelemetry/semantic-conventions" "1.8.0" -"@opentelemetry/semantic-conventions@1.13.0": - version "1.13.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.13.0.tgz#0290398b3eaebc6029c348988a78c3b688fe9219" - integrity sha512-LMGqfSZkaMQXqewO0o1wvWr/2fQdCh4a3Sqlxka/UsJCe0cfLulh6x2aqnKLnsrSGiCq5rSCwvINd152i0nCqw== +"@opentelemetry/semantic-conventions@1.15.0", "@opentelemetry/semantic-conventions@^1.4.0": + version "1.15.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.0.tgz#e6173daa5fd61f353b02c858001388bf26e9d059" + integrity sha512-f3wwFrFyCpGrFBrFs7lCUJSCSCGyeKG52c+EKeobs3Dd29M75yO6GYkt6PkYPfDawxSlV5p+4yJPPk8tPObzTQ== + dependencies: + tslib "^2.3.1" -"@opentelemetry/semantic-conventions@1.4.0", "@opentelemetry/semantic-conventions@^1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.4.0.tgz#facf2c67d6063b9918d5a5e3fdf25f3a30d547b6" - integrity sha512-Hzl8soGpmyzja9w3kiFFcYJ7n5HNETpplY6cb67KR4QPlxp4FTTresO06qXHgHDhyIInmbLJXuwARjjpsKYGuQ== +"@opentelemetry/semantic-conventions@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.5.0.tgz#cea9792bfcf556c87ded17c6ac729348697bb632" + integrity sha512-wlYG/U6ddW1ilXslnDLLQYJ8nd97W8JJTTfwkGhubx6dzW6SUkd+N4/MzTjjyZlrHQunxHtkHFvVpUKiROvFDw== + +"@opentelemetry/semantic-conventions@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.8.0.tgz#fe2aa90e6df050a11cd57f5c0f47b0641fd2cad3" + integrity sha512-TYh1MRcm4JnvpqtqOwT9WYaBYY4KERHdToxs/suDTLviGRsQkIjS5yYROTYTSJQUnYLOn/TuOh5GoMwfLSU+Ew== "@parcel/watcher@^2.1.0": version "2.1.0" @@ -20627,6 +20653,11 @@ long@^4.0.0: resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== +long@^5.0.0: + version "5.2.3" + resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" + integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== + long@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/long/-/long-5.2.0.tgz#2696dadf4b4da2ce3f6f6b89186085d94d52fd61" @@ -23941,10 +23972,10 @@ protobufjs@6.8.8: "@types/node" "^10.1.0" long "^4.0.0" -protobufjs@^6.11.3: - version "6.11.3" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.3.tgz#637a527205a35caa4f3e2a9a4a13ddffe0e7af74" - integrity sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg== +protobufjs@^7.0.0: + version "7.2.4" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.4.tgz#3fc1ec0cdc89dd91aef9ba6037ba07408485c3ae" + integrity sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ== dependencies: "@protobufjs/aspromise" "^1.1.2" "@protobufjs/base64" "^1.1.2" @@ -23956,9 +23987,8 @@ protobufjs@^6.11.3: "@protobufjs/path" "^1.1.2" "@protobufjs/pool" "^1.1.0" "@protobufjs/utf8" "^1.1.0" - "@types/long" "^4.0.1" "@types/node" ">=13.7.0" - long "^4.0.0" + long "^5.0.0" protocol-buffers-schema@^3.3.1: version "3.3.2" @@ -30056,7 +30086,7 @@ yargs-unparser@2.0.0: flat "^5.0.2" is-plain-obj "^2.1.0" -yargs@16.2.0, yargs@^16.2.0: +yargs@16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== @@ -30099,7 +30129,7 @@ yargs@^15.0.2, yargs@^15.3.1, yargs@^15.4.1: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^17.2.1, yargs@^17.3.1, yargs@^17.4.0, yargs@^17.6.0: +yargs@^17.2.1, yargs@^17.3.1, yargs@^17.4.0, yargs@^17.6.0, yargs@^17.7.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== From b534349e8d3f798be9b77783ca26b02d7d358f08 Mon Sep 17 00:00:00 2001 From: Kevin Delemme Date: Thu, 13 Jul 2023 09:16:21 -0400 Subject: [PATCH 05/21] fix(slo): APM transaction error rate calculation (#161800) --- .../server/services/slo/get_preview_data.ts | 14 ++- .../apm_transaction_error_rate.test.ts.snap | 86 ++++++------------- .../apm_transaction_error_rate.ts | 10 +-- 3 files changed, 35 insertions(+), 75 deletions(-) diff --git a/x-pack/plugins/observability/server/services/slo/get_preview_data.ts b/x-pack/plugins/observability/server/services/slo/get_preview_data.ts index e529028a22a9e..7928747720537 100644 --- a/x-pack/plugins/observability/server/services/slo/get_preview_data.ts +++ b/x-pack/plugins/observability/server/services/slo/get_preview_data.ts @@ -104,7 +104,7 @@ export class GetPreviewData { })); } - private async getAPMTranscationErrorPreviewData( + private async getAPMTransactionErrorPreviewData( indicator: APMTransactionErrorRateIndicator ): Promise { const filter = []; @@ -133,10 +133,8 @@ export class GetPreviewData { bool: { filter: [ { range: { '@timestamp': { gte: 'now-60m' } } }, - { terms: { 'processor.event': ['metric'] } }, { term: { 'metricset.name': 'transaction' } }, - { exists: { field: 'transaction.duration.histogram' } }, - { exists: { field: 'transaction.result' } }, + { terms: { 'event.outcome': ['success', 'failure'] } }, ...filter, ], }, @@ -160,8 +158,8 @@ export class GetPreviewData { }, }, total: { - value_count: { - field: 'transaction.duration.histogram', + filter: { + match_all: {}, }, }, }, @@ -174,7 +172,7 @@ export class GetPreviewData { date: bucket.key_as_string, sliValue: !!bucket.good && !!bucket.total - ? computeSLI(bucket.good.doc_count, bucket.total.value) + ? computeSLI(bucket.good.doc_count, bucket.total.doc_count) : null, })); } @@ -305,7 +303,7 @@ export class GetPreviewData { case 'sli.apm.transactionDuration': return this.getAPMTransactionDurationPreviewData(params.indicator); case 'sli.apm.transactionErrorRate': - return this.getAPMTranscationErrorPreviewData(params.indicator); + return this.getAPMTransactionErrorPreviewData(params.indicator); case 'sli.kql.custom': return this.getCustomKQLPreviewData(params.indicator); case 'sli.histogram.custom': diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_error_rate.test.ts.snap b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_error_rate.test.ts.snap index c36e5a6130a31..eb5ae7388d0e9 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_error_rate.test.ts.snap +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_error_rate.test.ts.snap @@ -4,26 +4,17 @@ exports[`APM Transaction Error Rate Transform Generator adds the custom kql filt Object { "bool": Object { "filter": Array [ - Object { - "terms": Object { - "processor.event": Array [ - "metric", - ], - }, - }, Object { "term": Object { "metricset.name": "transaction", }, }, Object { - "exists": Object { - "field": "transaction.duration.histogram", - }, - }, - Object { - "exists": Object { - "field": "transaction.result", + "terms": Object { + "event.outcome": Array [ + "success", + "failure", + ], }, }, Object { @@ -115,26 +106,17 @@ exports[`APM Transaction Error Rate Transform Generator does not include the que Object { "bool": Object { "filter": Array [ - Object { - "terms": Object { - "processor.event": Array [ - "metric", - ], - }, - }, Object { "term": Object { "metricset.name": "transaction", }, }, Object { - "exists": Object { - "field": "transaction.duration.histogram", - }, - }, - Object { - "exists": Object { - "field": "transaction.result", + "terms": Object { + "event.outcome": Array [ + "success", + "failure", + ], }, }, Object { @@ -165,15 +147,15 @@ Object { "pivot": Object { "aggregations": Object { "slo.denominator": Object { - "value_count": Object { - "field": "transaction.duration.histogram", + "filter": Object { + "match_all": Object {}, }, }, "slo.isGoodSlice": Object { "bucket_script": Object { "buckets_path": Object { "goodEvents": "slo.numerator>_count", - "totalEvents": "slo.denominator.value", + "totalEvents": "slo.denominator>_count", }, "script": "params.goodEvents / params.totalEvents >= 0.95 ? 1 : 0", }, @@ -217,26 +199,17 @@ Object { "query": Object { "bool": Object { "filter": Array [ - Object { - "terms": Object { - "processor.event": Array [ - "metric", - ], - }, - }, Object { "term": Object { "metricset.name": "transaction", }, }, Object { - "exists": Object { - "field": "transaction.duration.histogram", - }, - }, - Object { - "exists": Object { - "field": "transaction.result", + "terms": Object { + "event.outcome": Array [ + "success", + "failure", + ], }, }, Object { @@ -310,8 +283,8 @@ Object { "pivot": Object { "aggregations": Object { "slo.denominator": Object { - "value_count": Object { - "field": "transaction.duration.histogram", + "filter": Object { + "match_all": Object {}, }, }, "slo.numerator": Object { @@ -353,26 +326,17 @@ Object { "query": Object { "bool": Object { "filter": Array [ - Object { - "terms": Object { - "processor.event": Array [ - "metric", - ], - }, - }, Object { "term": Object { "metricset.name": "transaction", }, }, Object { - "exists": Object { - "field": "transaction.duration.histogram", - }, - }, - Object { - "exists": Object { - "field": "transaction.result", + "terms": Object { + "event.outcome": Array [ + "success", + "failure", + ], }, }, Object { diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_error_rate.ts b/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_error_rate.ts index b3dd2b978c02b..d2ba911436096 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_error_rate.ts +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_error_rate.ts @@ -98,10 +98,8 @@ export class ApmTransactionErrorRateTransformGenerator extends TransformGenerato query: { bool: { filter: [ - { terms: { 'processor.event': ['metric'] } }, { term: { 'metricset.name': 'transaction' } }, - { exists: { field: 'transaction.duration.histogram' } }, - { exists: { field: 'transaction.result' } }, + { terms: { 'event.outcome': ['success', 'failure'] } }, ...queryFilter, ], }, @@ -130,8 +128,8 @@ export class ApmTransactionErrorRateTransformGenerator extends TransformGenerato }, }, 'slo.denominator': { - value_count: { - field: 'transaction.duration.histogram', + filter: { + match_all: {}, }, }, ...(timeslicesBudgetingMethodSchema.is(slo.budgetingMethod) && { @@ -139,7 +137,7 @@ export class ApmTransactionErrorRateTransformGenerator extends TransformGenerato bucket_script: { buckets_path: { goodEvents: 'slo.numerator>_count', - totalEvents: 'slo.denominator.value', + totalEvents: 'slo.denominator>_count', }, script: `params.goodEvents / params.totalEvents >= ${slo.objective.timesliceTarget} ? 1 : 0`, }, From b1d619617a0321617636c7c1bbcbf74e393a5d9e Mon Sep 17 00:00:00 2001 From: Stef Nestor <26751266+stefnestor@users.noreply.github.com> Date: Thu, 13 Jul 2023 08:22:55 -0500 Subject: [PATCH 06/21] [DOCv2] Temporarily disable Kibana Rules (#126869) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 👋🏼 @gchaps asked me to file a new PR since my last https://github.com/elastic/kibana/pull/122573 got too far behind. ## Summary 🙏🏼 per #116017, adds insight on how to temporarily disable Kibana Rules for clusters which need breathing room. --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Lisa Cawley --- .../alerting-troubleshooting.asciidoc | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/user/alerting/alerting-troubleshooting.asciidoc b/docs/user/alerting/alerting-troubleshooting.asciidoc index 34a97b3eb5903..88b553c9064c1 100644 --- a/docs/user/alerting/alerting-troubleshooting.asciidoc +++ b/docs/user/alerting/alerting-troubleshooting.asciidoc @@ -189,12 +189,30 @@ In addition to the above methods, refer to the following approaches and common i * <> * <> +[discrete] +[[alerting-kibana-throttle]] +==== Temporarily throttle all tasks + +If cluster performance becomes degraded from excessive or expensive rules and {kib} is sluggish or unresponsive, you can temporarily reduce load to the Task Manager by updating its <>: + +[source,txt] +-------------------------------------------------- +xpack.task_manager.max_workers: 1 +xpack.task_manager.poll_interval: 1h +-------------------------------------------------- + +[WARNING] +==== +This approach should be used only temporarily as a last resort to restore function to {kib} when it is unresponsive and attempts to identify and <> slow-running rules have not fixed the situation. +It severely throttles all background tasks, not just those relating to {alert-features}. The task manager will run only one task at a time and will look for more work each hour. +==== + [discrete] [[alerting-limitations]] === Limitations The following limitations and known problems apply to the {version} release of -the {kib} {alert-features}. +the {kib} {alert-features}: [discrete] ==== Alert visibility @@ -208,3 +226,4 @@ the `consumer` property. include::troubleshooting/alerting-common-issues.asciidoc[] include::troubleshooting/event-log-index.asciidoc[] include::troubleshooting/testing-connectors.asciidoc[] + From 8175c8a95d053cdcad6c8cf61dd767f90b797c58 Mon Sep 17 00:00:00 2001 From: Sean Story Date: Thu, 13 Jul 2023 08:25:10 -0500 Subject: [PATCH 07/21] remove native config for selecting fetch strategy (#161798) ## Summary Part of https://github.com/elastic/enterprise-search-team/issues/5162 Effectively reverting https://github.com/elastic/kibana/pull/161546, as the new strategy has completely replaced the old. See also: https://github.com/elastic/connectors-python/pull/1255 ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --- .../common/connectors/native_connectors.ts | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/x-pack/plugins/enterprise_search/common/connectors/native_connectors.ts b/x-pack/plugins/enterprise_search/common/connectors/native_connectors.ts index 184c9ff233ed4..53afe0ff6b74c 100644 --- a/x-pack/plugins/enterprise_search/common/connectors/native_connectors.ts +++ b/x-pack/plugins/enterprise_search/common/connectors/native_connectors.ts @@ -1652,32 +1652,6 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record Date: Thu, 13 Jul 2023 15:31:08 +0200 Subject: [PATCH 08/21] [SharedUxChromeNavigation] Set iconSize for the nav group to medium (#161632) ## Summary The default iconsSize is large which is too big. According to mockups the icon should be 16px ### Before ![Screenshot 2023-07-11 at 11 47 13](https://github.com/elastic/kibana/assets/3369346/e07b66fe-f6a3-4a8a-b210-c05af8fe1e89) ![Screenshot 2023-07-11 at 12 08 23](https://github.com/elastic/kibana/assets/3369346/5120ea1a-bf31-4c36-a5e9-fac919c6c154) ### After ![Screenshot 2023-07-11 at 11 48 19](https://github.com/elastic/kibana/assets/3369346/3fbaa4ce-1ee8-44a2-a4a9-877fac242a70) ![Screenshot 2023-07-11 at 12 08 57](https://github.com/elastic/kibana/assets/3369346/493f688a-7ade-45a7-8206-ca8e30eb3455) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../navigation/src/ui/components/navigation_section_ui.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/shared-ux/chrome/navigation/src/ui/components/navigation_section_ui.tsx b/packages/shared-ux/chrome/navigation/src/ui/components/navigation_section_ui.tsx index 12a4605d4837a..06be447ba2a65 100644 --- a/packages/shared-ux/chrome/navigation/src/ui/components/navigation_section_ui.tsx +++ b/packages/shared-ux/chrome/navigation/src/ui/components/navigation_section_ui.tsx @@ -124,6 +124,7 @@ export const NavigationSectionUI: FC = ({ navNode, items = [] }) => { id={id} title={title} iconType={icon} + iconSize={'m'} isCollapsible={true} initialIsOpen={isActive} onToggle={(isOpen) => { From 9d76fe3027c6c38fb3bd91cb281c16f49881c330 Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Thu, 13 Jul 2023 16:38:27 +0300 Subject: [PATCH 09/21] Fixes wrong safe guard (#161843) ## Summary Closes https://github.com/elastic/kibana/issues/161358 --- .../public/components/heatmap_component.tsx | 4 ++-- src/plugins/charts/public/services/palettes/helpers.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.tsx b/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.tsx index 94d8b582d02c6..ab70211361e46 100644 --- a/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.tsx +++ b/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.tsx @@ -95,8 +95,8 @@ function shiftAndNormalizeStops( if (params.range === 'percent') { result = min + ((max - min) * value) / 100; } - // for a range of 1 value the formulas above will divide by 0, so here's a safety guard - if (Number.isNaN(result)) { + // a division by zero safeguard + if (!Number.isFinite(result)) { return 1; } return Number(result.toFixed(2)); diff --git a/src/plugins/charts/public/services/palettes/helpers.ts b/src/plugins/charts/public/services/palettes/helpers.ts index 7f687780c5dd4..22631822c4b02 100644 --- a/src/plugins/charts/public/services/palettes/helpers.ts +++ b/src/plugins/charts/public/services/palettes/helpers.ts @@ -54,8 +54,8 @@ function getNormalizedValueByRange( if (range === 'percent') { result = (100 * (value - minMax.min)) / (minMax.max - minMax.min); - // for a range of 1 value the formulas above will divide by 0, so here's a safety guard - if (Number.isNaN(result)) { + // a division by zero safeguard is required if the range above has equal boundaries + if (!Number.isFinite(result)) { return rangeMin; } } From 3c46440e94ad8ceba433cb8eee607fa9e8ef0d9c Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Thu, 13 Jul 2023 16:38:41 +0300 Subject: [PATCH 10/21] [TSVB] Removes unused type (#161844) ## Summary Closes https://github.com/elastic/kibana/issues/161019 Cleanups unused type --- src/plugins/vis_types/timeseries/common/types/panel_model.ts | 1 - .../timeseries/public/convert_to_lens/lib/__mocks__/index.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/src/plugins/vis_types/timeseries/common/types/panel_model.ts b/src/plugins/vis_types/timeseries/common/types/panel_model.ts index cddf9188b2ce3..a61d50f306862 100644 --- a/src/plugins/vis_types/timeseries/common/types/panel_model.ts +++ b/src/plugins/vis_types/timeseries/common/types/panel_model.ts @@ -102,7 +102,6 @@ export interface Series { }; point_size?: number; separate_axis: number; - seperate_axis: number; series_drop_last_bucket: number; series_index_pattern: IndexPatternValue; series_interval?: string; diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/__mocks__/index.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/__mocks__/index.ts index d1cf412ade45c..3ed242d2bcdcb 100644 --- a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/__mocks__/index.ts +++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/__mocks__/index.ts @@ -28,7 +28,6 @@ export const createSeries = (partialSeries?: Partial): Series => ({ stacked: 'none', time_range_mode: 'entire_time_range', value_template: '{{value}}', - seperate_axis: 0, series_index_pattern: { id: 'test' }, series_max_bars: 0, steps: 0, From 61590efbdca8bd0daed457cbf1668f1643341ade Mon Sep 17 00:00:00 2001 From: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com> Date: Thu, 13 Jul 2023 10:03:58 -0400 Subject: [PATCH 11/21] [backport] [main] [161313] Adding 161249 to known issues for 8.8.x (#161762) Manual backport of #161313 to main (my second ever forward-port) Co-authored-by: Pius --- docs/CHANGELOG.asciidoc | 83 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/docs/CHANGELOG.asciidoc b/docs/CHANGELOG.asciidoc index 52674816fbcaa..156a8f0254dd3 100644 --- a/docs/CHANGELOG.asciidoc +++ b/docs/CHANGELOG.asciidoc @@ -49,6 +49,36 @@ Review important information about the {kib} 8.x releases. Review the following information about the {kib} 8.8.2 release. +[float] +[[known-issues-8.8.2]] +=== Known issues + +// tag::known-issue-161249[] +[discrete] +.Kibana can run out of memory during an upgrade when there are many {fleet} agent policies. +[%collapsible] +==== +*Details* + +Due to a schema version update, during {fleet} setup in 8.8.x, all agent policies are being queried and deployed. +This action triggers a lot of queries to the Elastic Package Registry (EPR) to fetch integration packages. As a result, +there is an increase in Kibana's resident memory usage (RSS). + +*Impact* + +Because the default batch size of `100` for schema version upgrade of {fleet} agent policies is too high, this can +cause Kibana to run out of memory during an upgrade. For example, we have observed 1GB Kibana instances run +out of memory during an upgrade when there were 20 agent policies with 5 integrations in each. + +*Workaround* + +Two workaround options are available: + +* Increase the Kibana instance size to 2GB. So far, we are not able to reproduce the issue with 2GB instances. +* Set `xpack.fleet.setup.agentPolicySchemaUpgradeBatchSize` to `2` in the `kibana.yml` and restart the Kibana instance(s). + +In 8.9.0, we are addressing this by changing the default batch size to `2`. + +==== +// end::known-issue-161249[] + [float] [[fixes-v8.8.2]] === Bug Fixes @@ -106,6 +136,32 @@ Review the following information about the {kib} 8.8.1 release. [[known-issues-8.8.1]] === Known issues +// tag::known-issue-161249[] +[discrete] +.Kibana can run out of memory during an upgrade when there are many {fleet} agent policies. +[%collapsible] +==== +*Details* + +Due to a schema version update, during {fleet} setup in 8.8.x, all agent policies are being queried and deployed. +This action triggers a lot of queries to the Elastic Package Registry (EPR) to fetch integration packages. As a result, +there is an increase in Kibana's resident memory usage (RSS). + +*Impact* + +Because the default batch size of `100` for schema version upgrade of {fleet} agent policies is too high, this can +cause Kibana to run out of memory during an upgrade. For example, we have observed 1GB Kibana instances run +out of memory during an upgrade when there were 20 agent policies with 5 integrations in each. + +*Workaround* + +Two workaround options are available: + +* Increase the Kibana instance size to 2GB. So far, we are not able to reproduce the issue with 2GB instances. +* Set `xpack.fleet.setup.agentPolicySchemaUpgradeBatchSize` to `2` in the `kibana.yml` and restart the Kibana instance(s). + +In 8.9.0, we are addressing this by changing the default batch size to `2`. + +==== +// end::known-issue-161249[] + // tag::known-issue-159807[] [discrete] .Memory leak in {fleet} audit logging. @@ -198,6 +254,32 @@ Review the following information about the {kib} 8.8.0 release. [[known-issues-8.8.0]] === Known issues +// tag::known-issue-161249[] +[discrete] +.Kibana can run out of memory during an upgrade when there are many {fleet} agent policies. +[%collapsible] +==== +*Details* + +Due to a schema version update, during {fleet} setup in 8.8.x, all agent policies are being queried and deployed. +This action triggers a lot of queries to the Elastic Package Registry (EPR) to fetch integration packages. As a result, +there is an increase in Kibana's resident memory usage (RSS). + +*Impact* + +Because the default batch size of `100` for schema version upgrade of {fleet} agent policies is too high, this can +cause Kibana to run out of memory during an upgrade. For example, we have observed 1GB Kibana instances run +out of memory during an upgrade when there were 20 agent policies with 5 integrations in each. + +*Workaround* + +Two workaround options are available: + +* Increase the Kibana instance size to 2GB. So far, we are not able to reproduce the issue with 2GB instances. +* Set `xpack.fleet.setup.agentPolicySchemaUpgradeBatchSize` to `2` in the `kibana.yml` and restart the Kibana instance(s). + +In 8.9.0, we are addressing this by changing the default batch size to `2`. + +==== +// end::known-issue-161249[] + // tag::known-issue-158940[] [discrete] .Failed upgrades to 8.8.0 can cause bootlooping and data loss @@ -221,6 +303,7 @@ The 8.8.1 release includes in {kibana-pull}158940[a fix] for this problem. Custo *Details* + {fleet} introduced audit logging for various CRUD (create, read, update, and delete) operations in version 8.8.0. While audit logging is not enabled by default, we have identified an off-heap memory leak in the implementation of {fleet} audit logging that can result in poor {kib} performance, and in some cases {kib} instances being terminated by the OS kernel's oom-killer. This memory leak can occur even when {kib} audit logging is not explicitly enabled (regardless of whether `xpack.security.audit.enabled` is set in the `kibana.yml` settings file). + *Impact* + The version 8.8.2 release includes in {kibana-pull}159807[a fix] for this problem. If you are using {fleet} integrations and {kib} audit logging in version 8.8.0 or 8.8.1, you should upgrade to 8.8.2 or above to obtain the fix. From 9509425349e41f5becadd0cab0c9ef3a6b4f1fc8 Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Thu, 13 Jul 2023 08:22:15 -0600 Subject: [PATCH 12/21] [Maps] update to maplibre 3.1.0 (#161032) maplibre change log https://github.com/maplibre/maplibre-gl-js/blob/main/CHANGELOG.md#310 Breaking changes that required fixes * 3.0.0 Remove "mapbox-gl-supported" package from API. If needed, please reference it directly instead of going through MapLibre. (https://github.com/maplibre/maplibre-gl-js/pull/2451) * 3.0.0 Resize map when container element is resized. The "resize"-related events now has different data associated with it (https://github.com/maplibre/maplibre-gl-js/pull/2157, https://github.com/maplibre/maplibre-gl-js/issues/2551). Previously the originalEvent field was the reason of this change, for example it could be a resize event from the browser. Now it is ResizeObserverEntry, see more [here](https://developer.mozilla.org/en-US/docs/web/api/resizeobserverentry). * 2.2.0 Improve filter specification typings (https://github.com/maplibre/maplibre-gl-js/pull/1390) --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- package.json | 3 +- .../vega_map_view/vega_map_view.scss | 2 +- .../mvt_vector_layer/mvt_vector_layer.tsx | 2 +- .../vector/components/symbol/icon_preview.tsx | 18 +- .../classes/util/mb_filter_expressions.ts | 4 +- .../draw_feature_control.tsx | 4 +- .../connected_components/mb_map/mb_map.tsx | 19 +-- .../tile_status_tracker.tsx | 1 - .../__snapshots__/embedded_map.test.tsx.snap | 2 +- .../visitor_breakdown_map/embedded_map.tsx | 2 +- yarn.lock | 159 +++++++++++++----- 11 files changed, 127 insertions(+), 89 deletions(-) diff --git a/package.json b/package.json index a6fe03d4ab479..88c4458833292 100644 --- a/package.json +++ b/package.json @@ -756,6 +756,7 @@ "@mapbox/geojson-rewind": "^0.5.0", "@mapbox/mapbox-gl-draw": "1.3.0", "@mapbox/mapbox-gl-rtl-text": "0.2.3", + "@mapbox/mapbox-gl-supported": "2.0.1", "@mapbox/vector-tile": "1.3.1", "@opentelemetry/api": "^1.1.0", "@opentelemetry/api-metrics": "^0.31.0", @@ -878,7 +879,7 @@ "luxon": "^2.5.2", "lz-string": "^1.4.4", "mapbox-gl-draw-rectangle-mode": "1.0.4", - "maplibre-gl": "2.1.9", + "maplibre-gl": "3.1.0", "markdown-it": "^12.3.2", "md5": "^2.1.0", "mdast-util-to-hast": "10.0.1", diff --git a/src/plugins/vis_types/vega/public/vega_view/vega_map_view/vega_map_view.scss b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/vega_map_view.scss index 3e3ef71faf0d7..719404e6d1429 100644 --- a/src/plugins/vis_types/vega/public/vega_view/vega_map_view/vega_map_view.scss +++ b/src/plugins/vis_types/vega/public/vega_view/vega_map_view/vega_map_view.scss @@ -1,5 +1,5 @@ .vgaVis { - .mapboxgl-canvas-container { + .maplibregl-canvas-container { cursor: auto; } } diff --git a/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_vector_layer.tsx b/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_vector_layer.tsx index 208e8c4acdb07..670ec35a18983 100644 --- a/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_vector_layer.tsx +++ b/x-pack/plugins/maps/public/classes/layers/vector_layer/mvt_vector_layer/mvt_vector_layer.tsx @@ -336,7 +336,7 @@ export class MvtVectorLayer extends AbstractVectorLayer { // When there are no join results, return a filter that hides all features // work around for 'match' with empty array not filtering out features // This filter always returns false because features will never have `__kbn_never_prop__` property - const hideAllFilter = ['has', '__kbn_never_prop__']; + const hideAllFilter = ['has', '__kbn_never_prop__'] as FilterSpecification; if (!joinPropertiesMap) { return hideAllFilter; diff --git a/x-pack/plugins/maps/public/classes/styles/vector/components/symbol/icon_preview.tsx b/x-pack/plugins/maps/public/classes/styles/vector/components/symbol/icon_preview.tsx index cc7dc0dd9b316..1f18a810041fe 100644 --- a/x-pack/plugins/maps/public/classes/styles/vector/components/symbol/icon_preview.tsx +++ b/x-pack/plugins/maps/public/classes/styles/vector/components/symbol/icon_preview.tsx @@ -18,7 +18,6 @@ import { } from '@elastic/eui'; import { maplibregl, Map as MapboxMap } from '@kbn/mapbox-gl'; import { i18n } from '@kbn/i18n'; -import { ResizeChecker } from '@kbn/kibana-utils-plugin/public'; import { CUSTOM_ICON_PIXEL_RATIO, createSdfIcon } from '../../symbol_utils'; export interface Props { @@ -35,7 +34,6 @@ interface State { export class IconPreview extends Component { static iconId = `iconPreview`; - private _checker?: ResizeChecker; private _isMounted = false; private _containerRef: HTMLDivElement | null = null; @@ -61,9 +59,6 @@ export class IconPreview extends Component { componentWillUnmount() { this._isMounted = false; - if (this._checker) { - this._checker.destroy(); - } if (this.state.map) { this.state.map.remove(); this.state.map = null; @@ -115,15 +110,6 @@ export class IconPreview extends Component { map.setLayoutProperty('icon-layer', 'icon-size', 12); } - _initResizerChecker() { - this._checker = new ResizeChecker(this._containerRef!); - this._checker.on('resize', () => { - if (this.state.map) { - this.state.map.resize(); - } - }); - } - _createMapInstance(): MapboxMap { const map = new maplibregl.Map({ container: this._containerRef!, @@ -171,9 +157,7 @@ export class IconPreview extends Component { _initializeMap() { const map: MapboxMap = this._createMapInstance(); - this.setState({ map }, () => { - this._initResizerChecker(); - }); + this.setState({ map }); } render() { diff --git a/x-pack/plugins/maps/public/classes/util/mb_filter_expressions.ts b/x-pack/plugins/maps/public/classes/util/mb_filter_expressions.ts index a86ca84901cd9..7ffc2955a79a6 100644 --- a/x-pack/plugins/maps/public/classes/util/mb_filter_expressions.ts +++ b/x-pack/plugins/maps/public/classes/util/mb_filter_expressions.ts @@ -46,7 +46,7 @@ function getFilterExpression( ]); } - return ['all', ...allFilters]; + return ['all', ...allFilters] as FilterSpecification; } export function getFillFilterExpression( @@ -91,7 +91,7 @@ const IS_POINT_FEATURE = [ 'any', ['==', ['geometry-type'], GEO_JSON_TYPE.POINT], ['==', ['geometry-type'], GEO_JSON_TYPE.MULTI_POINT], -]; +] as FilterSpecification; export function getPointFilterExpression( isSourceGeoJson: boolean, diff --git a/x-pack/plugins/maps/public/connected_components/mb_map/draw_control/draw_feature_control/draw_feature_control.tsx b/x-pack/plugins/maps/public/connected_components/mb_map/draw_control/draw_feature_control/draw_feature_control.tsx index df70d4b7cfd9b..76e0241ef5622 100644 --- a/x-pack/plugins/maps/public/connected_components/mb_map/draw_control/draw_feature_control/draw_feature_control.tsx +++ b/x-pack/plugins/maps/public/connected_components/mb_map/draw_control/draw_feature_control/draw_feature_control.tsx @@ -12,7 +12,7 @@ import { Feature, Geometry, Position } from 'geojson'; import { i18n } from '@kbn/i18n'; // @ts-expect-error import * as jsts from 'jsts'; -import type { Map as MbMap, MapMouseEvent, PointLike } from '@kbn/mapbox-gl'; +import type { FilterSpecification, Map as MbMap, MapMouseEvent, PointLike } from '@kbn/mapbox-gl'; import { getToasts } from '../../../../kibana_services'; import { DrawControl } from '../draw_control'; import { DRAW_MODE, DRAW_SHAPE } from '../../../../../common/constants'; @@ -105,7 +105,7 @@ export class DrawFeatureControl extends Component { ] as [PointLike, PointLike]; const selectedFeatures = this.props.mbMap.queryRenderedFeatures(mbBbox, { layers: mbEditLayerIds, - filter: ['all', EXCLUDE_CENTROID_FEATURES], + filter: ['all', EXCLUDE_CENTROID_FEATURES] as FilterSpecification, }); if (!selectedFeatures.length) { return; diff --git a/x-pack/plugins/maps/public/connected_components/mb_map/mb_map.tsx b/x-pack/plugins/maps/public/connected_components/mb_map/mb_map.tsx index 84f2ec12f29c4..5c71696cb280b 100644 --- a/x-pack/plugins/maps/public/connected_components/mb_map/mb_map.tsx +++ b/x-pack/plugins/maps/public/connected_components/mb_map/mb_map.tsx @@ -7,12 +7,12 @@ import _ from 'lodash'; import React, { Component } from 'react'; +import { supported as maplibreglSupported } from '@mapbox/mapbox-gl-supported'; import { Adapters } from '@kbn/inspector-plugin/public'; import { Filter } from '@kbn/es-query'; import { Action, ActionExecutionContext } from '@kbn/ui-actions-plugin/public'; import { maplibregl } from '@kbn/mapbox-gl'; import type { Map as MapboxMap, MapOptions, MapMouseEvent } from '@kbn/mapbox-gl'; -import { ResizeChecker } from '@kbn/kibana-utils-plugin/public'; import { METRIC_TYPE } from '@kbn/analytics'; import { DrawFilterControl } from './draw_control/draw_filter_control'; import { ScaleControl } from './scale_control'; @@ -85,7 +85,6 @@ interface State { } export class MbMap extends Component { - private _checker?: ResizeChecker; private _isMounted: boolean = false; private _containerRef: HTMLDivElement | null = null; private _prevCustomIcons?: CustomIcon[]; @@ -110,9 +109,6 @@ export class MbMap extends Component { componentWillUnmount() { this._isMounted = false; - if (this._checker) { - this._checker.destroy(); - } if (this.state.mbMap) { this.state.mbMap.remove(); this.state.mbMap = undefined; @@ -239,7 +235,6 @@ export class MbMap extends Component { this.setState({ mbMap }, () => { this._loadMakiSprites(mbMap); - this._initResizerChecker(); this._registerMapEventListeners(mbMap); this.props.onMapReady(this._getMapExtentState()); }); @@ -284,19 +279,11 @@ export class MbMap extends Component { } } - _initResizerChecker() { - this.state.mbMap?.resize(); // ensure map is sized for container prior to monitoring - this._checker = new ResizeChecker(this._containerRef!); - this._checker.on('resize', () => { - this.state.mbMap?.resize(); - }); - } - _reportUsage() { const usageCollector = getUsageCollection(); if (!usageCollector) return; - const webglSupport = maplibregl.supported(); + const webglSupport = maplibreglSupported(); usageCollector.reportUiCounter( APP_ID, @@ -305,7 +292,7 @@ export class MbMap extends Component { ); // Report low system performance or no hardware GPU - if (webglSupport && !maplibregl.supported({ failIfMajorPerformanceCaveat: true })) { + if (webglSupport && !maplibreglSupported({ failIfMajorPerformanceCaveat: true })) { usageCollector.reportUiCounter(APP_ID, METRIC_TYPE.LOADED, 'gl_majorPerformanceCaveat'); } } diff --git a/x-pack/plugins/maps/public/connected_components/mb_map/tile_status_tracker/tile_status_tracker.tsx b/x-pack/plugins/maps/public/connected_components/mb_map/tile_status_tracker/tile_status_tracker.tsx index ce23768477993..65ff1b8fc623f 100644 --- a/x-pack/plugins/maps/public/connected_components/mb_map/tile_status_tracker/tile_status_tracker.tsx +++ b/x-pack/plugins/maps/public/connected_components/mb_map/tile_status_tracker/tile_status_tracker.tsx @@ -237,7 +237,6 @@ export class TileStatusTracker extends Component { // Tile meta will never have duplicated features since by their nature, tile meta is a feature contained within a single tile const mbFeatures = this.props.mbMap.querySourceFeatures(layer.getMbSourceId(), { sourceLayer: ES_MVT_META_LAYER_NAME, - filter: [], }); const features = mbFeatures diff --git a/x-pack/plugins/ux/public/components/app/rum_dashboard/visitor_breakdown_map/__snapshots__/embedded_map.test.tsx.snap b/x-pack/plugins/ux/public/components/app/rum_dashboard/visitor_breakdown_map/__snapshots__/embedded_map.test.tsx.snap index 70929d04d0548..06eea601e4365 100644 --- a/x-pack/plugins/ux/public/components/app/rum_dashboard/visitor_breakdown_map/__snapshots__/embedded_map.test.tsx.snap +++ b/x-pack/plugins/ux/public/components/app/rum_dashboard/visitor_breakdown_map/__snapshots__/embedded_map.test.tsx.snap @@ -29,7 +29,7 @@ exports[`Embedded Map it renders 1`] = ` min-height: 0; } -.c0.c0.c0 .mapboxgl-canvas { +.c0.c0.c0 .maplibregl-canvas { -webkit-animation: none !important; animation: none !important; } diff --git a/x-pack/plugins/ux/public/components/app/rum_dashboard/visitor_breakdown_map/embedded_map.tsx b/x-pack/plugins/ux/public/components/app/rum_dashboard/visitor_breakdown_map/embedded_map.tsx index 219eb75494068..7cfff20dfb5cb 100644 --- a/x-pack/plugins/ux/public/components/app/rum_dashboard/visitor_breakdown_map/embedded_map.tsx +++ b/x-pack/plugins/ux/public/components/app/rum_dashboard/visitor_breakdown_map/embedded_map.tsx @@ -36,7 +36,7 @@ const EmbeddedPanel = styled.div` z-index: 1; min-height: 0; // Absolute must for Firefox to scroll contents } - &&& .mapboxgl-canvas { + &&& .maplibregl-canvas { animation: none !important; } `; diff --git a/yarn.lock b/yarn.lock index ac8fd62ea9dcb..0a728423b3105 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5973,7 +5973,7 @@ resolved "https://registry.yarnpkg.com/@mapbox/geojson-normalize/-/geojson-normalize-0.0.1.tgz#1da1e6b3a7add3ad29909b30f438f60581b7cd80" integrity sha1-HaHms6et060pkJsw9Dj2BYG3zYA= -"@mapbox/geojson-rewind@^0.5.0", "@mapbox/geojson-rewind@^0.5.1": +"@mapbox/geojson-rewind@^0.5.0": version "0.5.1" resolved "https://registry.yarnpkg.com/@mapbox/geojson-rewind/-/geojson-rewind-0.5.1.tgz#adbe16dc683eb40e90934c51a5e28c7bbf44f4e1" integrity sha512-eL7fMmfTBKjrb+VFHXCGv9Ot0zc3C0U+CwXo1IrP+EPwDczLoXv34Tgq3y+2mPSFNVUXgU42ILWJTC7145KPTA== @@ -5981,6 +5981,14 @@ get-stream "^6.0.1" minimist "^1.2.5" +"@mapbox/geojson-rewind@^0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@mapbox/geojson-rewind/-/geojson-rewind-0.5.2.tgz#591a5d71a9cd1da1a0bf3420b3bea31b0fc7946a" + integrity sha512-tJaT+RbYGJYStt7wI3cq4Nl4SXxG8W7JDG5DMJu97V25RnbNg3QtQtf+KD+VLjNpWKYsRvXDNmNrBgEETr1ifA== + dependencies: + get-stream "^6.0.1" + minimist "^1.2.6" + "@mapbox/hast-util-table-cell-style@^0.1.3": version "0.1.3" resolved "https://registry.yarnpkg.com/@mapbox/hast-util-table-cell-style/-/hast-util-table-cell-style-0.1.3.tgz#5b7166ae01297d72216932b245e4b2f0b642dca6" @@ -5988,7 +5996,7 @@ dependencies: unist-util-visit "^1.3.0" -"@mapbox/jsonlint-lines-primitives@^2.0.2": +"@mapbox/jsonlint-lines-primitives@^2.0.2", "@mapbox/jsonlint-lines-primitives@~2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz#ce56e539f83552b58d10d672ea4d6fc9adc7b234" integrity sha1-zlblOfg1UrWNENZy6k1vya3HsjQ= @@ -6011,7 +6019,7 @@ resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-rtl-text/-/mapbox-gl-rtl-text-0.2.3.tgz#a26ecfb3f0061456d93ee8570dd9587d226ea8bd" integrity sha512-RaCYfnxULUUUxNwcUimV9C/o2295ktTyLEUzD/+VWkqXqvaVfFcZ5slytGzb2Sd/Jj4MlbxD0DCZbfa6CzcmMw== -"@mapbox/mapbox-gl-supported@^2.0.1": +"@mapbox/mapbox-gl-supported@2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-2.0.1.tgz#c15367178d8bfe4765e6b47b542fe821ce259c7b" integrity sha512-HP6XvfNIzfoMVfyGjBckjiAOQK9WfX0ywdLubuPMPv+Vqf5fj0uCbgBQYpiqcWZT6cbyyRnTSXDheT1ugvF6UQ== @@ -6021,10 +6029,10 @@ resolved "https://registry.yarnpkg.com/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz#8a83f9335c7860effa2eeeca254332aa0aeed8f2" integrity sha1-ioP5M1x4YO/6Lu7KJUMyqgru2PI= -"@mapbox/tiny-sdf@^2.0.4": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@mapbox/tiny-sdf/-/tiny-sdf-2.0.5.tgz#cdba698d3d65087643130f9af43a2b622ce0b372" - integrity sha512-OhXt2lS//WpLdkqrzo/KwB7SRD8AiNTFFzuo9n14IBupzIMa67yGItcK7I2W9D8Ghpa4T04Sw9FWsKCJG50Bxw== +"@mapbox/tiny-sdf@^2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@mapbox/tiny-sdf/-/tiny-sdf-2.0.6.tgz#9a1d33e5018093e88f6a4df2343e886056287282" + integrity sha512-qMqa27TLw+ZQz5Jk+RcwZGH7BQf5G/TrutJhspsca/3SHwmgKQ1iq+d3Jxz5oysPVYTGP6aXxCo5Lk9Er6YBAA== "@mapbox/unitbezier@^0.0.1": version "0.0.1" @@ -6043,6 +6051,20 @@ resolved "https://registry.yarnpkg.com/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz#497c67a1cef50d1a2459ba60f315e448d2ad87fe" integrity sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q== +"@maplibre/maplibre-gl-style-spec@^19.2.1": + version "19.2.1" + resolved "https://registry.yarnpkg.com/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-19.2.1.tgz#eb78211151b93f4f9c0cf6cb908133dab7a438dd" + integrity sha512-ZVT5QlkVhlxlPav+ca0NO3Moc7EzbHDO2FXW4ic3Q0Vm+TDUw9I8A2EBws7xUUQZf7HQB3kQ+3Jsh5mFLRD4GQ== + dependencies: + "@mapbox/jsonlint-lines-primitives" "~2.0.2" + "@mapbox/point-geometry" "^0.1.0" + "@mapbox/unitbezier" "^0.0.1" + "@types/mapbox__point-geometry" "^0.1.2" + json-stringify-pretty-compact "^3.0.0" + minimist "^1.2.8" + rw "^1.3.3" + sort-object "^3.0.3" + "@math.gl/core@3.5.6": version "3.5.6" resolved "https://registry.yarnpkg.com/@math.gl/core/-/core-3.5.6.tgz#d849db978d7d4a4984bb63868adc693975d97ce7" @@ -8471,7 +8493,7 @@ dependencies: "@types/node" "*" -"@types/geojson@*", "@types/geojson@^7946.0.10", "@types/geojson@^7946.0.8": +"@types/geojson@*", "@types/geojson@^7946.0.10": version "7946.0.10" resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.10.tgz#6dfbf5ea17142f7f9a043809f1cd4c448cb68249" integrity sha512-Nmh0K3iWQJzniTuPRcJn5hxXkfB1T1pgB89SBig5PlJQU5yocazeu4jATJlaA0GYFKWMqDdvYemoSnF2pXgLVA== @@ -11806,6 +11828,21 @@ bytesish@^0.4.1: resolved "https://registry.yarnpkg.com/bytesish/-/bytesish-0.4.4.tgz#f3b535a0f1153747427aee27256748cff92347e6" integrity sha512-i4uu6M4zuMUiyfZN4RU2+i9+peJh//pXhd9x1oSe1LBkZ3LEbCoygu8W0bXTukU1Jme2txKuotpCZRaC3FLxcQ== +bytewise-core@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/bytewise-core/-/bytewise-core-1.2.3.tgz#3fb410c7e91558eb1ab22a82834577aa6bd61d42" + integrity sha512-nZD//kc78OOxeYtRlVk8/zXqTB4gf/nlguL1ggWA8FuchMyOxcyHR4QPQZMUmA7czC+YnaBrPUCubqAWe50DaA== + dependencies: + typewise-core "^1.2" + +bytewise@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/bytewise/-/bytewise-1.1.0.tgz#1d13cbff717ae7158094aa881b35d081b387253e" + integrity sha512-rHuuseJ9iQ0na6UDhnrRVDh8YnWVlU6xM3VH6q/+yHDeUH2zIhUzP+2/h3LIrhLDBtTqzWpE3p3tP/boefskKQ== + dependencies: + bytewise-core "^1.2.2" + typewise "^1.0.3" + cacache@^12.0.2: version "12.0.4" resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" @@ -13221,11 +13258,6 @@ css@2.X, css@^2.2.1, css@^2.2.4: source-map-resolve "^0.5.2" urix "^0.1.0" -csscolorparser@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/csscolorparser/-/csscolorparser-1.0.3.tgz#b34f391eea4da8f3e98231e2ccd8df9c041f171b" - integrity sha1-s085HupNqPPpgjHizNjfnAQfFxs= - cssesc@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" @@ -14514,10 +14546,10 @@ duplexify@^3.4.2, duplexify@^3.5.3: readable-stream "^2.0.0" stream-shift "^1.0.0" -earcut@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.2.3.tgz#d44ced2ff5a18859568e327dd9c7d46b16f55cf4" - integrity sha512-iRDI1QeCQIhMCZk48DRDMVgQSSBDmbzzNhnxIo+pwx3swkfjMh6vh0nWLq1NdvGHLKH6wIrAM3vQWeTj6qeoug== +earcut@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.2.4.tgz#6d02fd4d68160c114825d06890a92ecaae60343a" + integrity sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ== ecc-jsbn@~0.1.1: version "0.1.2" @@ -16788,7 +16820,7 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" -get-value@^2.0.3, get-value@^2.0.6: +get-value@^2.0.2, get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= @@ -19873,7 +19905,7 @@ json-stringify-pretty-compact@1.2.0: resolved "https://registry.yarnpkg.com/json-stringify-pretty-compact/-/json-stringify-pretty-compact-1.2.0.tgz#0bc316b5e6831c07041fc35612487fb4e9ab98b8" integrity sha512-/11Pj1OyX814QMKO7K8l85SHPTr/KsFxHp8GE2zVa0BtJgGimDjXHfM3FhC7keQdWDea7+nXf+f1de7ATZcZkQ== -json-stringify-pretty-compact@~3.0.0: +json-stringify-pretty-compact@^3.0.0, json-stringify-pretty-compact@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/json-stringify-pretty-compact/-/json-stringify-pretty-compact-3.0.0.tgz#f71ef9d82ef16483a407869556588e91b681d9ab" integrity sha512-Rc2suX5meI0S3bfdZuA7JMFBGkJ875ApfVyq2WHELjBiiG22My/l7/8zPpH/CfFVQHuVLd8NLR0nv6vi0BYYKA== @@ -20016,10 +20048,10 @@ jws@^3.2.2: jwa "^1.4.1" safe-buffer "^5.0.1" -kdbush@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/kdbush/-/kdbush-3.0.0.tgz#f8484794d47004cc2d85ed3a79353dbe0abc2bf0" - integrity sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew== +kdbush@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/kdbush/-/kdbush-4.0.2.tgz#2f7b7246328b4657dd122b6c7f025fbc2c868e39" + integrity sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA== kea@^2.4.2: version "2.4.2" @@ -20877,32 +20909,33 @@ mapcap@^1.0.0: resolved "https://registry.yarnpkg.com/mapcap/-/mapcap-1.0.0.tgz#e8e29d04a160eaf8c92ec4bcbd2c5d07ed037e5a" integrity sha512-KcNlZSlFPx+r1jYZmxEbTVymG+dIctf10WmWkuhrhrblM+KMoF77HelwihL5cxYlORye79KoR4IlOOk99lUJ0g== -maplibre-gl@2.1.9: - version "2.1.9" - resolved "https://registry.yarnpkg.com/maplibre-gl/-/maplibre-gl-2.1.9.tgz#042f3ef4224fa890ecf7a410145243f1fc943dcd" - integrity sha512-pnWJmILeZpgA5QSI7K7xFK3yrkyYTd9srw3fCi2Ca52Phm78hsznPwUErEQcZLfxXKn/1h9t8IPdj0TH0NBNbg== +maplibre-gl@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/maplibre-gl/-/maplibre-gl-3.1.0.tgz#68e73461f994f0d44378b121e026688962b5492f" + integrity sha512-KFarVUUszCEucPwnGsFJtPMQBg/F6lg+SPDmTztKUD/n0YShETjIOdNmm5jpxacEX3+dq50MzlqDr6VH+RtDDA== dependencies: - "@mapbox/geojson-rewind" "^0.5.1" + "@mapbox/geojson-rewind" "^0.5.2" "@mapbox/jsonlint-lines-primitives" "^2.0.2" - "@mapbox/mapbox-gl-supported" "^2.0.1" "@mapbox/point-geometry" "^0.1.0" - "@mapbox/tiny-sdf" "^2.0.4" + "@mapbox/tiny-sdf" "^2.0.6" "@mapbox/unitbezier" "^0.0.1" "@mapbox/vector-tile" "^1.3.1" "@mapbox/whoots-js" "^3.1.0" - "@types/geojson" "^7946.0.8" + "@maplibre/maplibre-gl-style-spec" "^19.2.1" + "@types/geojson" "^7946.0.10" "@types/mapbox__point-geometry" "^0.1.2" "@types/mapbox__vector-tile" "^1.3.0" "@types/pbf" "^3.0.2" - csscolorparser "~1.0.3" - earcut "^2.2.3" + earcut "^2.2.4" geojson-vt "^3.2.1" gl-matrix "^3.4.3" + global-prefix "^3.0.0" + kdbush "^4.0.2" murmurhash-js "^1.0.0" pbf "^3.2.1" - potpack "^1.0.2" + potpack "^2.0.0" quickselect "^2.0.0" - supercluster "^7.1.4" + supercluster "^8.0.1" tinyqueue "^2.0.3" vt-pbf "^3.1.3" @@ -23694,10 +23727,10 @@ postcss@^8.4.14: picocolors "^1.0.0" source-map-js "^1.0.2" -potpack@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/potpack/-/potpack-1.0.2.tgz#23b99e64eb74f5741ffe7656b5b5c4ddce8dfc14" - integrity sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ== +potpack@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/potpack/-/potpack-2.0.0.tgz#61f4dd2dc4b3d5e996e3698c0ec9426d0e169104" + integrity sha512-Q+/tYsFU9r7xoOJ+y/ZTtdVQwTWfzjbiXBDMM/JKUux3+QPP02iUuIoeBQ+Ot6oEDlC+/PGjB/5A3K7KKb7hcw== preact-render-to-string@^5.1.19: version "5.1.19" @@ -25751,7 +25784,7 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rw@1: +rw@1, rw@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" integrity sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q= @@ -26482,11 +26515,33 @@ sonic-boom@^3.2.0: dependencies: atomic-sleep "^1.0.0" +sort-asc@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/sort-asc/-/sort-asc-0.2.0.tgz#00a49e947bc25d510bfde2cbb8dffda9f50eb2fc" + integrity sha512-umMGhjPeHAI6YjABoSTrFp2zaBtXBej1a0yKkuMUyjjqu6FJsTF+JYwCswWDg+zJfk/5npWUUbd33HH/WLzpaA== + +sort-desc@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/sort-desc/-/sort-desc-0.2.0.tgz#280c1bdafc6577887cedbad1ed2e41c037976646" + integrity sha512-NqZqyvL4VPW+RAxxXnB8gvE1kyikh8+pR+T+CXLksVRN9eiQqkQlPwqWYU0mF9Jm7UnctShlxLyAt1CaBOTL1w== + sort-object-keys@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.3.tgz#bff833fe85cab147b34742e45863453c1e190b45" integrity sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg== +sort-object@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/sort-object/-/sort-object-3.0.3.tgz#945727165f244af9dc596ad4c7605a8dee80c269" + integrity sha512-nK7WOY8jik6zaG9CRwZTaD5O7ETWDLZYMM12pqY8htll+7dYeqGfEUPcUBHOpSJg2vJOrvFIY2Dl5cX2ih1hAQ== + dependencies: + bytewise "^1.1.0" + get-value "^2.0.2" + is-extendable "^0.1.1" + sort-asc "^0.2.0" + sort-desc "^0.2.0" + union-value "^1.0.1" + sort-package-json@^1.53.1: version "1.53.1" resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.53.1.tgz#8f2672b06314cf04d9a6bcefc75a5f38d600b811" @@ -27295,12 +27350,12 @@ superagent@^3.8.2, superagent@^3.8.3: qs "^6.5.1" readable-stream "^2.3.5" -supercluster@^7.1.4: - version "7.1.4" - resolved "https://registry.yarnpkg.com/supercluster/-/supercluster-7.1.4.tgz#6762aabfd985d3390b49f13b815567d5116a828a" - integrity sha512-GhKkRM1jMR6WUwGPw05fs66pOFWhf59lXq+Q3J3SxPvhNcmgOtLRV6aVQPMRsmXdpaeFJGivt+t7QXUPL3ff4g== +supercluster@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/supercluster/-/supercluster-8.0.1.tgz#9946ba123538e9e9ab15de472531f604e7372df5" + integrity sha512-IiOea5kJ9iqzD2t7QJq/cREyLHTtSmUT6gQsweojg9WH2sYJqZK9SswTu6jrscO6D1G5v5vYZ9ru/eq85lXeZQ== dependencies: - kdbush "^3.0.0" + kdbush "^4.0.2" superjson@^1.10.0: version "1.10.1" @@ -28189,6 +28244,18 @@ typescript@4.6.3, typescript@^3.3.3333, typescript@^4.6.3, typescript@^4.8.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.3.tgz#eefeafa6afdd31d725584c67a0eaba80f6fc6c6c" integrity sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw== +typewise-core@^1.2, typewise-core@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/typewise-core/-/typewise-core-1.2.0.tgz#97eb91805c7f55d2f941748fa50d315d991ef195" + integrity sha512-2SCC/WLzj2SbUwzFOzqMCkz5amXLlxtJqDKTICqg30x+2DZxcfZN2MvQZmGfXWKNWaKK9pBPsvkcwv8bF/gxKg== + +typewise@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typewise/-/typewise-1.0.3.tgz#1067936540af97937cc5dcf9922486e9fa284651" + integrity sha512-aXofE06xGhaQSPzt8hlTY+/YWQhm9P0jYUp1f2XtmW/3Bk0qzXcyFWAtPoo2uTGQj1ZwbDuSyuxicq+aDo8lCQ== + dependencies: + typewise-core "^1.2.0" + ua-parser-js@^0.7.18: version "0.7.24" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.24.tgz#8d3ecea46ed4f1f1d63ec25f17d8568105dc027c" @@ -28323,7 +28390,7 @@ unified@^9.0.0, unified@^9.2.0, unified@^9.2.1: trough "^1.0.0" vfile "^4.0.0" -union-value@^1.0.0: +union-value@^1.0.0, union-value@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== From 9e9a09cd33a88a3d36c2ecb81f175d17643d7b92 Mon Sep 17 00:00:00 2001 From: Kevin Delemme Date: Thu, 13 Jul 2023 10:29:04 -0400 Subject: [PATCH 13/21] fix(slo): timeslice objective definition (#161863) --- .../observability/docs/openapi/slo/bundled.yaml | 16 ++++++++-------- .../slo/components/schemas/objective.yaml | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/observability/docs/openapi/slo/bundled.yaml b/x-pack/plugins/observability/docs/openapi/slo/bundled.yaml index 1c6954116076d..d1a2d233328c6 100644 --- a/x-pack/plugins/observability/docs/openapi/slo/bundled.yaml +++ b/x-pack/plugins/observability/docs/openapi/slo/bundled.yaml @@ -8,17 +8,14 @@ info: license: name: Elastic License 2.0 url: https://www.elastic.co/licensing/elastic-license -servers: - - url: http://localhost:5601 - description: local -security: - - basicAuth: [] - - apiKeyAuth: [] tags: - name: slo description: SLO APIs enable you to define, manage and track service-level objectives - name: composite slo description: Composite SLO APIs enable you to define, manage and track a group of SLOs. +servers: + - url: http://localhost:5601 + description: local paths: /s/{spaceId}/api/observability/slos: post: @@ -835,11 +832,11 @@ components: description: the target objective between 0 and 1 excluded type: number example: 0.99 - timeslicesTarget: + timesliceTarget: description: the target objective for each slice when using a timeslices budgeting method type: number example: 0.995 - timeslicesWindow: + timesliceWindow: description: the duration of each slice when using a timeslices budgeting method, as {duraton}{unit} type: string example: 5m @@ -1157,3 +1154,6 @@ components: example: 0.9836 errorBudget: $ref: '#/components/schemas/error_budget' +security: + - basicAuth: [] + - apiKeyAuth: [] diff --git a/x-pack/plugins/observability/docs/openapi/slo/components/schemas/objective.yaml b/x-pack/plugins/observability/docs/openapi/slo/components/schemas/objective.yaml index e80dfb38f98c2..e0272c5a04029 100644 --- a/x-pack/plugins/observability/docs/openapi/slo/components/schemas/objective.yaml +++ b/x-pack/plugins/observability/docs/openapi/slo/components/schemas/objective.yaml @@ -8,11 +8,11 @@ properties: description: the target objective between 0 and 1 excluded type: number example: 0.99 - timeslicesTarget: + timesliceTarget: description: the target objective for each slice when using a timeslices budgeting method type: number example: 0.995 - timeslicesWindow: + timesliceWindow: description: the duration of each slice when using a timeslices budgeting method, as {duraton}{unit} type: string example: 5m From b9eae62b5d39126a31e1f285e47387438cb77461 Mon Sep 17 00:00:00 2001 From: Cee Chen <549407+cee-chen@users.noreply.github.com> Date: Thu, 13 Jul 2023 07:41:17 -0700 Subject: [PATCH 14/21] Order Emotion styles before Sass styles (#161592) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary fixes https://github.com/elastic/kibana/issues/161441 fixes https://github.com/elastic/kibana/issues/161464 The recent `EuiButtonEmpty`/`EuiButtonIcon` Emotion conversions have highlighted a CSS order/specificity flaw in Kibana compared to EUI - EUI orders its Sass _after_ its Emotion styles (see https://elastic.github.io/eui/#/), and Kibana orders Sass _before_ Emotion styles. I'm not totally sure why Greg set up Kibana's style order the way he did in https://github.com/elastic/kibana/pull/134919, but at this point, EUI has enough of its baseline atom components converted to Emotion that remaining components in Sass are all generally molecules or higher level components that need to come after Emotion. ### QA - [x] Test as many pages in Kibana as possible to ensure no visual regressions 🤞 --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../core-rendering-server-internal/src/views/template.tsx | 2 +- packages/kbn-storybook/templates/index.ejs | 3 +-- .../unified_histogram/public/panels/panels_resizable.tsx | 6 ++++-- .../change_point_detection/change_points_table.tsx | 6 +++++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/core/rendering/core-rendering-server-internal/src/views/template.tsx b/packages/core/rendering/core-rendering-server-internal/src/views/template.tsx index bbc8109e403da..bac48c88e1b23 100644 --- a/packages/core/rendering/core-rendering-server-internal/src/views/template.tsx +++ b/packages/core/rendering/core-rendering-server-internal/src/views/template.tsx @@ -54,8 +54,8 @@ export const Template: FunctionComponent = ({ {/* Inject EUI reset and global styles before all other component styles */} - + {/* Inject stylesheets into the before scripts so that KP plugins with bundled styles will override them */} diff --git a/packages/kbn-storybook/templates/index.ejs b/packages/kbn-storybook/templates/index.ejs index e8d8d4d6df09d..b52fc548b814b 100644 --- a/packages/kbn-storybook/templates/index.ejs +++ b/packages/kbn-storybook/templates/index.ejs @@ -15,6 +15,7 @@ +