Skip to content

Commit

Permalink
Merge branch 'main' into canvas_filters_panel_update_group
Browse files Browse the repository at this point in the history
# Conflicts:
#	x-pack/plugins/canvas/canvas_plugin_src/renderers/filters/dropdown_filter/index.tsx
#	x-pack/plugins/canvas/canvas_plugin_src/renderers/filters/time_filter/index.tsx
#	x-pack/plugins/canvas/public/components/sidebar/element_settings/element_settings.component.tsx
#	x-pack/plugins/canvas/public/components/workpad_filters/__stories__/workpad_filters.stories.tsx
#	x-pack/plugins/canvas/public/components/workpad_filters/hooks/use_canvas_filters.ts
#	x-pack/plugins/canvas/public/components/workpad_filters/workpad_filters.tsx
#	x-pack/plugins/canvas/public/functions/filters.ts
#	x-pack/plugins/canvas/public/lib/filter.test.ts
#	x-pack/plugins/canvas/public/lib/filter.ts
  • Loading branch information
Kuznietsov committed Dec 6, 2021
2 parents 9bceb67 + 55e132b commit b3cc587
Show file tree
Hide file tree
Showing 1,859 changed files with 37,887 additions and 21,335 deletions.
11 changes: 11 additions & 0 deletions .buildkite/pipelines/pull_request/osquery_cypress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
steps:
- command: .buildkite/scripts/steps/functional/osquery_cypress.sh
label: 'Osquery Cypress Tests'
agents:
queue: ci-group-6
depends_on: build
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '*'
limit: 1
5 changes: 5 additions & 0 deletions .buildkite/scripts/build_kibana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ if [[ "${GITHUB_PR_LABELS:-}" == *"ci:deploy-cloud"* ]]; then
--skip-docker-ubi \
--skip-docker-centos \
--skip-docker-contexts

CLOUD_IMAGE=$(docker images --format "{{.Repository}}:{{.Tag}}" docker.elastic.co/kibana-ci/kibana-cloud)
cat << EOF | buildkite-agent annotate --style "info" --context cloud-image
Cloud image: $CLOUD_IMAGE
EOF
fi

echo "--- Archive Kibana Distribution"
Expand Down
10 changes: 10 additions & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ const uploadPipeline = (pipelineContent) => {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/fleet_cypress.yml'));
}

if (
(await doAnyChangesMatch([
/^x-pack\/plugins\/osquery/,
/^x-pack\/test\/osquery_cypress/,
])) ||
process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/osquery_cypress.yml'));
}

if (await doAnyChangesMatch([/^x-pack\/plugins\/uptime/])) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/uptime.yml'));
}
Expand Down
20 changes: 20 additions & 0 deletions .buildkite/scripts/steps/functional/osquery_cypress.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/common/util.sh

.buildkite/scripts/bootstrap.sh
.buildkite/scripts/download_build_artifacts.sh

export JOB=kibana-osquery-cypress

echo "--- Osquery Cypress tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "Osquery Cypress Tests" \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config test/osquery_cypress/cli_config.ts
4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

# Vis Editors
/x-pack/plugins/lens/ @elastic/kibana-vis-editors
/src/plugins/advanced_settings/ @elastic/kibana-vis-editors
/src/plugins/charts/ @elastic/kibana-vis-editors
/src/plugins/vis_default_editor/ @elastic/kibana-vis-editors
/src/plugins/vis_types/metric/ @elastic/kibana-vis-editors
Expand All @@ -34,10 +33,12 @@
/src/plugins/vis_types/vislib/ @elastic/kibana-vis-editors
/src/plugins/vis_types/xy/ @elastic/kibana-vis-editors
/src/plugins/vis_types/pie/ @elastic/kibana-vis-editors
/src/plugins/vis_types/heatmap/ @elastic/kibana-vis-editors
/src/plugins/visualize/ @elastic/kibana-vis-editors
/src/plugins/visualizations/ @elastic/kibana-vis-editors
/src/plugins/chart_expressions/expression_tagcloud/ @elastic/kibana-vis-editors
/src/plugins/chart_expressions/expression_metric/ @elastic/kibana-vis-editors
/src/plugins/chart_expressions/expression_heatmap/ @elastic/kibana-vis-editors
/src/plugins/url_forwarding/ @elastic/kibana-vis-editors
/packages/kbn-tinymath/ @elastic/kibana-vis-editors
/x-pack/test/functional/apps/lens @elastic/kibana-vis-editors
Expand Down Expand Up @@ -261,6 +262,7 @@
/src/plugins/home/server/*.ts @elastic/kibana-core
/src/plugins/home/server/services/ @elastic/kibana-core
/src/plugins/kibana_overview/ @elastic/kibana-core
/src/plugins/advanced_settings/ @elastic/kibana-core
/x-pack/plugins/global_search_bar/ @elastic/kibana-core
#CC# /src/core/server/csp/ @elastic/kibana-core
#CC# /src/plugins/saved_objects/ @elastic/kibana-core
Expand Down
2 changes: 2 additions & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"expressionRepeatImage": "src/plugins/expression_repeat_image",
"expressionRevealImage": "src/plugins/expression_reveal_image",
"expressionShape": "src/plugins/expression_shape",
"expressionHeatmap": "src/plugins/chart_expressions/expression_heatmap",
"expressionTagcloud": "src/plugins/chart_expressions/expression_tagcloud",
"expressionMetricVis": "src/plugins/chart_expressions/expression_metric",
"inputControl": "src/plugins/input_control_vis",
Expand Down Expand Up @@ -69,6 +70,7 @@
"visTypeVislib": "src/plugins/vis_types/vislib",
"visTypeXy": "src/plugins/vis_types/xy",
"visTypePie": "src/plugins/vis_types/pie",
"visTypeHeatmap": "src/plugins/vis_types/heatmap",
"visualizations": "src/plugins/visualizations",
"visualize": "src/plugins/visualize",
"apmOss": "src/plugins/apm_oss",
Expand Down
2 changes: 1 addition & 1 deletion config/kibana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@

# Logs queries sent to Elasticsearch.
#logging.loggers:
# - name: elasticsearch.queries
# - name: elasticsearch.query
# level: debug

# Logs http responses.
Expand Down
8 changes: 8 additions & 0 deletions dev_docs/contributing/standards.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ Every public API should have a release tag specified at the top of it’s docume

Every team should be collecting telemetry metrics on it’s public API usage. This will be important for knowing when it’s safe to make breaking changes. The Core team will be looking into ways to make this easier and an automatic part of registration (see [#112291](https://github.com/elastic/kibana/issues/112291)).

### APM

Kibana server and client are instrumented with APM node and APM RUM clients respectively, tracking serveral types of transactions by default, such as `page-load`, `request`, etc.
You may introduce custom transactions. Please refer to the [APM documentation](https://www.elastic.co/guide/en/apm/get-started/current/index.html) and follow these guidelines when doing so:

- Use dashed syntax for transaction types and names: `my-transaction-type` and `my-transaction-name`
- [Refrain from adding too many custom labels](https://www.elastic.co/guide/en/apm/get-started/current/metadata.html)

### Documentation

Every public API should be documented inside the [docs/api](https://github.com/elastic/kibana/tree/main/docs/api) folder in asciidoc (this content will eventually be migrated to mdx to support the new docs system). If a public REST API is undocumented, you should either document it, or make it internal.
Expand Down
2 changes: 1 addition & 1 deletion dev_docs/key_concepts/building_blocks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Check out <DocLink id="kibDevDocsKPTTutorial" text="the KibanaPageTemplate tutor

### Index Patterns

<DocLink id="kibDataPlugin" section="index-patterns-api" text="Index Patterns" /> are a high-level, space-aware
<DocLink id="kibDataPlugin" section="data-views-api" text="Index Patterns" /> are a high-level, space-aware
abstraction layer that sits above Data Streams and Elasticsearch indices. Index Patterns provide users
the ability to define and customize the data they wish to search and filter on, on a per-space basis.
For example, users can specify a set of indices, and they can customize the field list with runtime fields,
Expand Down
18 changes: 16 additions & 2 deletions dev_docs/key_concepts/performance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ id: kibDevPerformance
slug: /kibana-dev-docs/key-concepts/performance
title: Performance
summary: Performance tips for Kibana development.
date: 2021-09-02
date: 2021-12-03
tags: ['kibana', 'onboarding', 'dev', 'performance']
---

## Keep Kibana fast
## Client-side considerations

### Lazy load code

_tl;dr_: Load as much code lazily as possible. Everyone loves snappy
applications with a responsive UI and hates spinners. Users deserve the
Expand Down Expand Up @@ -105,3 +107,15 @@ Many OSS tools allow you to analyze the generated stats file:
Webpack authors
- [webpack-visualizer](https://chrisbateman.github.io/webpack-visualizer/)
- [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer)

## Server-side considerations

### Don't block the event loop

[Node.js is single threaded](https://nodejs.dev/learn/introduction-to-nodejs) which means a single CPU-intensive server-side, synchronous operation will block any other functionality waiting to execute on the Kibana server. The affects background tasks, like alerts, and search sessions, as well as search requests and page loads.

**When writing code that will run on the server, [don't block the event loop](https://nodejs.org/en/docs/guides/dont-block-the-event-loop/)**. Instead consider:

- Writing async code. For example, leverage [setImmediate](https://nodejs.dev/learn/understanding-setimmediate) inside for loops.
- Executing logic on the client instead. This may not be a good option if you require a lot of data going back and forth between the server and the client, as that can also slow down the user's experience, especially over slower bandwidth internet connections.
- Worker threads are also an option if the code doesn't rely on stateful Kibana services. If you are interested in using worker threads, please reach out to a tech-lead before doing so. We will likely want to implement a worker threads pool to ensure worker threads cooperate appropriately.
6 changes: 6 additions & 0 deletions dev_docs/tutorials/data/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ setTimeout(() => {
}, 1000);
```

<DocCallOut color="danger" title="Cancel your searches if results are no longer needed">
Users might no longer be interested in search results. For example, they might start a new search
or leave your app without waiting for the results. You should handle such cases by using
`AbortController` with search API.
</DocCallOut>

#### Search strategies

By default, the search service uses the DSL query and aggregation syntax and returns the response from Elasticsearch as is. It also provides several additional basic strategies, such as Async DSL (`x-pack` default) and EQL.
Expand Down
2 changes: 1 addition & 1 deletion dev_docs/tutorials/data_views.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ await data.indexPatterns.delete(dataViewId);

### Data view HTTP API

Rest-like HTTP CRUD+ API - [docs](https://www.elastic.co/guide/en/kibana/master/index-patterns-api.html)
Rest-like HTTP CRUD+ API - [docs](https://www.elastic.co/guide/en/kibana/master/data-views-api.html)
Loading

0 comments on commit b3cc587

Please sign in to comment.