Skip to content

Commit

Permalink
Merge branch 'main' into fix/163246
Browse files Browse the repository at this point in the history
  • Loading branch information
dej611 authored Aug 31, 2023
2 parents ee1fef6 + 0ea37c1 commit 9a8b563
Show file tree
Hide file tree
Showing 1,264 changed files with 21,427 additions and 13,740 deletions.
2 changes: 1 addition & 1 deletion .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ enabled:
- x-pack/test/functional/apps/data_views/config.ts
- x-pack/test/functional/apps/dev_tools/config.ts
- x-pack/test/functional/apps/discover/config.ts
- x-pack/test/functional/apps/discover_log_explorer/config.ts
- x-pack/test/functional/apps/graph/config.ts
- x-pack/test/functional/apps/grok_debugger/config.ts
- x-pack/test/functional/apps/home/config.ts
Expand Down Expand Up @@ -313,6 +312,7 @@ enabled:
- x-pack/test/functional/apps/ml/short_tests/config.ts
- x-pack/test/functional/apps/ml/stack_management_jobs/config.ts
- x-pack/test/functional/apps/monitoring/config.ts
- x-pack/test/functional/apps/observability_log_explorer/config.ts
- x-pack/test/functional/apps/remote_clusters/config.ts
- x-pack/test/functional/apps/reporting_management/config.ts
- x-pack/test/functional/apps/rollup_job/config.ts
Expand Down
27 changes: 14 additions & 13 deletions .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,20 @@ steps:
artifact_paths:
- "target/kibana-security-solution/**/*"

- command: .buildkite/scripts/steps/functional/security_serverless_defend_workflows.sh
label: 'Serverless Security Defend Workflows Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 40
soft_fail: true
retry:
automatic:
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-security-solution/**/*"
# status_exception: Native role management is not enabled in this Elasticsearch instance
# - command: .buildkite/scripts/steps/functional/security_serverless_defend_workflows.sh
# label: 'Serverless Security Defend Workflows Cypress Tests'
# agents:
# queue: n2-4-spot
# depends_on: build
# timeout_in_minutes: 40
# soft_fail: true
# retry:
# automatic:
# - exit_status: '*'
# limit: 1
# artifact_paths:
# - "target/kibana-security-solution/**/*"

- command: .buildkite/scripts/steps/functional/security_serverless_investigations.sh
label: 'Serverless Security Investigations Cypress Tests'
Expand Down
6 changes: 3 additions & 3 deletions .buildkite/pipelines/pull_request/defend_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ steps:
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
timeout_in_minutes: 60
parallelism: 2
retry:
automatic:
Expand All @@ -18,8 +18,8 @@ steps:
agents:
queue: n2-4-virt
depends_on: build
timeout_in_minutes: 120
parallelism: 5
timeout_in_minutes: 60
parallelism: 6
retry:
automatic:
- exit_status: '*'
Expand Down
27 changes: 14 additions & 13 deletions .buildkite/pipelines/pull_request/osquery_cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ steps:
artifact_paths:
- "target/kibana-osquery/**/*"

- command: .buildkite/scripts/steps/functional/security_serverless_osquery.sh
label: 'Serverless Osquery Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 50
parallelism: 6
retry:
automatic:
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-osquery/**/*"
# Error: self-signed certificate in certificate chain
# - command: .buildkite/scripts/steps/functional/security_serverless_osquery.sh
# label: 'Serverless Osquery Cypress Tests'
# agents:
# queue: n2-4-spot
# depends_on: build
# timeout_in_minutes: 50
# parallelism: 6
# retry:
# automatic:
# - exit_status: '*'
# limit: 1
# artifact_paths:
# - "target/kibana-osquery/**/*"
4 changes: 4 additions & 0 deletions .buildkite/scripts/steps/functional/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ if [[ -d "$cacheDir" ]]; then
fi

is_test_execution_step

# logins into docker as a common step for functional tests
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
trap 'docker logout docker.elastic.co' EXIT
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

set -euo pipefail

source .buildkite/scripts/common/util.sh
source .buildkite/scripts/steps/functional/common.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

.buildkite/scripts/bootstrap.sh
# TODO: remove the line below to use build artifacts for tests.
# in addition to remove the line, we will have to expose the kibana install dir into the downloaded build location
# by exporting a var like:
# export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}
node scripts/build_kibana_platform_plugins.js

export JOB=kibana-osquery-cypress-serverless
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/storybooks/build_and_upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const STORYBOOKS = [
'dashboard_enhanced',
'dashboard',
'data',
'discover_log_explorer',
'log_explorer',
'embeddable',
'expression_error',
'expression_image',
Expand Down
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,7 @@ module.exports = {
overrides: [
{
files: [
'x-pack/packages/security-solution/features/**/*.{js,mjs,ts,tsx}',
'x-pack/packages/security-solution/navigation/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/security_solution/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/security_solution_ess/**/*.{js,mjs,ts,tsx}',
Expand Down
5 changes: 4 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ packages/kbn-dev-utils @elastic/kibana-operations
examples/developer_examples @elastic/appex-sharedux
examples/discover_customization_examples @elastic/kibana-data-discovery
x-pack/plugins/discover_enhanced @elastic/kibana-data-discovery
x-pack/plugins/discover_log_explorer @elastic/infra-monitoring-ui
src/plugins/discover @elastic/kibana-data-discovery
packages/kbn-discover-utils @elastic/kibana-data-discovery
packages/kbn-doc-links @elastic/docs
Expand Down Expand Up @@ -472,6 +471,7 @@ packages/kbn-lint-ts-projects-cli @elastic/kibana-operations
x-pack/plugins/lists @elastic/security-detection-engine
examples/locator_examples @elastic/kibana-app-services
examples/locator_explorer @elastic/kibana-app-services
x-pack/plugins/log_explorer @elastic/infra-monitoring-ui
packages/kbn-logging @elastic/kibana-core
packages/kbn-logging-mocks @elastic/kibana-core
x-pack/plugins/logs_shared @elastic/infra-monitoring-ui
Expand Down Expand Up @@ -524,6 +524,7 @@ packages/kbn-object-versioning @elastic/appex-sharedux
x-pack/plugins/observability_ai_assistant @elastic/obs-ai-assistant
x-pack/packages/observability/alert_details @elastic/actionable-observability
x-pack/test/cases_api_integration/common/plugins/observability @elastic/response-ops
x-pack/plugins/observability_log_explorer @elastic/infra-monitoring-ui
x-pack/plugins/observability_onboarding @elastic/apm-ui
x-pack/plugins/observability @elastic/actionable-observability
x-pack/plugins/observability_shared @elastic/observability-ui
Expand Down Expand Up @@ -600,6 +601,7 @@ x-pack/plugins/searchprofiler @elastic/platform-deployment-management
x-pack/test/security_api_integration/packages/helpers @elastic/kibana-security
x-pack/plugins/security @elastic/kibana-security
x-pack/plugins/security_solution_ess @elastic/security-solution
x-pack/packages/security-solution/features @elastic/security-threat-hunting-explore
x-pack/test/cases_api_integration/common/plugins/security_solution @elastic/response-ops
x-pack/packages/security-solution/navigation @elastic/security-threat-hunting-explore
x-pack/plugins/security_solution @elastic/security-solution
Expand Down Expand Up @@ -1044,6 +1046,7 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/.github/codeql @elastic/kibana-security
/.github/workflows/codeql.yml @elastic/kibana-security
/src/dev/eslint/security_eslint_rule_tests.ts @elastic/kibana-security
/src/core/server/integration_tests/config/check_dynamic_config.test.ts @elastic/kibana-security
/src/plugins/telemetry/server/config/telemetry_labels.ts @elastic/kibana-security
/test/interactive_setup_api_integration/ @elastic/kibana-security
/test/interactive_setup_functional/ @elastic/kibana-security
Expand Down
179 changes: 179 additions & 0 deletions .github/workflows/create-deploy-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
---
# - This workflow creates a tag with the format "deploy@<timestamp>" on the main branch.
# - It is triggered manually from the GitHub Actions UI.
# - It is only allowed to run on the main branch and ensures that the tag is created
# on the main branch only in a verification step.
# This is only to prevent accidental creation of the tag on other branches and cannot be used to prevent malicious creation of the tag.

name: "Serverless: Promote to QA"

on:
workflow_dispatch:
inputs:
commit:
description: "Commit to promote (default: latest commit on main)"

concurrency:
group: ${{ github.workflow }}

jobs:
create-deploy-tag:
# Temporary, we need a way to limit this to a GitHub team instead of specific users
if: contains('["watson","clintandrewhall","kobelb","lukeelmers","thomasneirynck"]', github.triggering_actor)
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Select commit to be tagged
run: |
commit="${{ github.event.inputs.commit || github.sha }}"
echo "COMMIT=${commit}" >> "${GITHUB_ENV}"
- name: Verify selected or newer commit isn't already tagged
run: |
git tag --contains ${COMMIT} | grep -P "^deploy@\d+$" && {
echo "A deploy-tag already exists on the selected or newer commit!"
exit 1
} || true
- name: Verify branch
run: |
if [[ "${GITHUB_REF}" != "refs/heads/main" ]]; then
echo "This workflow can only be run on the main branch"
exit 1
fi
- name: Prepare tag
run: |
tag_name="deploy@$(date +%s)"
echo "TAG_NAME=${tag_name}" >> "${GITHUB_ENV}"
- name: Create tag
run: |
git tag ${TAG_NAME} ${COMMIT}
git push origin "refs/tags/${TAG_NAME}"
- name: Post Slack success message
if: success()
uses: slackapi/[email protected]
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "A new <https://github.com/elastic/kibana/commit/${{ env.COMMIT }}|commit> has been promoted to QA 🎉\n\nOnce promotion is complete, please begin any required manual testing.\n\n*Remember:* Promotion to Staging is currently a manual process and will proceed once the build is signed off in QA."
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Initiated by:*\n<https://github.com/${{ github.triggering_actor }}|${{ github.triggering_actor }}>"
},
{
"type": "mrkdwn",
"text": "*Workflow run:*\n<https://github.com/elastic/kibana/actions/runs/${{ github.run_id }}|${{ github.run_id }}>"
},
{
"type": "mrkdwn",
"text": "*Git tag:*\n<https://github.com/elastic/kibana/releases/tag/${{ env.TAG_NAME }}|${{ env.TAG_NAME }}>"
}
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Expected Staging promotion date:"
},
"accessory": {
"type": "datepicker",
"placeholder": {
"type": "plain_text",
"text": "Select a date",
"emoji": true
},
"action_id": "datepicker-action"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Useful links:*\n\n • <https://docs.google.com/document/d/1c2LzojDh1wawjeMsKh4D_L2jpVJALhxukkmmL-TUbrs/edit#heading=h.50173f90utwr|Release process playbook>\n • <https://buildkite.com/elastic/kibana-tests/builds?branch=run-kibana-quality-gate-suites|QA Quality Gate pipeline>"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Day 1 to-do list*"
},
"accessory": {
"type": "checkboxes",
"options": [
{
"text": {
"type": "mrkdwn",
"text": "Verify successful promotion to QA"
},
"value": "value-0"
},
{
"text": {
"type": "mrkdwn",
"text": "Notify Security Solution team to beging manual testing"
},
"value": "value-1"
}
],
"action_id": "checkboxes-action"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.DEPLOY_TAGGER_SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- name: Post Slack failure message
if: failure()
uses: slackapi/[email protected]
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Promotion of <https://github.com/elastic/kibana/commit/${{ env.COMMIT }}|commit> to QA failed ⛔️"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Initiated by:*\n<https://github.com/${{ github.triggering_actor }}|${{ github.triggering_actor }}>"
},
{
"type": "mrkdwn",
"text": "*Workflow run:*\n<https://github.com/elastic/kibana/actions/runs/${{ github.run_id }}|${{ github.run_id }}>"
}
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Useful links:*\n\n • <https://docs.google.com/document/d/1c2LzojDh1wawjeMsKh4D_L2jpVJALhxukkmmL-TUbrs/edit#heading=h.50173f90utwr|Release process playbook>"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.DEPLOY_TAGGER_SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
16 changes: 5 additions & 11 deletions api_docs/actions.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3247,9 +3247,7 @@
"section": "def-common.ActionTypeExecutorResult",
"text": "ActionTypeExecutorResult"
},
"<unknown>>; enqueueExecution: (options: ",
"ExecuteOptions",
") => Promise<void>; bulkEnqueueExecution: (options: ",
"<unknown>>; bulkEnqueueExecution: (options: ",
"ExecuteOptions",
"[]) => Promise<void>; ephemeralEnqueuedExecution: (options: ",
"ExecuteOptions",
Expand All @@ -3261,14 +3259,10 @@
"section": "def-server.RunNowResult",
"text": "RunNowResult"
},
">; listTypes: ({ featureId, includeSystemActionTypes, }?: ListTypesOptions) => Promise<",
{
"pluginId": "actions",
"scope": "common",
"docId": "kibActionsPluginApi",
"section": "def-common.ActionType",
"text": "ActionType"
},
">; listTypes: ({ featureId, includeSystemActionTypes, }?: ",
"ListTypesParams",
") => Promise<",
"ConnectorType",
"[]>; isActionTypeEnabled: (actionTypeId: string, options?: { notifyUsage: boolean; }) => boolean; isPreconfigured: (connectorId: string) => boolean; isSystemAction: (connectorId: string) => boolean; getGlobalExecutionLogWithAuth: ({ dateStart, dateEnd, filter, page, perPage, sort, namespaces, }: ",
{
"pluginId": "actions",
Expand Down
Loading

0 comments on commit 9a8b563

Please sign in to comment.