Skip to content

Commit

Permalink
Merge branch 'apm-indices-space-aware-follow-up' of github.com:cauema…
Browse files Browse the repository at this point in the history
…rcondes/kibana into apm-indices-space-aware-follow-up
  • Loading branch information
cauemarcondes committed Feb 28, 2022
2 parents 16af2ea + ba0f252 commit d75a6cc
Show file tree
Hide file tree
Showing 385 changed files with 8,421 additions and 6,100 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/backport-next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
pull_request_target:
branches:
- main
types:
- labeled
- closed

jobs:
backport:
name: Backport PR
runs-on: ubuntu-latest
if: |
github.event.pull_request.merged == true
&& contains(github.event.pull_request.labels.*.name, 'auto-backport-next')
&& (
(github.event.action == 'labeled' && github.event.label.name == 'auto-backport-next')
|| (github.event.action == 'closed')
)
steps:
- name: Backport Action
uses: sqren/backport-github-action@v7.3.1
with:
github_token: ${{secrets.KIBANAMACHINE_TOKEN}}

- name: Backport log
run: cat /home/runner/.backport/backport.log
87 changes: 87 additions & 0 deletions .github/workflows/label-qa-fixed-in.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Add QA labels to Fleet issues
on:
# pull_request_target allows running actions on PRs from forks with a read/write GITHUB_TOKEN, but it will not allow
# running workflows defined in the PRs itself, only workflows already merged into the target branch. This avoids
# potential vulnerabilities that could allow someone to open a PR and retrieve secrets.
# It's important that this workflow never runs any checkout actions which could be used to circumvent this protection.
# See these links for more information:
# - https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/
# - https://nathandavison.com/blog/github-actions-and-the-threat-of-malicious-pull-requests
pull_request_target:
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/graphql-action@v2.x
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 }}
env:
GITHUB_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/graphql-action@v2.x
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 }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"@elastic/apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace",
"@elastic/charts": "43.1.1",
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.1.0-canary.2",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.1.0-canary.3",
"@elastic/ems-client": "8.0.0",
"@elastic/eui": "48.1.1",
"@elastic/filesaver": "1.1.2",
Expand Down Expand Up @@ -218,7 +218,7 @@
"constate": "^1.3.2",
"content-disposition": "0.5.3",
"copy-to-clipboard": "^3.0.8",
"core-js": "^3.21.0",
"core-js": "^3.21.1",
"cronstrue": "^1.51.0",
"cytoscape": "^3.10.0",
"cytoscape-dagre": "^2.2.2",
Expand Down Expand Up @@ -733,7 +733,7 @@
"babel-plugin-require-context-hook": "^1.0.0",
"babel-plugin-styled-components": "^2.0.2",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"backport": "7.0.1",
"backport": "^7.3.1",
"callsites": "^3.1.0",
"chai": "3.5.0",
"chance": "1.0.18",
Expand Down
5 changes: 1 addition & 4 deletions packages/elastic-apm-synthtrace/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types",

PKG_BASE_NAME = "elastic-apm-synthtrace"
PKG_REQUIRE_NAME = "@elastic/apm-synthtrace"
TYPES_PKG_REQUIRE_NAME = "@types/elastic__apm-synthtrace"

SOURCE_FILES = glob(
[
Expand Down Expand Up @@ -67,11 +66,9 @@ ts_project(
srcs = SRCS,
deps = TYPES_DEPS,
declaration = True,
declaration_map = True,
emit_declaration_only = True,
out_dir = "target_types",
root_dir = "src",
source_map = True,
tsconfig = ":tsconfig",
validate = False,
)
Expand Down Expand Up @@ -103,7 +100,7 @@ pkg_npm_types(
name = "npm_module_types",
srcs = SRCS,
deps = [":tsc_types"],
package_name = TYPES_PKG_REQUIRE_NAME,
package_name = PKG_REQUIRE_NAME,
tsconfig = ":tsconfig",
visibility = ["//visibility:public"],
)
Expand Down
3 changes: 0 additions & 3 deletions packages/elastic-apm-synthtrace/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
"extends": "../../tsconfig.bazel.json",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "target_types",
"rootDir": "./src",
"sourceMap": true,
"sourceRoot": "../../../../packages/elastic-apm-synthtrace/src",
"types": ["node", "jest"]
},
"include": ["./src/**/*.ts"]
Expand Down
5 changes: 1 addition & 4 deletions packages/elastic-datemath/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ load("//src/dev/bazel:index.bzl", "jsts_transpiler", "ts_project", "pkg_npm", "p

PKG_BASE_NAME = "elastic-datemath"
PKG_REQUIRE_NAME = "@elastic/datemath"
TYPES_PKG_REQUIRE_NAME = "@types/elastic__datemath"

SOURCE_FILES = glob([
"src/index.ts",
Expand Down Expand Up @@ -50,10 +49,8 @@ ts_project(
srcs = SRCS,
deps = TYPES_DEPS,
declaration = True,
declaration_map = True,
emit_declaration_only = True,
out_dir = "target_types",
source_map = True,
root_dir = "src",
tsconfig = ":tsconfig"
)
Expand Down Expand Up @@ -85,7 +82,7 @@ pkg_npm_types(
name = "npm_module_types",
srcs = SRCS,
deps = [":tsc_types"],
package_name = TYPES_PKG_REQUIRE_NAME,
package_name = PKG_REQUIRE_NAME,
tsconfig = ":tsconfig",
visibility = ["//visibility:public"],
)
Expand Down
3 changes: 0 additions & 3 deletions packages/elastic-datemath/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
"extends": "../../tsconfig.bazel.json",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "target_types",
"rootDir": "src",
"sourceMap": true,
"sourceRoot": "../../../../packages/elastic-datemath/src",
"types": [
"node"
]
Expand Down
5 changes: 1 addition & 4 deletions packages/kbn-ace/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types",

PKG_BASE_NAME = "kbn-ace"
PKG_REQUIRE_NAME = "@kbn/ace"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__ace"

SOURCE_FILES = glob(
[
Expand Down Expand Up @@ -68,10 +67,8 @@ ts_project(
srcs = SRCS,
deps = TYPES_DEPS,
declaration = True,
declaration_map = True,
emit_declaration_only = True,
out_dir = "target_types",
source_map = True,
root_dir = "src",
tsconfig = ":tsconfig",
)
Expand Down Expand Up @@ -103,7 +100,7 @@ pkg_npm_types(
name = "npm_module_types",
srcs = SRCS,
deps = [":tsc_types"],
package_name = TYPES_PKG_REQUIRE_NAME,
package_name = PKG_REQUIRE_NAME,
tsconfig = ":tsconfig",
visibility = ["//visibility:public"],
)
Expand Down
3 changes: 0 additions & 3 deletions packages/kbn-ace/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
"extends": "../../tsconfig.bazel.json",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "./target_types",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-ace/src",
"stripInternal": true,
"types": ["node"]
},
Expand Down
5 changes: 1 addition & 4 deletions packages/kbn-alerts/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types",

PKG_BASE_NAME = "kbn-alerts"
PKG_REQUIRE_NAME = "@kbn/alerts"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__alerts"

SOURCE_FILES = glob(
[
Expand Down Expand Up @@ -74,11 +73,9 @@ ts_project(
srcs = SRCS,
deps = TYPES_DEPS,
declaration = True,
declaration_map = True,
emit_declaration_only = True,
out_dir = "target_types",
root_dir = "src",
source_map = True,
tsconfig = ":tsconfig",
)

Expand Down Expand Up @@ -109,7 +106,7 @@ pkg_npm_types(
name = "npm_module_types",
srcs = SRCS,
deps = [":tsc_types"],
package_name = TYPES_PKG_REQUIRE_NAME,
package_name = PKG_REQUIRE_NAME,
tsconfig = ":tsconfig",
visibility = ["//visibility:public"],
)
Expand Down
3 changes: 0 additions & 3 deletions packages/kbn-alerts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
"extends": "../../tsconfig.bazel.json",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "target_types",
"rootDir": "src",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-alerts/src",
"types": ["jest", "node"]
},
"include": ["src/**/*"],
Expand Down
5 changes: 1 addition & 4 deletions packages/kbn-analytics/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types",

PKG_BASE_NAME = "kbn-analytics"
PKG_REQUIRE_NAME = "@kbn/analytics"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__analytics"

SOURCE_FILES = glob(
[
Expand Down Expand Up @@ -71,11 +70,9 @@ ts_project(
srcs = SRCS,
deps = TYPES_DEPS,
declaration = True,
declaration_map = True,
emit_declaration_only = True,
out_dir = "target_types",
root_dir = "src",
source_map = True,
tsconfig = ":tsconfig",
)

Expand Down Expand Up @@ -106,7 +103,7 @@ pkg_npm_types(
name = "npm_module_types",
srcs = SRCS,
deps = [":tsc_types"],
package_name = TYPES_PKG_REQUIRE_NAME,
package_name = PKG_REQUIRE_NAME,
tsconfig = ":tsconfig",
visibility = ["//visibility:public"],
)
Expand Down
3 changes: 0 additions & 3 deletions packages/kbn-analytics/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
"extends": "../../tsconfig.bazel.json",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"isolatedModules": true,
"outDir": "./target_types",
"sourceMap": true,
"sourceRoot": "../../../../../packages/kbn-analytics/src",
"stripInternal": true,
"types": [
"node"
Expand Down
5 changes: 1 addition & 4 deletions packages/kbn-apm-config-loader/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types",

PKG_BASE_NAME = "kbn-apm-config-loader"
PKG_REQUIRE_NAME = "@kbn/apm-config-loader"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__apm-config-loader"

SOURCE_FILES = glob(
[
Expand Down Expand Up @@ -66,10 +65,8 @@ ts_project(
srcs = SRCS,
deps = TYPES_DEPS,
declaration = True,
declaration_map = True,
emit_declaration_only = True,
out_dir = "target_types",
source_map = True,
root_dir = "src",
tsconfig = ":tsconfig",
)
Expand Down Expand Up @@ -101,7 +98,7 @@ pkg_npm_types(
name = "npm_module_types",
srcs = SRCS,
deps = [":tsc_types"],
package_name = TYPES_PKG_REQUIRE_NAME,
package_name = PKG_REQUIRE_NAME,
tsconfig = ":tsconfig",
visibility = ["//visibility:public"],
)
Expand Down
3 changes: 0 additions & 3 deletions packages/kbn-apm-config-loader/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
"extends": "../../tsconfig.bazel.json",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "./target_types",
"rootDir": "./src",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-apm-config-loader/src",
"stripInternal": false,
"types": [
"jest",
Expand Down
Loading

0 comments on commit d75a6cc

Please sign in to comment.