Skip to content

Commit

Permalink
Merge branch 'main' into require-explicit-return-types
Browse files Browse the repository at this point in the history
  • Loading branch information
dgieselaar authored Feb 14, 2022
2 parents 57f57a4 + eb34596 commit b8cc28e
Show file tree
Hide file tree
Showing 2,172 changed files with 42,743 additions and 30,657 deletions.
2 changes: 1 addition & 1 deletion .bazeliskversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.10.1
1.11.0
2 changes: 0 additions & 2 deletions .bazelrc.common
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ build --experimental_inprocess_symlink_creation

# Incompatible flags to run with
build --incompatible_no_implicit_file_export
build --incompatible_restrict_string_escapes
query --incompatible_no_implicit_file_export
query --incompatible_restrict_string_escapes

# Log configs
## different from default
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2.1
5.0.0
5 changes: 4 additions & 1 deletion .buildkite/scripts/steps/cloud/purge.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ for (const deployment of prDeployments) {
const lastCommit = pullRequest.commits.slice(-1)[0];
const lastCommitTimestamp = new Date(lastCommit.committedDate).getTime() / 1000;

if (pullRequest.state !== 'open') {
if (pullRequest.state !== 'OPEN') {
console.log(`Pull Request #${prNumber} is no longer open, will delete associated deployment`);
deploymentsToPurge.push(deployment);
} else if (!pullRequest.labels.filter((label) => label.name === 'ci:deploy-cloud')) {
Expand All @@ -50,6 +50,9 @@ for (const deployment of deploymentsToPurge) {
console.log(`Scheduling deployment for deletion: ${deployment.name} / ${deployment.id}`);
try {
execSync(`ecctl deployment shutdown --force '${deployment.id}'`, { stdio: 'inherit' });
execSync(`vault delete secret/kibana-issues/dev/cloud-deploy/${deployment.name}`, {
stdio: 'inherit',
});
} catch (ex) {
console.error(ex.toString());
}
Expand Down
11 changes: 10 additions & 1 deletion .buildkite/scripts/steps/code_coverage/oss_cigroup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,19 @@ export CODE_COVERAGE=1
echo "--- OSS CI Group $CI_GROUP"
echo " -> Running Functional tests with code coverage"

node scripts/functional_tests \
NODE_OPTIONS=--max_old_space_size=14336 \
./node_modules/.bin/nyc \
--nycrc-path src/dev/code_coverage/nyc_config/nyc.server.config.js \
node scripts/functional_tests \
--include-tag "ciGroup$CI_GROUP" \
--exclude-tag "skipCoverage" || true

if [[ -d "$KIBANA_DIR/target/kibana-coverage/server" ]]; then
echo "--- Server side code coverage collected"
mkdir -p target/kibana-coverage/functional
mv target/kibana-coverage/server/coverage-final.json "target/kibana-coverage/functional/oss-${CI_GROUP}-server-coverage.json"
fi

if [[ -d "$KIBANA_DIR/target/kibana-coverage/functional" ]]; then
echo "--- Merging code coverage for CI Group $CI_GROUP"
yarn nyc report --nycrc-path src/dev/code_coverage/nyc_config/nyc.functional.config.js --reporter json
Expand Down
11 changes: 10 additions & 1 deletion .buildkite/scripts/steps/code_coverage/xpack_cigroup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,21 @@ echo " -> Running X-Pack functional tests with code coverage"

cd "$XPACK_DIR"

node scripts/functional_tests \
NODE_OPTIONS=--max_old_space_size=14336 \
./../node_modules/.bin/nyc \
--nycrc-path ./../src/dev/code_coverage/nyc_config/nyc.server.config.js \
node scripts/functional_tests \
--include-tag "ciGroup$CI_GROUP" \
--exclude-tag "skipCoverage" || true

cd "$KIBANA_DIR"

if [[ -d "$KIBANA_DIR/target/kibana-coverage/server" ]]; then
echo "--- Server side code coverage collected"
mkdir -p target/kibana-coverage/functional
mv target/kibana-coverage/server/coverage-final.json "target/kibana-coverage/functional/xpack-${CI_GROUP}-server-coverage.json"
fi

if [[ -d "$KIBANA_DIR/target/kibana-coverage/functional" ]]; then
echo "--- Merging code coverage for CI Group $CI_GROUP"
yarn nyc report --nycrc-path src/dev/code_coverage/nyc_config/nyc.functional.config.js --reporter json
Expand Down
3 changes: 1 addition & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,11 @@
# Uptime
/x-pack/plugins/uptime @elastic/uptime
/x-pack/plugins/ux @elastic/uptime
/x-pack/plugins/observability/public/components/shared/exploratory_view @elastic/uptime
/x-pack/test/functional_with_es_ssl/apps/uptime @elastic/uptime
/x-pack/test/functional/apps/uptime @elastic/uptime
/x-pack/test/functional/es_archives/uptime @elastic/uptime
/x-pack/test/functional/services/uptime @elastic/uptime
/x-pack/test/api_integration/apis/uptime @elastic/uptime
/x-pack/plugins/observability/public/components/shared/exploratory_view @elastic/uptime

# Client Side Monitoring / Uptime (lives in APM directories but owned by Uptime)
/x-pack/plugins/apm/public/application/uxApp.tsx @elastic/uptime
Expand Down Expand Up @@ -268,6 +266,7 @@
/packages/kbn-std/ @elastic/kibana-core
/packages/kbn-config/ @elastic/kibana-core
/packages/kbn-logging/ @elastic/kibana-core
/packages/kbn-logging-mocks/ @elastic/kibana-core
/packages/kbn-http-tools/ @elastic/kibana-core
/src/plugins/saved_objects_management/ @elastic/kibana-core
/src/dev/run_check_published_api_changes.ts @elastic/kibana-core
Expand Down
44 changes: 0 additions & 44 deletions .github/ISSUE_TEMPLATE/APM.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/add-to-fleet-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Add to Fleet:Quality project
on:
issues:
types:
- labeled
jobs:
add_to_project:
runs-on: ubuntu-latest
if: |
contains(github.event.issue.labels.*.name, 'Team:Fleet') && (
contains(github.event.issue.labels.*.name, 'technical debt') ||
contains(github.event.issue.labels.*.name, 'bug') ||
contains(github.event.issue.labels.*.name, 'performance') ||
contains(github.event.issue.labels.*.name, 'failed-test') ||
contains(github.event.issue.labels.*.name, 'chore')
)
steps:
- uses: octokit/[email protected]
id: add_to_project
with:
headers: '{"GraphQL-Features": "projects_next_graphql"}'
query: |
mutation add_to_project($projectid:String!,$contentid:String!) {
addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) {
projectNextItem {
id
}
}
}
projectid: ${{ env.PROJECT_ID }}
contentid: ${{ github.event.issue.node_id }}
env:
# https://github.com/orgs/elastic/projects/763
PROJECT_ID: "PN_kwDOAGc3Zs4AAsH6"
# Token with `write:org` access
GITHUB_TOKEN: ${{ secrets.FLEET_TECH_KIBANA_USER_TOKEN }}
22 changes: 0 additions & 22 deletions .github/workflows/dev-doc-builder.yml

This file was deleted.

78 changes: 78 additions & 0 deletions .github/workflows/label-qa-fixed-in.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Add QA labels to Fleet issues
on:
pull_request:
types:
- closed

jobs:
fetch_issues_to_label:
runs-on: ubuntu-latest
# Only run on PRs that were merged for the Fleet team
if: |
github.event.pull_request.merged_at &&
contains(github.event.pull_request.labels.*.name, 'Team:Fleet')
outputs:
matrix: ${{ steps.issues_to_label.outputs.value }}
label_ids: ${{ steps.label_ids.outputs.value }}
steps:
- uses: octokit/[email protected]
id: closing_issues
with:
query: |
query closingIssueNumbersQuery($prnumber: Int!) {
repository(owner: "elastic", name: "kibana") {
pullRequest(number: $prnumber) {
closingIssuesReferences(first: 10) {
nodes {
id
labels(first: 20) {
nodes {
id
name
}
}
}
}
}
}
}
prnumber: ${{ github.event.number }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: sergeysova/jq-action@v2
id: issues_to_label
with:
# Map to the issues' node id
cmd: echo $CLOSING_ISSUES | jq -c '.repository.pullRequest.closingIssuesReferences.nodes | map(.id)'
multiline: true
env:
CLOSING_ISSUES: ${{ steps.closing_issues.outputs.data }}
- uses: sergeysova/jq-action@v2
id: label_ids
with:
# Get list of version labels on pull request and map to label's node id, append 'QA:Ready For Testing' id ("MDU6TGFiZWwyNTQ1NjcwOTI4")
cmd: echo $PR_LABELS | jq -c 'map(select(.name | test("v[0-9]+\\.[0-9]+\\.[0-9]+")) | .node_id) + ["MDU6TGFiZWwyNTQ1NjcwOTI4"]'
multiline: true
env:
PR_LABELS: ${{ toJSON(github.event.pull_request.labels) }}

label_issues:
needs: fetch_issues_to_label
runs-on: ubuntu-latest
# For each issue closed by the PR run this job
strategy:
matrix:
issueNodeId: ${{ fromJSON(needs.fetch_issues_to_label.outputs.matrix) }}
name: Label issue ${{ matrix.issueNodeId }}
steps:
- uses: octokit/[email protected]
id: add_labels_to_closed_issue
with:
query: |
mutation add_label($issueid:String!, $labelids:[String!]!) {
addLabelsToLabelable(input: {labelableId: $issueid, labelIds: $labelids}) {
clientMutationId
}
}
issueid: ${{ matrix.issueNodeId }}
labelids: ${{ needs.fetch_issues_to_label.outputs.label_ids }}
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ npm-debug.log*
.ci/bash_standard_lib.sh
.gradle
.vagrant
.envrc

## @cypress/snapshot from apm plugin
/snapshots.js
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch Node.js rules
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "e79c08a488cc5ac40981987d862c7320cee8741122a2649e9b08e850b6f20442",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.8.0/rules_nodejs-3.8.0.tar.gz"],
sha256 = "8a7c981217239085f78acc9898a1f7ba99af887c1996ceb3b4504655383a2c3c",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.0.0/rules_nodejs-4.0.0.tar.gz"],
)

# Now that we have the rules let's import from them to complete the work
load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install")

# Assure we have at least a given rules_nodejs version
check_rules_nodejs_version(minimum_version_string = "3.8.0")
check_rules_nodejs_version(minimum_version_string = "4.0.0")

# Setup the Node.js toolchain for the architectures we want to support
#
Expand Down
2 changes: 1 addition & 1 deletion api_docs/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/actions
title: "actions"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the actions plugin
date: 2022-02-01
date: 2022-02-11
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
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 @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/advancedSettings
title: "advancedSettings"
image: https://source.unsplash.com/400x175/?github
summary: API docs for the advancedSettings plugin
date: 2022-02-01
date: 2022-02-11
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info.
---
Expand Down
Loading

0 comments on commit b8cc28e

Please sign in to comment.