Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into 3wd-field-readonly-…
Browse files Browse the repository at this point in the history
…follow-up
  • Loading branch information
nikitaindik committed Sep 18, 2024
2 parents f89e476 + b67fa07 commit 26d473f
Show file tree
Hide file tree
Showing 370 changed files with 9,132 additions and 3,876 deletions.
9 changes: 7 additions & 2 deletions .buildkite/scripts/steps/functional/performance_playwright.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ if [ "$BUILDKITE_PIPELINE_SLUG" == "kibana-performance-data-set-extraction" ]; t
node scripts/run_performance.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" --skip-warmup
else
# pipeline should use bare metal static worker
echo "--- Running performance tests"
node scripts/run_performance.js --kibana-install-dir "$KIBANA_BUILD_LOCATION"
if [[ -z "${JOURNEYS_GROUP+x}" ]]; then
echo "--- Running performance tests"
node scripts/run_performance.js --kibana-install-dir "$KIBANA_BUILD_LOCATION"
else
echo "--- Running performance tests: '$JOURNEYS_GROUP' group"
node scripts/run_performance.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" --group "$JOURNEYS_GROUP"
fi
fi

echo "--- Upload journey step screenshots"
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/.env.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# /bin/bash or /bin/zsh (oh-my-zsh is installed by default as well)
SHELL=/bin/bash
# Switch to 1 to enable FIPS environment, any other value to disable
# Switch to 1 to enable FIPS environment, any other value to disable,
# then close and reopen a new terminal to setup the environment
FIPS=0
5 changes: 5 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ WORKDIR ${KBN_DIR}

# Node and NVM setup
COPY .node-version /tmp/

USER vscode

RUN mkdir -p $NVM_DIR && \
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/${NVM_VERSION}/install.sh | bash && \
. "$NVM_DIR/nvm.sh" && \
Expand All @@ -61,6 +64,8 @@ RUN mkdir -p $NVM_DIR && \
echo "source $NVM_DIR/nvm.sh" >> ${HOME}/.zshrc && \
chown -R 1000:1000 "${HOME}/.npm"

USER root

# Reload the env everytime a new shell is opened incase the .env file changed.
RUN echo "source $KBN_DIR/.devcontainer/scripts/env.sh" >> ${HOME}/.bashrc && \
echo "source $KBN_DIR/.devcontainer/scripts/env.sh" >> ${HOME}/.zshrc
Expand Down
21 changes: 21 additions & 0 deletions dev_docs/tutorials/performance/adding_performance_journey.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,27 @@ simulate real life internet connection. This means that all requests have a fixe
In order to keep track on performance metrics stability, journeys are run on main branch with a scheduled interval.
Bare metal machine is used to produce results as stable and reproducible as possible.

#### Running subset of journeys for the PR

Some code changes might affect the Kibana performance and it might be benefitial to run relevant journeys against the PR
and compare performance metrics vs. the ones on main branch.

In oder to trigger the build for Kibana PR, you can follow these steps:

- Create a new kibana-single-user-performance [build](https://buildkite.com/elastic/kibana-single-user-performance#new)
- Provide the following arguments:
- Branch: `refs/pull/<PR_number>/head`
- Under Options, set the environment variable: `JOURNEYS_GROUP=<group_name>`

Currently supported journey groups:

- kibanaStartAndLoad
- crud
- dashboard
- discover
- maps
- ml

#### Machine specifications

All benchmarks are run on bare-metal machines with the [following specifications](https://www.hetzner.com/dedicated-rootserver/ex100):
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1801,7 +1801,7 @@
"tape": "^5.0.1",
"terser": "^5.32.0",
"terser-webpack-plugin": "^4.2.3",
"tough-cookie": "^4.1.4",
"tough-cookie": "^5.0.0",
"tree-kill": "^1.2.2",
"ts-morph": "^15.1.0",
"tsd": "^0.31.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-esql-ast/src/antlr_error_listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ErrorListener } from 'antlr4';
import type { EditorError } from './types';
import { getPosition } from './ast_position_utils';

const REPLACE_DEV = /,*\s*DEV_\w+\s*/g;
const REPLACE_DEV = /,{0,1}(?<!\s)\s*DEV_\w+\s*/g;
export class ESQLErrorListener extends ErrorListener<any> {
protected errors: EditorError[] = [];

Expand Down
27 changes: 15 additions & 12 deletions packages/kbn-monaco/src/console/lexer_rules/console_output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,24 @@ export const consoleOutputLexerRules: monaco.languages.IMonarchLanguage = {
comments: [
// Line comment indicated by #
// Everything after the # character is matched, stopping right before the status code and status text at the end if they are present
matchTokensWithEOL('comment', /# .+?(?=\s+\d{3}(?: \w+)*$)/, 'root', 'status'),
matchTokensWithEOL('comment.default', /# .+?(?=\s+\[\b1\d{2}(?: \w+)*\]$)/, 'root', 'status'),
matchTokensWithEOL('comment.success', /# .+?(?=\s+\[\b2\d{2}(?: \w+)*\]$)/, 'root', 'status'),
matchTokensWithEOL('comment.primary', /# .+?(?=\s+\[\b3\d{2}(?: \w+)*\]$)/, 'root', 'status'),
matchTokensWithEOL('comment.warning', /# .+?(?=\s+\[\b4\d{2}(?: \w+)*\]$)/, 'root', 'status'),
matchTokensWithEOL('comment.danger', /# .+?(?=\s+\[\b5\d{2}(?: \w+)*\]$)/, 'root', 'status'),
...consoleSharedLexerRules.tokenizer.comments,
],
status: [
// Following HTTP response status codes conventions
// Informational responses (status codes 100 – 199)
matchTokensWithEOL('status.info', /\b1\d{2}(?: \w+)*$/, 'root'),
// Successful responses (status codes 200 – 299)
matchTokensWithEOL('status.success', /\b2\d{2}(?: \w+)*$/, 'root'),
// Redirection messages (status codes 300 – 399)
matchTokensWithEOL('status.redirect', /\b3\d{2}(?: \w+)*$/, 'root'),
// Client error responses (status codes 400 – 499)
matchTokensWithEOL('status.warning', /\b4\d{2}(?: \w+)*$/, 'root'),
// Server error responses (status codes 500 – 599)
matchTokensWithEOL('status.error', /\b5\d{2}(?: \w+)*$/, 'root'),
// Status codes 100 – 199
matchTokensWithEOL('status.default', /\[\b1\d{2}(?: \w+)*\]$/, 'root'),
// Status codes 200 – 299
matchTokensWithEOL('status.success', /\[\b2\d{2}(?: \w+)*\]$/, 'root'),
// Status codes 300 – 399
matchTokensWithEOL('status.primary', /\[\b3\d{2}(?: \w+)*\]$/, 'root'),
// Status codes 400 – 499
matchTokensWithEOL('status.warning', /\[\b4\d{2}(?: \w+)*\]$/, 'root'),
// Status codes 500 – 599
matchTokensWithEOL('status.danger', /\[\b5\d{2}(?: \w+)*\]$/, 'root'),
],
},
};
50 changes: 42 additions & 8 deletions packages/kbn-monaco/src/console/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ const background = euiThemeVars.euiFormBackgroundColor;
const booleanTextColor = '#585CF6';
const methodTextColor = '#DD0A73';
const urlTextColor = '#00A69B';
const defaultStatusBackgroundColor = darkMode ? '#191B20' : '#F7F8FA';
const successStatusBackgroundColor = darkMode ? '#212B30' : '#E7F5F5';
const primaryStatusBackgroundColor = darkMode ? '#1E232D' : '#EBF1F7';
const warningStatusBackgroundColor = darkMode ? '#2C2B25' : '#FBF6E9';
const dangerStatusBackgroundColor = darkMode ? '#2E2024' : '#F6E6E7';
export const buildConsoleTheme = (): monaco.editor.IStandaloneThemeData => {
const euiTheme = darkMode ? buildDarkTheme() : buildLightTheme();
return {
Expand All @@ -39,27 +44,56 @@ export const buildConsoleTheme = (): monaco.editor.IStandaloneThemeData => {
makeHighContrastColor(euiThemeVars.euiColorAccentText)(background)
),
...buildRuleGroup(
['status.info'],
makeHighContrastColor(euiThemeVars.euiTextColor)(background)
['comment.default'],
makeHighContrastColor(euiThemeVars.euiTextColor)(defaultStatusBackgroundColor)
),
...buildRuleGroup(
['comment.success'],
makeHighContrastColor(euiThemeVars.euiColorSuccessText)(successStatusBackgroundColor)
),
...buildRuleGroup(
['comment.primary'],
makeHighContrastColor(euiThemeVars.euiTextColor)(primaryStatusBackgroundColor)
),
...buildRuleGroup(
['comment.warning'],
makeHighContrastColor(euiThemeVars.euiColorWarningText)(warningStatusBackgroundColor)
),
...buildRuleGroup(
['comment.danger'],
makeHighContrastColor(euiThemeVars.euiColorDangerText)(dangerStatusBackgroundColor)
),
...buildRuleGroup(
['status.default'],
makeHighContrastColor(euiThemeVars.euiTextColor)(defaultStatusBackgroundColor),
true
),
...buildRuleGroup(
['status.success'],
makeHighContrastColor(euiThemeVars.euiTextColor)(euiThemeVars.euiColorSuccess)
makeHighContrastColor(euiThemeVars.euiColorSuccessText)(successStatusBackgroundColor),
true
),
...buildRuleGroup(
['status.redirect'],
makeHighContrastColor(euiThemeVars.euiTextColor)(background)
['status.primary'],
makeHighContrastColor(euiThemeVars.euiTextColor)(primaryStatusBackgroundColor),
true
),
...buildRuleGroup(
['status.warning'],
makeHighContrastColor(euiThemeVars.euiTextColor)(euiThemeVars.euiColorWarning)
makeHighContrastColor(euiThemeVars.euiColorWarningText)(warningStatusBackgroundColor),
true
),
...buildRuleGroup(
['status.error'],
makeHighContrastColor('#FFFFFF')(euiThemeVars.euiColorDanger)
['status.danger'],
makeHighContrastColor(euiThemeVars.euiColorDangerText)(dangerStatusBackgroundColor),
true
),
...buildRuleGroup(['method'], makeHighContrastColor(methodTextColor)(background)),
...buildRuleGroup(['url'], makeHighContrastColor(urlTextColor)(background)),
],
colors: {
...euiTheme.colors,
'editorLineNumber.foreground': euiThemeVars.euiTextColor,
},
};
};
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pageLoadAssetSize:
observabilityAiAssistantManagement: 19279
observabilityLogsExplorer: 46650
observabilityOnboarding: 19573
observabilityShared: 72039
observabilityShared: 80000
osquery: 107090
painlessLab: 179748
presentationPanel: 55463
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ paths:
x-labels: [serverless, ess]
x-codegen-enabled: true
operationId: CreateEndpointList
summary: Creates an endpoint list
description: Creates an endpoint list or does nothing if the list already exists
summary: Create an endpoint exception list
description: Create an endpoint exception list, which groups endpoint exception list items. If an endpoint exception list already exists, an empty response is returned.
responses:
200:
description: Successful response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ paths:
x-labels: [serverless, ess]
x-codegen-enabled: true
operationId: CreateEndpointListItem
summary: Creates an endpoint list item
summary: Create an endpoint exception list item
description: Create an endpoint exception list item, and associate it with the endpoint exception list.
requestBody:
description: Exception list item's properties
required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ paths:
x-labels: [serverless, ess]
x-codegen-enabled: true
operationId: DeleteEndpointListItem
summary: Deletes an endpoint list item
summary: Delete an endpoint exception list item
description: Delete an endpoint exception list item using the `id` or `item_id` field.
parameters:
- name: id
in: query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ paths:
x-labels: [serverless, ess]
x-codegen-enabled: true
operationId: FindEndpointListItems
summary: Finds endpoint list items
summary: Get endpoint exception list items
description: Get a list of all endpoint exception list items.
parameters:
- name: filter
in: query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ paths:
x-labels: [serverless, ess]
x-codegen-enabled: true
operationId: ReadEndpointListItem
summary: Reads an endpoint list item
summary: Get an endpoint exception list item
description: Get the details of an endpoint exception list item using the `id` or `item_id` field.
parameters:
- name: id
in: query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ paths:
x-labels: [serverless, ess]
x-codegen-enabled: true
operationId: UpdateEndpointListItem
summary: Updates an endpoint list item
summary: Update an endpoint exception list item
description: Update an endpoint exception list item using the `id` or `item_id` field.
requestBody:
description: Exception list item's properties
required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ servers:
paths:
/api/endpoint_list:
post:
description: Creates an endpoint list or does nothing if the list already exists
description: >-
Create an endpoint exception list, which groups endpoint exception list
items. If an endpoint exception list already exists, an empty response
is returned.
operationId: CreateEndpointList
responses:
'200':
Expand Down Expand Up @@ -48,9 +51,12 @@ paths:
schema:
$ref: '#/components/schemas/SiemErrorResponse'
description: Internal server error
summary: Creates an endpoint list
summary: Create an endpoint exception list
/api/endpoint_list/items:
delete:
description: >-
Delete an endpoint exception list item using the `id` or `item_id`
field.
operationId: DeleteEndpointListItem
parameters:
- description: Either `id` or `item_id` must be specified
Expand Down Expand Up @@ -104,8 +110,11 @@ paths:
schema:
$ref: '#/components/schemas/SiemErrorResponse'
description: Internal server error
summary: Deletes an endpoint list item
summary: Delete an endpoint exception list item
get:
description: >-
Get the details of an endpoint exception list item using the `id` or
`item_id` field.
operationId: ReadEndpointListItem
parameters:
- description: Either `id` or `item_id` must be specified
Expand Down Expand Up @@ -161,8 +170,11 @@ paths:
schema:
$ref: '#/components/schemas/SiemErrorResponse'
description: Internal server error
summary: Reads an endpoint list item
summary: Get an endpoint exception list item
post:
description: >-
Create an endpoint exception list item, and associate it with the
endpoint exception list.
operationId: CreateEndpointListItem
requestBody:
content:
Expand Down Expand Up @@ -237,8 +249,11 @@ paths:
schema:
$ref: '#/components/schemas/SiemErrorResponse'
description: Internal server error
summary: Creates an endpoint list item
summary: Create an endpoint exception list item
put:
description: >-
Update an endpoint exception list item using the `id` or `item_id`
field.
operationId: UpdateEndpointListItem
requestBody:
content:
Expand Down Expand Up @@ -318,9 +333,10 @@ paths:
schema:
$ref: '#/components/schemas/SiemErrorResponse'
description: Internal server error
summary: Updates an endpoint list item
summary: Update an endpoint exception list item
/api/endpoint_list/items/_find:
get:
description: Get a list of all endpoint exception list items.
operationId: FindEndpointListItems
parameters:
- description: >
Expand Down Expand Up @@ -422,7 +438,7 @@ paths:
schema:
$ref: '#/components/schemas/SiemErrorResponse'
description: Internal server error
summary: Finds endpoint list items
summary: Get endpoint exception list items
components:
schemas:
EndpointList:
Expand Down
Loading

0 comments on commit 26d473f

Please sign in to comment.