Skip to content

Commit 7ccb421

Browse files
Merge branch 'master' into 74986
2 parents 4498670 + cebcc3a commit 7ccb421

24 files changed

Lines changed: 385 additions & 45 deletions

File tree

.ci/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
22
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts
33

4-
ARG NODE_VERSION=10.21.0
4+
ARG NODE_VERSION=10.22.0
55

66
FROM node:${NODE_VERSION} AS base
77

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.21.0
1+
10.22.0

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.21.0
1+
10.22.0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@
479479
"zlib": "^1.0.5"
480480
},
481481
"engines": {
482-
"node": "10.21.0",
482+
"node": "10.22.0",
483483
"yarn": "^1.21.1"
484484
}
485485
}

x-pack/plugins/ingest_manager/common/constants/agent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ export const AGENT_POLLING_INTERVAL = 1000;
1717
export const AGENT_UPDATE_LAST_CHECKIN_INTERVAL_MS = 30000;
1818
export const AGENT_UPDATE_ACTIONS_INTERVAL_MS = 5000;
1919

20-
export const AGENT_CONFIG_ROLLUP_RATE_LIMIT_INTERVAL_MS = 5000;
21-
export const AGENT_CONFIG_ROLLUP_RATE_LIMIT_REQUEST_PER_INTERVAL = 60;
20+
export const AGENT_CONFIG_ROLLOUT_RATE_LIMIT_INTERVAL_MS = 5000;
21+
export const AGENT_CONFIG_ROLLOUT_RATE_LIMIT_REQUEST_PER_INTERVAL = 25;

x-pack/plugins/ingest_manager/server/constants/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export {
1010
AGENT_POLLING_THRESHOLD_MS,
1111
AGENT_POLLING_INTERVAL,
1212
AGENT_UPDATE_LAST_CHECKIN_INTERVAL_MS,
13-
AGENT_CONFIG_ROLLUP_RATE_LIMIT_REQUEST_PER_INTERVAL,
14-
AGENT_CONFIG_ROLLUP_RATE_LIMIT_INTERVAL_MS,
13+
AGENT_CONFIG_ROLLOUT_RATE_LIMIT_REQUEST_PER_INTERVAL,
14+
AGENT_CONFIG_ROLLOUT_RATE_LIMIT_INTERVAL_MS,
1515
AGENT_UPDATE_ACTIONS_INTERVAL_MS,
1616
INDEX_PATTERN_PLACEHOLDER_SUFFIX,
1717
// Routes

x-pack/plugins/ingest_manager/server/index.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
import { schema, TypeOf } from '@kbn/config-schema';
77
import { PluginInitializerContext } from 'src/core/server';
88
import { IngestManagerPlugin } from './plugin';
9+
import {
10+
AGENT_CONFIG_ROLLOUT_RATE_LIMIT_INTERVAL_MS,
11+
AGENT_CONFIG_ROLLOUT_RATE_LIMIT_REQUEST_PER_INTERVAL,
12+
} from '../common';
913
export { AgentService, ESIndexPatternService, getRegistryUrl } from './services';
1014
export {
1115
IngestManagerSetupContract,
@@ -35,8 +39,12 @@ export const config = {
3539
host: schema.maybe(schema.string()),
3640
ca_sha256: schema.maybe(schema.string()),
3741
}),
38-
agentConfigRolloutRateLimitIntervalMs: schema.number({ defaultValue: 5000 }),
39-
agentConfigRolloutRateLimitRequestPerInterval: schema.number({ defaultValue: 5 }),
42+
agentConfigRolloutRateLimitIntervalMs: schema.number({
43+
defaultValue: AGENT_CONFIG_ROLLOUT_RATE_LIMIT_INTERVAL_MS,
44+
}),
45+
agentConfigRolloutRateLimitRequestPerInterval: schema.number({
46+
defaultValue: AGENT_CONFIG_ROLLOUT_RATE_LIMIT_REQUEST_PER_INTERVAL,
47+
}),
4048
}),
4149
}),
4250
};

x-pack/plugins/ingest_manager/server/services/agents/checkin/state_new_actions.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ import {
2525
} from '../../../types';
2626
import { agentConfigService } from '../../agent_config';
2727
import * as APIKeysService from '../../api_keys';
28-
import { AGENT_SAVED_OBJECT_TYPE, AGENT_UPDATE_ACTIONS_INTERVAL_MS } from '../../../constants';
28+
import {
29+
AGENT_SAVED_OBJECT_TYPE,
30+
AGENT_UPDATE_ACTIONS_INTERVAL_MS,
31+
AGENT_CONFIG_ROLLOUT_RATE_LIMIT_INTERVAL_MS,
32+
AGENT_CONFIG_ROLLOUT_RATE_LIMIT_REQUEST_PER_INTERVAL,
33+
} from '../../../constants';
2934
import { createAgentAction, getNewActionsSince } from '../actions';
3035
import { appContextService } from '../../app_context';
3136
import { toPromiseAbortable, AbortError, createRateLimiter } from './rxjs_utils';
@@ -135,8 +140,10 @@ export function agentCheckinStateNewActionsFactory() {
135140
const newActions$ = createNewActionsSharedObservable();
136141
// Rx operators
137142
const rateLimiter = createRateLimiter(
138-
appContextService.getConfig()?.fleet.agentConfigRolloutRateLimitIntervalMs ?? 5000,
139-
appContextService.getConfig()?.fleet.agentConfigRolloutRateLimitRequestPerInterval ?? 50
143+
appContextService.getConfig()?.fleet.agentConfigRolloutRateLimitIntervalMs ??
144+
AGENT_CONFIG_ROLLOUT_RATE_LIMIT_INTERVAL_MS,
145+
appContextService.getConfig()?.fleet.agentConfigRolloutRateLimitRequestPerInterval ??
146+
AGENT_CONFIG_ROLLOUT_RATE_LIMIT_REQUEST_PER_INTERVAL
140147
);
141148

142149
async function subscribeToNewActions(

x-pack/plugins/ml/common/types/annotations.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ export function isAnnotation(arg: any): arg is Annotation {
103103
);
104104
}
105105

106-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
107-
export interface Annotations extends Array<Annotation> {}
106+
export type Annotations = Annotation[];
108107

109108
export function isAnnotations(arg: any): arg is Annotations {
110109
if (Array.isArray(arg) === false) {
@@ -134,5 +133,12 @@ export type EsAggregationResult = Record<string, TermAggregationResult>;
134133
export interface GetAnnotationsResponse {
135134
aggregations?: EsAggregationResult;
136135
annotations: Record<string, Annotations>;
136+
error?: string;
137137
success: boolean;
138138
}
139+
140+
export interface AnnotationsTable {
141+
annotationsData: Annotations;
142+
aggregations: EsAggregationResult;
143+
error?: string;
144+
}

x-pack/plugins/ml/public/application/explorer/explorer.js

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { FormattedMessage } from '@kbn/i18n/react';
1515

1616
import {
1717
htmlIdGenerator,
18+
EuiCallOut,
1819
EuiFlexGroup,
1920
EuiFlexItem,
2021
EuiFormRow,
@@ -221,7 +222,7 @@ export class Explorer extends React.Component {
221222
selectedJobs,
222223
tableData,
223224
} = this.props.explorerState;
224-
const { annotationsData, aggregations } = annotations;
225+
const { annotationsData, aggregations, error: annotationsError } = annotations;
225226

226227
const jobSelectorProps = {
227228
dateFormatTz: getDateFormatTz(),
@@ -302,9 +303,36 @@ export class Explorer extends React.Component {
302303
setSelectedCells={this.props.setSelectedCells}
303304
/>
304305
<EuiSpacer size="m" />
305-
{annotationsData.length > 0 && (
306+
{annotationsError !== undefined && (
306307
<>
308+
<EuiTitle
309+
className="panel-title"
310+
data-test-subj="mlAnomalyExplorerAnnotationsPanel error"
311+
>
312+
<h2>
313+
<FormattedMessage
314+
id="xpack.ml.explorer.annotationsErrorTitle"
315+
defaultMessage="Annotations"
316+
/>
317+
</h2>
318+
</EuiTitle>
307319
<EuiPanel>
320+
<EuiCallOut
321+
title={i18n.translate('xpack.ml.explorer.annotationsErrorCallOutTitle', {
322+
defaultMessage: 'An error occurred loading annotations:',
323+
})}
324+
color="danger"
325+
iconType="alert"
326+
>
327+
<p>{annotationsError}</p>
328+
</EuiCallOut>
329+
</EuiPanel>
330+
<EuiSpacer size="m" />
331+
</>
332+
)}
333+
{annotationsData.length > 0 && (
334+
<>
335+
<EuiPanel data-test-subj="mlAnomalyExplorerAnnotationsPanel loaded">
308336
<EuiAccordion
309337
id={this.htmlIdGen()}
310338
buttonContent={

0 commit comments

Comments
 (0)