Skip to content

Commit

Permalink
Merge branch 'main' into profiling-data-access-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes authored Aug 31, 2023
2 parents 46f7e3d + b55c949 commit 479b839
Show file tree
Hide file tree
Showing 1,030 changed files with 18,105 additions and 12,100 deletions.
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
183 changes: 183 additions & 0 deletions .github/workflows/create-deploy-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
---
# - 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": "mrkdwn",
"text": "*Git tag:*\n<https://github.com/elastic/kibana/releases/tag/${{ env.TAG_NAME }}|${{ env.TAG_NAME }}>"
}
]
},
{
"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
4 changes: 2 additions & 2 deletions api_docs/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions
title: "actions"
image: https://source.unsplash.com/400x175/?github
description: API docs for the actions plugin
date: 2023-08-30
date: 2023-08-31
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
---
import actionsObj from './actions.devdocs.json';
Expand All @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o

| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
| 267 | 0 | 261 | 28 |
| 267 | 0 | 261 | 30 |

## Client

Expand Down
2 changes: 1 addition & 1 deletion api_docs/advanced_settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings
title: "advancedSettings"
image: https://source.unsplash.com/400x175/?github
description: API docs for the advancedSettings plugin
date: 2023-08-30
date: 2023-08-31
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
---
import advancedSettingsObj from './advanced_settings.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/aiops.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops
title: "aiops"
image: https://source.unsplash.com/400x175/?github
description: API docs for the aiops plugin
date: 2023-08-30
date: 2023-08-31
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
---
import aiopsObj from './aiops.devdocs.json';
Expand Down
Loading

0 comments on commit 479b839

Please sign in to comment.