-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into unskip-fix-tests
- Loading branch information
Showing
40 changed files
with
6,939 additions
and
3,109 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
id: kibCasesPluginApi | ||
slug: /kibana-dev-docs/casesPluginApi | ||
title: cases | ||
image: https://source.unsplash.com/400x175/?github | ||
summary: API docs for the cases plugin | ||
date: 2020-11-16 | ||
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] | ||
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. | ||
--- | ||
|
||
import casesObj from './cases.json'; | ||
|
||
## Server | ||
|
||
### Interfaces | ||
<DocDefinitionList data={casesObj.server.interfaces}/> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[[development-telemetry]] | ||
== Development Telemetry | ||
|
||
To help us provide a good developer experience, we track some straightforward metrics when running certain tasks locally and ship them to a service that we run. To disable this functionality, specify `CI_STATS_DISABLED=true` in your environment. | ||
|
||
The operations we current report timing data for: | ||
|
||
* Total execution time of `yarn kbn bootstrap` | ||
|
||
Along with the execution time of each execution, we ship the following information about your machine to the service: | ||
|
||
* The `branch` property from the package.json file | ||
* The value of the `data/uuid` file | ||
* https://nodejs.org/docs/latest/api/os.html#os_os_platform[Operating system platform] | ||
* https://nodejs.org/docs/latest/api/os.html#os_os_release[Operating system release] | ||
* https://nodejs.org/docs/latest/api/os.html#os_os_cpus[Count, model, and speed of the CPUs] | ||
* https://nodejs.org/docs/latest/api/os.html#os_os_arch[CPU architecture] | ||
* https://nodejs.org/docs/latest/api/os.html#os_os_totalmem[Total memory] and https://nodejs.org/docs/latest/api/os.html#os_os_freemem[Free memory] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"main": "../target/ci_stats_reporter/ci_stats_reporter" | ||
} |
52 changes: 52 additions & 0 deletions
52
packages/kbn-dev-utils/src/ci_stats_reporter/ci_stats_config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import type { ToolingLog } from '../tooling_log'; | ||
|
||
export interface Config { | ||
apiToken: string; | ||
buildId: string; | ||
} | ||
|
||
function validateConfig(log: ToolingLog, config: { [k in keyof Config]: unknown }) { | ||
const validApiToken = typeof config.apiToken === 'string' && config.apiToken.length !== 0; | ||
if (!validApiToken) { | ||
log.warning('KIBANA_CI_STATS_CONFIG is missing a valid api token, stats will not be reported'); | ||
return; | ||
} | ||
|
||
const validId = typeof config.buildId === 'string' && config.buildId.length !== 0; | ||
if (!validId) { | ||
log.warning('KIBANA_CI_STATS_CONFIG is missing a valid build id, stats will not be reported'); | ||
return; | ||
} | ||
|
||
return config as Config; | ||
} | ||
|
||
export function parseConfig(log: ToolingLog) { | ||
const configJson = process.env.KIBANA_CI_STATS_CONFIG; | ||
if (!configJson) { | ||
log.debug('KIBANA_CI_STATS_CONFIG environment variable not found, disabling CiStatsReporter'); | ||
return; | ||
} | ||
|
||
let config: unknown; | ||
try { | ||
config = JSON.parse(configJson); | ||
} catch (_) { | ||
// handled below | ||
} | ||
|
||
if (typeof config === 'object' && config !== null) { | ||
return validateConfig(log, config as { [k in keyof Config]: unknown }); | ||
} | ||
|
||
log.warning('KIBANA_CI_STATS_CONFIG is invalid, stats will not be reported'); | ||
return; | ||
} |
Oops, something went wrong.