Skip to content

Commit

Permalink
Merge branch 'main' of github.com:elastic/kibana into reporting/add-l…
Browse files Browse the repository at this point in the history
…ink-to-kibana-app

* 'main' of github.com:elastic/kibana: (290 commits)
  [Connectors][ServiceNow] Remove SN flags (elastic#117511)
  [ML] Functional tests - stabilize and re-enable feature importance tests (elastic#117503)
  [RAC] Disable the actions button if the user has inadequate privileges (elastic#117488)
  [Visualize] [xyChart] filter labels by default (elastic#117288)
  Fix warning when setting description to undefined (elastic#117338)
  [build] Set monitoring.ui.container.elasticsearch.enabled for all containers (elastic#115087)
  fix types
  [Alerting] UX fixes for execution duration chart (elastic#117193)
  [CI] Delete node_modules in between bootstrap attempts (elastic#117588)
  Flaky test fixes (elastic#117028)
  [Security Solution] [Sourcerer] [Feature Branch] Update to use Kibana Data Views  (elastic#114806)
  [ML] Hide anomaly entity filter button tooltips when clicked (elastic#117493)
  adjust the synthetics journey type (elastic#117316)
  Refines hasAnyData check for alerts (elastic#117499)
  [Fleet] Default to APM tutorial (elastic#117421)
  [Maps] update docs for index pattern -> data view rename (elastic#117400)
  [Logs UI][Metrics UI] Remove deprecated config fields from APIs and SavedObjects (elastic#116821)
  [Fleet] Fix agent logs not reading query from URL (elastic#117286)
  Fixing Failing test: Chrome X-Pack UI Functional Tests.x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout·ts - Actions and Triggers app create alert should successfully test valid es_query alert (elastic#114917)
  [Metrics UI] Add docs link to redundant groupBy detection (elastic#116822)
  ...

# Conflicts:
#	x-pack/plugins/reporting/public/management/__snapshots__/report_listing.test.tsx.snap
#	x-pack/plugins/reporting/public/shared_imports.ts
#	x-pack/plugins/reporting/server/routes/management/jobs.ts
  • Loading branch information
jloleysens committed Nov 5, 2021
2 parents da6314e + 5ce12b2 commit 55c195e
Show file tree
Hide file tree
Showing 2,911 changed files with 76,684 additions and 44,707 deletions.
4 changes: 2 additions & 2 deletions .backportrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"upstream": "elastic/kibana",
"targetBranchChoices": [
{ "name": "master", "checked": true },
{ "name": "main", "checked": true },
"8.0",
"7.16",
"7.15",
Expand Down Expand Up @@ -33,7 +33,7 @@
],
"targetPRLabels": ["backport"],
"branchLabelMapping": {
"^v8.1.0$": "master",
"^v8.1.0$": "main",
"^v(\\d+).(\\d+).\\d+$": "$1.$2"
},
"autoMerge": true,
Expand Down
4 changes: 2 additions & 2 deletions .bazelrc.common
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ test --experimental_guard_against_concurrent_changes
query --experimental_guard_against_concurrent_changes

## Cache action outputs on disk so they persist across output_base and bazel shutdown (eg. changing branches)
common --disk_cache=~/.bazel-cache/disk-cache
build --disk_cache=~/.bazel-cache/disk-cache

## Bazel repo cache settings
common --repository_cache=~/.bazel-cache/repository-cache
build --repository_cache=~/.bazel-cache/repository-cache

# Bazel will create symlinks from the workspace directory to output artifacts.
# Build results will be placed in a directory called "bazel-bin"
Expand Down
7 changes: 7 additions & 0 deletions .buildkite/pipelines/hourly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ steps:
key: linting
timeout_in_minutes: 90

- command: .buildkite/scripts/steps/lint_with_types.sh
label: 'Linting (with types)'
agents:
queue: c2-16
key: linting_with_types
timeout_in_minutes: 90

- command: .buildkite/scripts/steps/checks.sh
label: 'Checks'
agents:
Expand Down
2 changes: 0 additions & 2 deletions .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ steps:

- command: .buildkite/scripts/steps/on_merge_build_and_metrics.sh
label: Default Build and Metrics
env:
BAZEL_CACHE_MODE: read-write
agents:
queue: c2-8
timeout_in_minutes: 60
Expand Down
2 changes: 0 additions & 2 deletions .buildkite/pipelines/performance/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ steps:
agents:
queue: ci-group-6
depends_on: build
concurrency: 50
concurrency_group: 'performance-test-group'

- wait: ~
continue_on_failure: true
Expand Down
7 changes: 7 additions & 0 deletions .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ steps:
key: linting
timeout_in_minutes: 90

- command: .buildkite/scripts/steps/lint_with_types.sh
label: 'Linting (with types)'
agents:
queue: c2-16
key: linting_with_types
timeout_in_minutes: 90

- command: .buildkite/scripts/steps/checks.sh
label: 'Checks'
agents:
Expand Down
11 changes: 11 additions & 0 deletions .buildkite/pipelines/pull_request/fleet_cypress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
steps:
- command: .buildkite/scripts/steps/functional/fleet_cypress.sh
label: 'Fleet Cypress Tests'
agents:
queue: ci-group-6
depends_on: build
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '*'
limit: 1
12 changes: 11 additions & 1 deletion .buildkite/scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ source .buildkite/scripts/common/util.sh
source .buildkite/scripts/common/setup_bazel.sh

echo "--- yarn install and bootstrap"
retry 2 15 yarn kbn bootstrap
if ! yarn kbn bootstrap; then
echo "bootstrap failed, trying again in 15 seconds"
sleep 15

# Most bootstrap failures will result in a problem inside node_modules that does not get fixed on the next bootstrap
# So, we should just delete node_modules in between attempts
rm -rf node_modules

echo "--- yarn install and bootstrap, attempt 2"
yarn kbn bootstrap
fi

###
### upload ts-refs-cache artifacts as quickly as possible so they are available for download
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 @@ -76,6 +76,16 @@ const uploadPipeline = (pipelineContent) => {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/apm_cypress.yml'));
}

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

if (await doAnyChangesMatch([/^x-pack\/plugins\/uptime/])) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/uptime.yml'));
}
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/scripts/steps/es_snapshots/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ mkdir -p "$destination"
mkdir -p elasticsearch && cd elasticsearch

export ELASTICSEARCH_BRANCH="${ELASTICSEARCH_BRANCH:-$BUILDKITE_BRANCH}"
# Until ES renames their master branch to main...
if [[ "$ELASTICSEARCH_BRANCH" == "main" ]]; then
export ELASTICSEARCH_BRANCH="master"
fi

if [[ ! -d .git ]]; then
git init
Expand Down
20 changes: 20 additions & 0 deletions .buildkite/scripts/steps/functional/fleet_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-fleet-cypress

echo "--- Fleet Cypress tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "Fleet Cypress Tests" \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config test/fleet_cypress/cli_config.ts
2 changes: 2 additions & 0 deletions .buildkite/scripts/steps/functional/performance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ cat << EOF | buildkite-agent pipeline upload
steps:
- command: .buildkite/scripts/steps/functional/performance_sub.sh
parallelism: "$ITERATION_COUNT"
concurrency: 20
concurrency_group: 'performance-test-group'
EOF


Expand Down
12 changes: 12 additions & 0 deletions .buildkite/scripts/steps/lint_with_types.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/common/util.sh

export BUILD_TS_REFS_DISABLE=false
.buildkite/scripts/bootstrap.sh

echo '--- Lint: eslint (with types)'
checks-reporter-with-killswitch "Lint: eslint (with types)" \
node scripts/eslint_with_types
2 changes: 1 addition & 1 deletion .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts

ARG NODE_VERSION=16.11.1
ARG NODE_VERSION=16.13.0

FROM node:${NODE_VERSION} AS base

Expand Down
2 changes: 1 addition & 1 deletion .ci/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ if [[ "$(which docker)" != "" && "$(command uname -m)" != "aarch64" ]]; then
docker pull "maven:3.6.3-openjdk-8-slim"
fi

./.ci/packer_cache_for_branch.sh master
./.ci/packer_cache_for_branch.sh main
./.ci/packer_cache_for_branch.sh 7.16
4 changes: 2 additions & 2 deletions .ci/packer_cache_for_branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ checkoutDir="$(pwd)"

function cleanup()
{
if [[ "$branch" != "master" ]]; then
if [[ "$branch" != "main" ]]; then
rm --preserve-root -rf "$checkoutDir"
fi

Expand All @@ -16,7 +16,7 @@ function cleanup()

trap 'cleanup' 0

if [[ "$branch" != "master" ]]; then
if [[ "$branch" != "main" ]]; then
checkoutDir="/tmp/kibana-$branch"
git clone https://github.com/elastic/kibana.git --branch "$branch" --depth 1 "$checkoutDir"
cd "$checkoutDir"
Expand Down
17 changes: 6 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -902,17 +902,6 @@ module.exports = {
},
},

/**
* Cases overrides
*/
{
files: ['x-pack/plugins/cases/**/*.{js,mjs,ts,tsx}'],
rules: {
'no-duplicate-imports': 'off',
'@typescript-eslint/no-duplicate-imports': ['error'],
},
},

/**
* Security Solution overrides. These rules below are maintained and owned by
* the people within the security-solution-platform team. Please see ping them
Expand All @@ -928,6 +917,8 @@ module.exports = {
'x-pack/plugins/security_solution/common/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/timelines/public/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/timelines/common/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/cases/public/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/cases/common/**/*.{js,mjs,ts,tsx}',
],
rules: {
'import/no-nodejs-modules': 'error',
Expand All @@ -949,10 +940,12 @@ module.exports = {
files: [
'x-pack/plugins/security_solution/**/*.{ts,tsx}',
'x-pack/plugins/timelines/**/*.{ts,tsx}',
'x-pack/plugins/cases/**/*.{ts,tsx}',
],
excludedFiles: [
'x-pack/plugins/security_solution/**/*.{test,mock,test_helper}.{ts,tsx}',
'x-pack/plugins/timelines/**/*.{test,mock,test_helper}.{ts,tsx}',
'x-pack/plugins/cases/**/*.{test,mock,test_helper}.{ts,tsx}',
],
rules: {
'@typescript-eslint/no-non-null-assertion': 'error',
Expand All @@ -963,6 +956,7 @@ module.exports = {
files: [
'x-pack/plugins/security_solution/**/*.{ts,tsx}',
'x-pack/plugins/timelines/**/*.{ts,tsx}',
'x-pack/plugins/cases/**/*.{ts,tsx}',
],
rules: {
'@typescript-eslint/no-this-alias': 'error',
Expand All @@ -985,6 +979,7 @@ module.exports = {
files: [
'x-pack/plugins/security_solution/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/timelines/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/cases/**/*.{js,mjs,ts,tsx}',
],
plugins: ['eslint-plugin-node', 'react'],
env: {
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
/src/core/ @elastic/kibana-core
/src/plugins/saved_objects_tagging_oss @elastic/kibana-core
/config/kibana.yml @elastic/kibana-core
/typings/ @elastic/kibana-core
/x-pack/plugins/banners/ @elastic/kibana-core
/x-pack/plugins/features/ @elastic/kibana-core
/x-pack/plugins/licensing/ @elastic/kibana-core
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/v8_breaking_change.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ changes to Upgrade Assistant itself, please tag Team:Elasticsearch UI.

**Are there any edge cases?**

**[For Kibana deprecations] Can the change be registered with the [Kibana deprecation service](https://github.com/elastic/kibana/blob/master/docs/development/core/server/kibana-plugin-core-server.deprecationsservicesetup.md)?**
**[For Kibana deprecations] Can the change be registered with the [Kibana deprecation service](https://github.com/elastic/kibana/blob/main/docs/development/core/server/kibana-plugin-core-server.deprecationsservicesetup.md)?**

<!-- The deprecation service is consumed by the Upgrade Assistant to surface Kibana deprecations.
It provides a way for Kibana deprecations to be resolved automatically via an API
Expand Down
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Summarize your PR. If it involves visual changes include a screenshot or gif.

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)
- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials
- [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
- [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/master/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

Expand All @@ -30,7 +30,7 @@ When forming the risk matrix, consider some of the following examples and how th
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. |
| Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. |
| [See more potential risk examples](https://github.com/elastic/kibana/blob/master/RISK_MATRIX.mdx) |
| [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers
Expand Down
23 changes: 21 additions & 2 deletions .github/workflows/add-to-apm-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ on:
jobs:
add_to_project:
runs-on: ubuntu-latest
if: |
github.event.label.name == 'Team:apm'
steps:
- uses: octokit/graphql-action@v2.x
id: add_to_project
if: |
github.event.label.name == 'Team:apm'
with:
headers: '{"GraphQL-Features": "projects_next_graphql"}'
query: |
Expand All @@ -26,3 +26,22 @@ jobs:
env:
PROJECT_ID: "PN_kwDOAGc3Zs0VSg"
GITHUB_TOKEN: ${{ secrets.APM_TECH_KIBANA_USER_TOKEN }}
- uses: octokit/graphql-action@v2.x
id: label_team
with:
headers: '{"GraphQL-Features": "projects_next_graphql"}'
query: |
mutation label_team($projectid:String!,$itemid:String!,$fieldid:String!,$value:String!) {
updateProjectNextItemField(input: { projectId:$projectid itemId:$itemid fieldId:$fieldid value:$value }) {
projectNextItem {
id
}
}
}
projectid: ${{ env.PROJECT_ID }}
itemid: ${{ fromJSON(steps.add_to_project.outputs.data).addProjectNextItem.projectNextItem.id }}
fieldid: "MDE2OlByb2plY3ROZXh0RmllbGQ0NDE0Ng=="
value: "c33f5c54"
env:
PROJECT_ID: "PN_kwDOAGc3Zs0VSg"
GITHUB_TOKEN: ${{ secrets.APM_TECH_KIBANA_USER_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
pull_request_target:
branches:
- master
- main
types:
- labeled
- closed
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fix-version-gaps.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
pull_request:
branches:
- master
- main
types:
- closed

Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/sync-main-branch.yml

This file was deleted.

0 comments on commit 55c195e

Please sign in to comment.