Skip to content

Commit

Permalink
Merge branch '8.17' into update-bundled-packages-20241127164510
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaElastic authored Nov 28, 2024
2 parents 6d7cce3 + 67e441f commit 8519aad
Show file tree
Hide file tree
Showing 19 changed files with 73 additions and 180 deletions.
4 changes: 2 additions & 2 deletions docs/setup/secure-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ keystore, and the `kibana-keystore` tool to manage the settings in the keystore.
[NOTE]
====
* Run all commands as the user who runs {kib}.
* Only the settings with the `(Secure)` qualifier should be stored in the keystore.
Unsupported, extraneous or invalid JSON-string settings cause {kib} to fail to start up.
* Any valid {kib} setting can be stored in the keystore securely.
Unsupported, extraneous or invalid settings will cause {kib} to fail to start up.
====

[float]
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,7 @@
"@types/resolve": "^1.20.1",
"@types/scheduler": "^0.23.0",
"@types/seedrandom": ">=2.0.0 <4.0.0",
"@types/selenium-webdriver": "^4.1.26",
"@types/selenium-webdriver": "^4.1.27",
"@types/semver": "^7.5.8",
"@types/set-value": "^2.0.0",
"@types/sinon": "^7.0.13",
Expand Down Expand Up @@ -1734,7 +1734,7 @@
"file-loader": "^4.2.0",
"find-cypress-specs": "^1.41.4",
"form-data": "^4.0.0",
"geckodriver": "^4.5.1",
"geckodriver": "^5.0.0",
"gulp-brotli": "^3.0.0",
"gulp-postcss": "^9.0.1",
"gulp-terser": "^2.1.0",
Expand Down Expand Up @@ -1809,7 +1809,7 @@
"rxjs-marbles": "^7.0.1",
"sass-embedded": "^1.78.0",
"sass-loader": "^10.5.1",
"selenium-webdriver": "^4.25.0",
"selenium-webdriver": "^4.26.0",
"sharp": "0.32.6",
"simple-git": "^3.16.0",
"sinon": "^7.4.2",
Expand Down
29 changes: 0 additions & 29 deletions packages/kbn-expandable-flyout/__mocks__/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import React from 'react';
import type { IStorage } from '@kbn/kibana-utils-plugin/public';

export const useExpandableFlyoutApi = jest.fn(() => ({
openFlyout: jest.fn(),
closeFlyout: jest.fn(),
openPanels: jest.fn(),
openRightPanel: jest.fn(),
openLeftPanel: jest.fn(),
openPreviewPanel: jest.fn(),
closeRightPanel: jest.fn(),
closeLeftPanel: jest.fn(),
closePreviewPanel: jest.fn(),
closePanels: jest.fn(),
previousPreviewPanel: jest.fn(),
}));

export const useExpandableFlyoutState = jest.fn();

export const ExpandableFlyoutProvider = jest.fn(({ children }: React.PropsWithChildren<{}>) => {
return <>{children}</>;
});

export const withExpandableFlyoutProvider = <T extends object>(
Component: React.ComponentType<T>
) => {
return (props: T) => {
return <Component {...props} />;
};
};

export const ExpandableFlyout = jest.fn();

export const localStorageMock = (): IStorage => {
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-expandable-flyout/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export { useExpandableFlyoutState } from './src/hooks/use_expandable_flyout_stat
export { type FlyoutPanels as ExpandableFlyoutState } from './src/store/state';

export { ExpandableFlyoutProvider } from './src/provider';
export { withExpandableFlyoutProvider } from './src/with_provider';

export type { ExpandableFlyoutProps } from './src';
export type { FlyoutPanelProps, PanelPath, ExpandableFlyoutApi } from './src/types';
30 changes: 0 additions & 30 deletions packages/kbn-expandable-flyout/src/with_provider.test.tsx

This file was deleted.

26 changes: 0 additions & 26 deletions packages/kbn-expandable-flyout/src/with_provider.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/dev/build/tasks/os_packages/docker_generator/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export async function runDockerGenerator(
*/
if (flags.baseImage === 'wolfi')
baseImageName =
'docker.elastic.co/wolfi/chainguard-base:latest@sha256:32099b99697d9da842c1ccacdbef1beee05a68cddb817e858d7656df45ed4c93';
'docker.elastic.co/wolfi/chainguard-base:latest@sha256:32f06b169bb4b0f257fbb10e8c8379f06d3ee1355c89b3327cb623781a29590e';

let imageFlavor = '';
if (flags.baseImage === 'ubi') imageFlavor += `-ubi`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
################################################################################
ARG BASE_REGISTRY=registry1.dso.mil
ARG BASE_IMAGE=ironbank/redhat/ubi/ubi9
ARG BASE_TAG=9.4
ARG BASE_TAG=9.5

FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} as prep_files

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tags:
# Build args passed to Dockerfile ARGs
args:
BASE_IMAGE: 'redhat/ubi/ubi9'
BASE_TAG: "9.4"
BASE_TAG: "9.5"
# Docker image labels
labels:
org.opencontainers.image.title: 'kibana'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ export const initializeDashboard = async ({
hidePanelTitles: panelToUpdate.explicitInput.hidePanelTitles,
};
if (embeddableService.reactEmbeddableRegistryHasKey(incomingEmbeddable.type)) {
panelToUpdate.explicitInput = { id: panelToUpdate.explicitInput.id };
runtimePanelsToRestore[incomingEmbeddable.embeddableId] = nextRuntimeState;
} else {
panelToUpdate.explicitInput = nextRuntimeState;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 10 additions & 15 deletions x-pack/plugins/monitoring/server/lib/metrics/logstash/classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

/* eslint-disable max-classes-per-file */

import _ from 'lodash';
import { i18n } from '@kbn/i18n';
import { ClusterMetric, Metric, MetricOptions } from '../classes';
import { LARGE_FLOAT } from '../../../../common/formatting';
import _ from 'lodash';
import { NORMALIZED_DERIVATIVE_UNIT } from '../../../../common/constants';
import { LARGE_FLOAT } from '../../../../common/formatting';
import { ClusterMetric, Metric, MetricOptions } from '../classes';

const msTimeUnitLabel = i18n.translate('xpack.monitoring.metrics.logstash.msTimeUnitLabel', {
defaultMessage: 'ms',
Expand Down Expand Up @@ -411,7 +411,7 @@ export class LogstashPipelineThroughputMetric extends LogstashMetric {

type LogstashPipelineNodeCountMetricOptions = Pick<
MetricOptions,
'field' | 'label' | 'description' | 'format' | 'units'
'field' | 'label' | 'mbField' | 'description' | 'format' | 'units'
> &
Partial<Pick<MetricOptions, 'uuidField'>>;

Expand All @@ -427,15 +427,10 @@ export class LogstashPipelineNodeCountMetric extends LogstashMetric {
}: {
pageOfPipelines: Array<{ id: string }>;
}) => {
const termAggExtras: {
include: string[];
} = {
include: [],
};
const include: string[] | undefined = pageOfPipelines?.length
? pageOfPipelines.map((pipeline) => pipeline.id)
: undefined;

if (pageOfPipelines) {
termAggExtras.include = pageOfPipelines.map((pipeline) => pipeline.id);
}
return {
pipelines_nested: {
nested: {
Expand All @@ -446,7 +441,7 @@ export class LogstashPipelineNodeCountMetric extends LogstashMetric {
terms: {
field: 'logstash_stats.pipelines.id',
size: 1000,
...termAggExtras,
include,
},
aggs: {
to_root: {
Expand All @@ -472,15 +467,15 @@ export class LogstashPipelineNodeCountMetric extends LogstashMetric {
terms: {
field: 'logstash.node.stats.pipelines.id',
size: 1000,
...termAggExtras,
include,
},
aggs: {
to_root: {
reverse_nested: {},
aggs: {
node_count: {
cardinality: {
field: this.field,
field: this.mbField,
},
},
},
Expand Down
20 changes: 11 additions & 9 deletions x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
*/

import { i18n } from '@kbn/i18n';
import {
LARGE_ABBREVIATED,
LARGE_BYTES,
LARGE_FLOAT,
SMALL_BYTES,
} from '../../../../common/formatting';
import { QuotaMetric } from '../classes';
import {
LogstashEventsRateClusterMetric,
LogstashEventsLatencyClusterMetric,
LogstashEventsRateMetric,
LogstashEventsLatencyMetric,
LogstashEventsRateClusterMetric,
LogstashEventsRateMetric,
LogstashMetric,
LogstashPipelineNodeCountMetric,
LogstashPipelineQueueSizeMetric,
LogstashPipelineThroughputMetric,
LogstashPipelineNodeCountMetric,
} from './classes';
import {
LARGE_FLOAT,
LARGE_BYTES,
SMALL_BYTES,
LARGE_ABBREVIATED,
} from '../../../../common/formatting';

const instanceSystemLoadTitle = i18n.translate(
'xpack.monitoring.metrics.logstash.systemLoadTitle',
Expand Down Expand Up @@ -451,6 +451,7 @@ export const metrics = {
logstash_cluster_pipeline_nodes_count: new LogstashPipelineNodeCountMetric({
field: 'logstash_stats.logstash.uuid',
label: pipelineNodeCountLabel,
mbField: 'logstash.node.stats.logstash.uuid',
description: pipelineNodeCountDescription,
format: LARGE_FLOAT,
units: '',
Expand All @@ -459,6 +460,7 @@ export const metrics = {
uuidField: 'logstash_stats.logstash.uuid', // TODO: add comment explaining why
field: 'logstash_stats.logstash.uuid',
label: pipelineNodeCountLabel,
mbField: 'logstash.node.stats.logstash.uuid',
description: pipelineNodeCountDescription,
format: LARGE_FLOAT,
units: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* 2.0.
*/

import React from 'react';

export const createExpandableFlyoutApiMock = () => ({
closeFlyout: jest.fn(),
closeLeftPanel: jest.fn(),
Expand All @@ -18,17 +16,3 @@ export const createExpandableFlyoutApiMock = () => ({
openPreviewPanel: jest.fn(),
openRightPanel: jest.fn(),
});

export const createExpandableFlyoutMock = () => {
return {
useExpandableFlyoutApi: jest.fn().mockReturnValue(createExpandableFlyoutApiMock()),
useExpandableFlyoutState: jest.fn(),
ExpandableFlyoutProvider: ({ children }: React.PropsWithChildren<{}>) => <>{children}</>,
withExpandableFlyoutProvider: <T extends object>(Component: React.ComponentType<T>) => {
return (props: T) => {
return <Component {...props} />;
};
},
ExpandableFlyout: jest.fn(),
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ import { createTelemetryServiceMock } from '../../../../common/lib/telemetry/tel
jest.mock('@kbn/expandable-flyout', () => ({
useExpandableFlyoutApi: jest.fn(),
ExpandableFlyoutProvider: ({ children }: React.PropsWithChildren<{}>) => <>{children}</>,
withExpandableFlyoutProvider: <T extends object>(Component: React.ComponentType<T>) => {
return (props: T) => {
return <Component {...props} />;
};
},
}));

const mockedTelemetry = createTelemetryServiceMock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ jest.mock('../../../common/lib/kibana', () => {
jest.mock('@kbn/expandable-flyout', () => ({
useExpandableFlyoutApi: jest.fn(),
ExpandableFlyoutProvider: ({ children }: React.PropsWithChildren<{}>) => <>{children}</>,
withExpandableFlyoutProvider: <T extends object>(Component: React.ComponentType<T>) => {
return (props: T) => {
return <Component {...props} />;
};
},
}));

const renderPreviewLink = (field: string, value: string, dataTestSuj?: string) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ const createBaseTimelineEdges = (): TimelineEdges => ({

function deepMerge(target: EventSource, source: EventSource) {
for (const key in source) {
if (source && source[key] instanceof Object && target && target[key] instanceof Object) {
if (
!Object.prototype.hasOwnProperty.call(source, key) ||
key === '__proto__' ||
key === 'constructor'
)
// eslint-disable-next-line no-continue
continue;
if (source[key] instanceof Object && target[key] instanceof Object) {
deepMerge(target[key], source[key]);
} else {
target[key] = source[key];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ export const RulesListTable = (props: RulesListTableProps) => {
),
sortable: true,
truncateText: false,
width: '10%',
width: '100px',
'data-test-subj': 'rulesTableCell-status',
render: (_enabled: boolean | undefined, rule: RuleTableItem) => {
return renderRuleStatusDropdown(rule);
Expand Down
Loading

0 comments on commit 8519aad

Please sign in to comment.