Skip to content

Commit

Permalink
Merge branch 'master' into fix-flaky-context-test
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Sep 1, 2021
2 parents 4500cfb + d34ef7b commit f3f33b5
Show file tree
Hide file tree
Showing 3,064 changed files with 25,855 additions and 52,165 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 8 additions & 0 deletions .buildkite/pipelines/update_demo_env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
steps:
- command: .buildkite/scripts/steps/demo_env/es_and_init.sh
label: Initialize Environment and Deploy ES

- command: .buildkite/scripts/steps/demo_env/kibana.sh
label: Build and Deploy Kibana
agents:
queue: c2-8
1 change: 1 addition & 0 deletions .buildkite/scripts/common/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ export TEST_ES_URL="http://elastic:changeme@localhost:6102"
export TEST_ES_TRANSPORT_PORT=6301-6309
export TEST_CORS_SERVER_PORT=6106
export ALERTING_PROXY_PORT=6105
export TEST_PROXY_SERVER_PORT=6107
4 changes: 4 additions & 0 deletions .buildkite/scripts/steps/demo_env/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
COPY ./* /var/lib/example_plugins
RUN find /var/lib/example_plugins/ -type f -name '*.zip' | xargs -I % /usr/share/kibana/bin/kibana-plugin install 'file://%'
8 changes: 8 additions & 0 deletions .buildkite/scripts/steps/demo_env/auth.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -euo pipefail

echo '--- Auth and set up kubectl'

gcloud container clusters get-credentials demo-env --region us-central1 --project elastic-kibana-184716
kubectl config use-context gke_elastic-kibana-184716_us-central1_demo-env
9 changes: 9 additions & 0 deletions .buildkite/scripts/steps/demo_env/config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -euo pipefail

DEPLOYMENT_VERSION=$(jq -r .version package.json)
export DEPLOYMENT_VERSION

export DEPLOYMENT_MINOR_VERSION="${DEPLOYMENT_VERSION%.*}"
export DEPLOYMENT_NAME="kb-${DEPLOYMENT_MINOR_VERSION/./-}"
39 changes: 39 additions & 0 deletions .buildkite/scripts/steps/demo_env/es_and_init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash

set -euo pipefail

source "$(dirname "${0}")/config.sh"

"$(dirname "${0}")/auth.sh"

echo '--- Import and publish Elasticsearch image'

mkdir -p target

export ES_IMAGE="gcr.io/elastic-kibana-184716/demo/elasticsearch:$DEPLOYMENT_NAME-$(git rev-parse HEAD)"

DOCKER_EXPORT_URL=$(curl https://storage.googleapis.com/kibana-ci-es-snapshots-daily/$DEPLOYMENT_VERSION/manifest-latest-verified.json | jq -r '.archives | .[] | select(.platform=="docker") | .url')
curl "$DOCKER_EXPORT_URL" > target/elasticsearch-docker.tar.gz
docker load < target/elasticsearch-docker.tar.gz
docker tag "docker.elastic.co/elasticsearch/elasticsearch:$DEPLOYMENT_VERSION-SNAPSHOT" "$ES_IMAGE"
docker push "$ES_IMAGE"

echo '--- Prepare yaml'

TEMPLATE=$(envsubst < "$(dirname "${0}")/es_and_init.yml")

echo "$TEMPLATE"

cat << EOF | buildkite-agent annotate --style "info" --context demo-env-info
The demo environment can be accessed here, once Kibana and ES are running:
https://demo.kibana.dev/$DEPLOYMENT_MINOR_VERSION
Logs, etc can be found here:
https://console.cloud.google.com/kubernetes/workload?project=elastic-kibana-184716&pageState=(%22savedViews%22:(%22n%22:%5B%22${DEPLOYMENT_NAME}%22%5D,%22c%22:%5B%22gke%2Fus-central1%2Fdemo-env%22%5D))
EOF

echo '--- Deploy yaml'
echo "$TEMPLATE" | kubectl apply -f -
63 changes: 63 additions & 0 deletions .buildkite/scripts/steps/demo_env/es_and_init.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
kind: Namespace
apiVersion: v1
metadata:
name: $DEPLOYMENT_NAME
labels:
name: $DEPLOYMENT_NAME
---
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: $DEPLOYMENT_NAME
namespace: $DEPLOYMENT_NAME
spec:
version: $DEPLOYMENT_VERSION
image: $ES_IMAGE
nodeSets:
- name: default
count: 1
config:
node.store.allow_mmap: false
xpack.security.authc:
anonymous:
roles: viewer
authz_exception: true
podTemplate:
spec:
containers:
- name: elasticsearch
env:
- name: ES_JAVA_OPTS
value: -Xms2g -Xmx2g
resources:
requests:
memory: 4Gi
cpu: 2
limits:
memory: 4Gi
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: $DEPLOYMENT_NAME
namespace: $DEPLOYMENT_NAME
annotations:
kubernetes.io/ingress.class: 'nginx'
cert-manager.io/cluster-issuer: 'letsencrypt-prod'
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
tls:
- hosts:
- demo.kibana.dev
secretName: tls-certificate
rules:
- host: demo.kibana.dev
http:
paths:
- path: /$DEPLOYMENT_MINOR_VERSION(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: $DEPLOYMENT_NAME-kb-http
port:
number: 5601
33 changes: 33 additions & 0 deletions .buildkite/scripts/steps/demo_env/kibana.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

set -euo pipefail

export DISABLE_BOOTSTRAP_VALIDATION=true
export BUILD_TS_REFS_DISABLE=true

.buildkite/scripts/bootstrap.sh

source "$(dirname "${0}")/config.sh"

export KIBANA_IMAGE="gcr.io/elastic-kibana-184716/demo/kibana:$DEPLOYMENT_NAME-$(git rev-parse HEAD)"

echo '--- Build Kibana'
node scripts/build --debug --docker-images --example-plugins --skip-os-packages --skip-docker-ubi

echo '--- Build Docker image with example plugins'
cd target/example_plugins
BUILT_IMAGE="docker.elastic.co/kibana/kibana:$DEPLOYMENT_VERSION-SNAPSHOT"
docker build --build-arg BASE_IMAGE="$BUILT_IMAGE" -t "$KIBANA_IMAGE" -f "$KIBANA_DIR/.buildkite/scripts/steps/demo_env/Dockerfile" .
docker push "$KIBANA_IMAGE"
cd -

"$(dirname "${0}")/auth.sh"

echo '--- Prepare yaml'

TEMPLATE=$(envsubst < "$(dirname "${0}")/kibana.yml")

echo "$TEMPLATE"

echo '--- Deploy yaml'
echo "$TEMPLATE" | kubectl apply -f -
39 changes: 39 additions & 0 deletions .buildkite/scripts/steps/demo_env/kibana.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: $DEPLOYMENT_NAME
namespace: $DEPLOYMENT_NAME
spec:
version: $DEPLOYMENT_VERSION
image: $KIBANA_IMAGE
count: 1
elasticsearchRef:
name: $DEPLOYMENT_NAME
http:
tls:
selfSignedCertificate:
disabled: true
config:
server:
basePath: '/$DEPLOYMENT_MINOR_VERSION'
publicBaseUrl: 'https://demo.kibana.dev/$DEPLOYMENT_MINOR_VERSION'
xpack.security.authc.providers:
basic.basic1:
order: 0
anonymous.anonymous1:
order: 1
credentials: 'elasticsearch_anonymous_user'
podTemplate:
spec:
containers:
- name: kibana
env:
- name: NODE_OPTIONS
value: '--max-old-space-size=2048'
resources:
requests:
memory: 1Gi
cpu: 0.5
limits:
memory: 2.5Gi
cpu: 2
2 changes: 2 additions & 0 deletions .ci/Jenkinsfile_baseline_trigger
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/groovy

return

def MAXIMUM_COMMITS_TO_CHECK = 10
def MAXIMUM_COMMITS_TO_BUILD = 5

Expand Down
56 changes: 31 additions & 25 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,34 @@
# Virtual teams
/x-pack/plugins/rule_registry/ @elastic/rac

# App
/x-pack/plugins/discover_enhanced/ @elastic/kibana-app
/x-pack/plugins/lens/ @elastic/kibana-app
/x-pack/plugins/graph/ @elastic/kibana-app
/src/plugins/advanced_settings/ @elastic/kibana-app
/src/plugins/charts/ @elastic/kibana-app
/src/plugins/discover/ @elastic/kibana-app
/src/plugins/management/ @elastic/kibana-app
/src/plugins/kibana_legacy/ @elastic/kibana-app
/src/plugins/timelion/ @elastic/kibana-app
/src/plugins/vis_default_editor/ @elastic/kibana-app
/src/plugins/vis_type_metric/ @elastic/kibana-app
/src/plugins/vis_type_table/ @elastic/kibana-app
/src/plugins/vis_type_tagcloud/ @elastic/kibana-app
/src/plugins/vis_type_timelion/ @elastic/kibana-app
/src/plugins/vis_type_timeseries/ @elastic/kibana-app
/src/plugins/vis_type_vega/ @elastic/kibana-app
/src/plugins/vis_types/vislib/ @elastic/kibana-app
/src/plugins/vis_types/xy/ @elastic/kibana-app
/src/plugins/vis_types/pie/ @elastic/kibana-app
/src/plugins/visualize/ @elastic/kibana-app
/src/plugins/visualizations/ @elastic/kibana-app
/src/plugins/chart_expressions/expression_tagcloud/ @elastic/kibana-app
/src/plugins/url_forwarding/ @elastic/kibana-app
/packages/kbn-tinymath/ @elastic/kibana-app
# Data Discovery
/src/plugins/discover/ @elastic/kibana-data-discovery
/x-pack/plugins/discover_enhanced/ @elastic/kibana-data-discovery
/test/functional/apps/discover/ @elastic/kibana-data-discovery

# Vis Editors
/x-pack/plugins/lens/ @elastic/kibana-vis-editors
/x-pack/plugins/graph/ @elastic/kibana-vis-editors
/src/plugins/advanced_settings/ @elastic/kibana-vis-editors
/src/plugins/charts/ @elastic/kibana-vis-editors
/src/plugins/management/ @elastic/kibana-vis-editors
/src/plugins/kibana_legacy/ @elastic/kibana-vis-editors
/src/plugins/timelion/ @elastic/kibana-vis-editors
/src/plugins/vis_default_editor/ @elastic/kibana-vis-editors
/src/plugins/vis_type_metric/ @elastic/kibana-vis-editors
/src/plugins/vis_type_table/ @elastic/kibana-vis-editors
/src/plugins/vis_type_tagcloud/ @elastic/kibana-vis-editors
/src/plugins/vis_type_timelion/ @elastic/kibana-vis-editors
/src/plugins/vis_type_timeseries/ @elastic/kibana-vis-editors
/src/plugins/vis_type_vega/ @elastic/kibana-vis-editors
/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/visualize/ @elastic/kibana-vis-editors
/src/plugins/visualizations/ @elastic/kibana-vis-editors
/src/plugins/chart_expressions/expression_tagcloud/ @elastic/kibana-vis-editors
/src/plugins/url_forwarding/ @elastic/kibana-vis-editors
/packages/kbn-tinymath/ @elastic/kibana-vis-editors

# Application Services
/examples/bfetch_explorer/ @elastic/kibana-app-services
Expand Down Expand Up @@ -436,6 +439,9 @@
/x-pack/test/reporting_api_integration/ @elastic/kibana-reporting-services @elastic/kibana-app-services
/x-pack/test/reporting_functional/ @elastic/kibana-reporting-services @elastic/kibana-app-services
/x-pack/test/stack_functional_integration/apps/reporting/ @elastic/kibana-reporting-services @elastic/kibana-app-services
/docs/user/reporting @elastic/kibana-reporting-services @elastic/kibana-app-services
/docs/settings/reporting-settings.asciidoc @elastic/kibana-reporting-services @elastic/kibana-app-services
/docs/setup/configuring-reporting.asciidoc @elastic/kibana-reporting-services @elastic/kibana-app-services
#CC# /x-pack/plugins/reporting/ @elastic/kibana-reporting-services


2 changes: 1 addition & 1 deletion .github/workflows/project-assigner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
issue-mappings: |
[
{"label": "Feature:Lens", "projectNumber": 32, "columnName": "Long-term goals"},
{"label": "Feature:Discover", "projectNumber": 44, "columnName": "Inbox"},
{"label": "Team:DataDiscovery", "projectNumber": 44, "columnName": "Inbox"},
{"label": "Feature:Canvas", "projectNumber": 38, "columnName": "Inbox"},
{"label": "Feature:Dashboard", "projectNumber": 68, "columnName": "Inbox"},
{"label": "Feature:Drilldowns", "projectNumber": 68, "columnName": "Inbox"},
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.17.5
14.17.6
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.17.5
14.17.6
12 changes: 6 additions & 6 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ check_rules_nodejs_version(minimum_version_string = "3.8.0")
# we can update that rule.
node_repositories(
node_repositories = {
"14.17.5-darwin_amd64": ("node-v14.17.5-darwin-x64.tar.gz", "node-v14.17.5-darwin-x64", "2e40ab625b45b9bdfcb963ddd4d65d87ddf1dd37a86b6f8b075cf3d77fe9dc09"),
"14.17.5-linux_arm64": ("node-v14.17.5-linux-arm64.tar.xz", "node-v14.17.5-linux-arm64", "3a2e674b6db50dfde767c427e8f077235bbf6f9236e1b12a4cc3496b12f94bae"),
"14.17.5-linux_s390x": ("node-v14.17.5-linux-s390x.tar.xz", "node-v14.17.5-linux-s390x", "7d40eee3d54241403db12fb3bc420cd776e2b02e89100c45cf5e74a73942e7f6"),
"14.17.5-linux_amd64": ("node-v14.17.5-linux-x64.tar.xz", "node-v14.17.5-linux-x64", "2d759de07a50cd7f75bd73d67e97b0d0e095ee3c413efac7d1b3d1e84ed76fff"),
"14.17.5-windows_amd64": ("node-v14.17.5-win-x64.zip", "node-v14.17.5-win-x64", "a99b7ee08e846e5d1f4e70c4396265542819d79ed9cebcc27760b89571f03cbf"),
"14.17.6-darwin_amd64": ("node-v14.17.6-darwin-x64.tar.gz", "node-v14.17.6-darwin-x64", "e3e4c02240d74fb1dc8a514daa62e5de04f7eaee0bcbca06a366ece73a52ad88"),
"14.17.6-linux_arm64": ("node-v14.17.6-linux-arm64.tar.xz", "node-v14.17.6-linux-arm64", "9c4f3a651e03cd9b5bddd33a80e8be6a6eb15e518513e410bb0852a658699156"),
"14.17.6-linux_s390x": ("node-v14.17.6-linux-s390x.tar.xz", "node-v14.17.6-linux-s390x", "3677f35b97608056013b5368f86eecdb044bdccc1b3976c1d4448736c37b6a0c"),
"14.17.6-linux_amd64": ("node-v14.17.6-linux-x64.tar.xz", "node-v14.17.6-linux-x64", "3bbe4faf356738d88b45be222bf5e858330541ff16bd0d4cfad36540c331461b"),
"14.17.6-windows_amd64": ("node-v14.17.6-win-x64.zip", "node-v14.17.6-win-x64", "b83e9ce542fda7fc519cec6eb24a2575a84862ea4227dedc171a8e0b5b614ac0"),
},
node_version = "14.17.5",
node_version = "14.17.6",
node_urls = [
"https://nodejs.org/dist/v{version}/{filename}",
],
Expand Down
2 changes: 1 addition & 1 deletion dev_docs/building_blocks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Check out the Lens Embeddable if you wish to show users visualizations based on
and <DocLink id="kibBuildingBlocks" section="ui-actions--triggers" text="UI Actions"/>. Using the same configuration, it's also possible to link to
a prefilled Lens editor, allowing the user to drill deeper and explore their data.

**Github labels**: `Team:KibanaApp`, `Feature:Lens`
**Github labels**: `Team:VisEditors`, `Feature:Lens`

### Map Embeddable

Expand Down
4 changes: 3 additions & 1 deletion docs/api/actions-and-connectors/get_all.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The API returns the following:
"connector_type_id": ".email",
"name": "email: preconfigured-mail-connector",
"is_preconfigured": true,
"referenced_by_count": 1
"referenced_by_count": 0 <1>
},
{
"id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad",
Expand All @@ -61,3 +61,5 @@ The API returns the following:
}
]
--------------------------------------------------

<1> `referenced_by_count` - The number of saved-objects referencing this connector. This value is not calculated if `is_preconfigured: true`.
10 changes: 10 additions & 0 deletions docs/api/saved-objects/bulk_get.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ experimental[] Retrieve multiple {kib} saved objects by ID.
`fields`::
(Optional, array) The fields to return in the `attributes` key of the object response.

`namespaces`::
(Optional, string array) Identifiers for the <<xpack-spaces,spaces>> in which to search for this object. If this is provided, the object
is searched for only in the explicitly defined spaces. If this is not provided, the object is searched for in the current space (default
behavior).
* For shareable object types (registered with `namespaceType: 'multiple'`): this option can be used to specify one or more spaces, including
the "All spaces" identifier (`'*'`).
* For isolated object types (registered with `namespaceType: 'single'` or `namespaceType: 'multiple-isolated'`): this option can only be
used to specify a single space, and the "All spaces" identifier (`'*'`) is not allowed.
* For global object types (registered with `namespaceType: 'agnostic'`): this option cannot be used.

[[saved-objects-api-bulk-get-response-body]]
==== Response body

Expand Down
3 changes: 3 additions & 0 deletions docs/api/spaces-management.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ The following {kib} spaces APIs are available:

* <<spaces-api-resolve-copy-saved-objects-conflicts, Resolve copy saved objects to space conflicts API>> to overwrite saved objects returned as errors from the copy saved objects to space API

* <<spaces-api-disable-legacy-url-aliases, Disable legacy URL aliases API>> to disable legacy URL aliases if an error is encountered

include::spaces-management/post.asciidoc[]
include::spaces-management/put.asciidoc[]
include::spaces-management/get.asciidoc[]
include::spaces-management/get_all.asciidoc[]
include::spaces-management/delete.asciidoc[]
include::spaces-management/copy_saved_objects.asciidoc[]
include::spaces-management/resolve_copy_saved_objects_conflicts.asciidoc[]
include::spaces-management/disable_legacy_url_aliases.asciidoc[]
Loading

0 comments on commit f3f33b5

Please sign in to comment.