Skip to content

Commit

Permalink
Merge branch 'main' into kbn-137734-http-agent-factory
Browse files Browse the repository at this point in the history
  • Loading branch information
gsoldevila committed Sep 9, 2022
2 parents 290bcff + ad0b427 commit 86b14b9
Show file tree
Hide file tree
Showing 1,299 changed files with 20,283 additions and 8,220 deletions.
9 changes: 8 additions & 1 deletion .buildkite/scripts/steps/checks/bazel_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@ source .buildkite/scripts/common/util.sh

echo --- Check Bazel Packages Manifest
node scripts/generate packages_build_manifest

check_for_changed_files 'node scripts/generate packages_build_manifest' true

echo --- Check Codeowners Manifest
if [ -f ".github/CODEOWNERS" ]; then
node scripts/generate codeowners
check_for_changed_files 'node scripts/generate codeowners' true
else
echo "skipping, no existing .github/CODEOWNERS file found"
fi
19 changes: 9 additions & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
const Path = require('path');
const Fs = require('fs');

const globby = require('globby');
const normalizePath = require('normalize-path');
const { discoverPackageManifestPaths, Jsonc } = require('@kbn/bazel-packages');
const { REPO_ROOT } = require('@kbn/utils');

const APACHE_2_0_LICENSE_HEADER = `
/*
Expand Down Expand Up @@ -119,15 +121,10 @@ const VENN_DIAGRAM_HEADER = `
*/
`;

const packagePkgJsons = globby.sync('*/package.json', {
cwd: Path.resolve(__dirname, 'packages'),
absolute: true,
});

/** Packages which should not be included within production code. */
const DEV_PACKAGES = packagePkgJsons.flatMap((path) => {
const pkg = JSON.parse(Fs.readFileSync(path, 'utf8'));
return pkg.kibana && pkg.kibana.devOnly ? Path.dirname(Path.basename(path)) : [];
const DEV_PACKAGE_DIRS = discoverPackageManifestPaths(REPO_ROOT).flatMap((path) => {
const manifest = Jsonc.parse(Fs.readFileSync(path, 'utf8'));
return !!manifest.devOnly ? normalizePath(Path.relative(REPO_ROOT, Path.dirname(path))) : [];
});

/** Directories (at any depth) which include dev-only code. */
Expand All @@ -145,6 +142,7 @@ const DEV_DIRECTORIES = [
'integration_tests',
'manual_tests',
'mock',
'mocks',
'storybook',
'scripts',
'test',
Expand All @@ -153,6 +151,7 @@ const DEV_DIRECTORIES = [
'test_utilities',
'test_helpers',
'tests_client_integration',
'tsd_tests',
];

/** File patterns for dev-only code. */
Expand All @@ -171,7 +170,7 @@ const DEV_FILE_PATTERNS = [

/** Glob patterns which describe dev-only code. */
const DEV_PATTERNS = [
...DEV_PACKAGES.map((pkg) => `packages/${pkg}/**/*`),
...DEV_PACKAGE_DIRS.map((pkg) => `${pkg}/**/*`),
...DEV_DIRECTORIES.map((dir) => `{packages,src,x-pack}/**/${dir}/**/*`),
...DEV_FILE_PATTERNS.map((file) => `{packages,src,x-pack}/**/${file}`),
'packages/kbn-interpreter/tasks/**/*',
Expand Down
380 changes: 309 additions & 71 deletions .github/CODEOWNERS

Large diffs are not rendered by default.

27 changes: 16 additions & 11 deletions .github/workflows/add-to-apm-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,41 @@ jobs:
- uses: octokit/graphql-action@v2.x
id: add_to_project
with:
headers: '{"GraphQL-Features": "projects_next_graphql"}'
query: |
mutation add_to_project($projectid:ID!,$contentid:ID!) {
addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) {
projectNextItem {
id
addProjectV2ItemById(input:{projectId:$projectid contentId:$contentid}) {
item {
... on ProjectV2Item {
id
}
}
}
}
projectid: ${{ env.PROJECT_ID }}
contentid: ${{ github.event.issue.node_id }}
env:
PROJECT_ID: "PN_kwDOAGc3Zs0VSg"
PROJECT_ID: "PVT_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:ID!,$itemid:ID!,$fieldid:ID!,$value:String!) {
updateProjectNextItemField(input: { projectId:$projectid itemId:$itemid fieldId:$fieldid value:$value }) {
projectNextItem {
updateProjectV2ItemFieldValue(input: { projectId:$projectid itemId:$itemid fieldId:$fieldid value:{singleSelectOptionId: $value} }) {
projectV2Item {
id
content {
... on Issue {
number
}
}
}
}
}
projectid: ${{ env.PROJECT_ID }}
itemid: ${{ fromJSON(steps.add_to_project.outputs.data).addProjectNextItem.projectNextItem.id }}
fieldid: "MDE2OlByb2plY3ROZXh0RmllbGQ0NDE0Ng=="
itemid: ${{ fromJSON(steps.add_to_project.outputs.data).addProjectV2ItemById.item.id }}
fieldid: "PVTSSF_lADOAGc3Zs0VSs2scg"
value: "c33f5c54"
env:
PROJECT_ID: "PN_kwDOAGc3Zs0VSg"
PROJECT_ID: "PVT_kwDOAGc3Zs0VSg"
GITHUB_TOKEN: ${{ secrets.APM_TECH_KIBANA_USER_TOKEN }}
2 changes: 1 addition & 1 deletion 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: 2022-09-08
date: 2022-09-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
---
import actionsObj from './actions.devdocs.json';
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: 2022-09-08
date: 2022-09-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
---
import advancedSettingsObj from './advanced_settings.devdocs.json';
Expand Down
20 changes: 1 addition & 19 deletions api_docs/aiops.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,7 @@
"interfaces": [],
"enums": [],
"misc": [],
"objects": [],
"start": {
"parentPluginId": "aiops",
"id": "def-public.AiopsPluginStart",
"type": "Type",
"tags": [],
"label": "AiopsPluginStart",
"description": [
"\naiops plugin public start contract"
],
"signature": [
"void"
],
"path": "x-pack/plugins/aiops/public/types.ts",
"deprecated": false,
"trackAdoption": false,
"lifecycle": "start",
"initialIsOpen": true
}
"objects": []
},
"server": {
"classes": [],
Expand Down
7 changes: 2 additions & 5 deletions 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: 2022-09-08
date: 2022-09-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
---
import aiopsObj from './aiops.devdocs.json';
Expand All @@ -21,13 +21,10 @@ Contact [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) for q

| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
| 9 | 0 | 0 | 1 |
| 7 | 0 | 0 | 1 |

## Client

### Start
<DocDefinitionList data={[aiopsObj.client.start]}/>

### Functions
<DocDefinitionList data={aiopsObj.client.functions}/>

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

0 comments on commit 86b14b9

Please sign in to comment.