mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Build Kite][Code Coverage] Drop ftr_run_order.json (#151114)
## Summary As of last year we stopped supporting FTR configs in the code coverage buildkite job. While investigating a flaky test, I noticed the file's presence in the buildkite artifacts ui. This pr drops that. **Note to Reviewers:** `.buildkite/scripts/steps/test/pick_test_group_run_order.sh` is currently used in 4 places: 1. `.buildkite/pipelines/code_coverage/daily.yml` **this is where this pr is concerned** 1. `.buildkite/pipelines/pull_request/base.yml` 1. `.buildkite/pipelines/on_merge.yml` 1. `.buildkite/pipelines/es_snapshots/verify.yml` This change is small but this file is shared, so we've to keep this in mind. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
5c8bf9a94c
commit
245f385007
3 changed files with 18 additions and 38 deletions
|
@ -179,6 +179,15 @@ export async function pickTestGroupRunOrder() {
|
|||
throw new Error(`invalid FUNCTIONAL_MAX_MINUTES: ${process.env.FUNCTIONAL_MAX_MINUTES}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* This env variable corresponds to the env stanza within
|
||||
* https://github.com/elastic/kibana/blob/bc2cb5dc613c3d455a5fed9c54450fd7e46ffd92/.buildkite/pipelines/code_coverage/daily.yml#L17
|
||||
*
|
||||
* It is a flag that signals the job for which test runners will be executed.
|
||||
*
|
||||
* For example in code coverage pipeline definition, it is "limited"
|
||||
* to 'unit,integration'. This means FTR tests will not be executed.
|
||||
*/
|
||||
const LIMIT_CONFIG_TYPE = process.env.LIMIT_CONFIG_TYPE
|
||||
? process.env.LIMIT_CONFIG_TYPE.split(',')
|
||||
.map((t) => t.trim())
|
||||
|
@ -218,9 +227,10 @@ export async function pickTestGroupRunOrder() {
|
|||
: ['build'];
|
||||
|
||||
const { defaultQueue, ftrConfigsByQueue } = getEnabledFtrConfigs(FTR_CONFIG_PATTERNS);
|
||||
if (!LIMIT_CONFIG_TYPE.includes('functional')) {
|
||||
ftrConfigsByQueue.clear();
|
||||
}
|
||||
|
||||
const ftrConfigsIncluded = LIMIT_CONFIG_TYPE.includes('functional');
|
||||
|
||||
if (!ftrConfigsIncluded) ftrConfigsByQueue.clear();
|
||||
|
||||
const jestUnitConfigs = LIMIT_CONFIG_TYPE.includes('unit')
|
||||
? globby.sync(['**/jest.config.js', '!**/__fixtures__/**'], {
|
||||
|
@ -377,9 +387,11 @@ export async function pickTestGroupRunOrder() {
|
|||
Fs.writeFileSync('jest_run_order.json', JSON.stringify({ unit, integration }, null, 2));
|
||||
bk.uploadArtifacts('jest_run_order.json');
|
||||
|
||||
// write the config for functional steps to an artifact that can be used by the individual functional jobs
|
||||
Fs.writeFileSync('ftr_run_order.json', JSON.stringify(ftrRunOrder, null, 2));
|
||||
bk.uploadArtifacts('ftr_run_order.json');
|
||||
if (ftrConfigsIncluded) {
|
||||
// write the config for functional steps to an artifact that can be used by the individual functional jobs
|
||||
Fs.writeFileSync('ftr_run_order.json', JSON.stringify(ftrRunOrder, null, 2));
|
||||
bk.uploadArtifacts('ftr_run_order.json');
|
||||
}
|
||||
|
||||
// upload the step definitions to Buildkite
|
||||
bk.uploadSteps(
|
||||
|
|
|
@ -13,7 +13,6 @@ steps:
|
|||
queue: kibana-default
|
||||
env:
|
||||
FTR_CONFIGS_DEPS: ''
|
||||
# LIMIT_CONFIG_TYPE: 'unit,functional,integration'
|
||||
LIMIT_CONFIG_TYPE: 'unit,integration'
|
||||
JEST_UNIT_SCRIPT: '.buildkite/scripts/steps/code_coverage/jest.sh'
|
||||
JEST_INTEGRATION_SCRIPT: '.buildkite/scripts/steps/code_coverage/jest_integration.sh'
|
||||
|
@ -25,6 +24,5 @@ steps:
|
|||
depends_on:
|
||||
- jest
|
||||
- jest-integration
|
||||
# - ftr-configs
|
||||
timeout_in_minutes: 30
|
||||
key: ingest
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
buildPlatformPlugins() {
|
||||
echo "--- Build Platform Plugins"
|
||||
|
||||
NODE_OPTIONS=--max_old_space_size=14336 \
|
||||
node scripts/build_kibana_platform_plugins \
|
||||
--no-examples --test-plugins --workers 4
|
||||
}
|
||||
|
||||
runFTRInstrumented() {
|
||||
local ftrConfig=$1
|
||||
echo "--- $ runFTRInstrumented against $ftrConfig"
|
||||
|
||||
NODE_OPTIONS=--max_old_space_size=16384 \
|
||||
./node_modules/.bin/nyc \
|
||||
--nycrc-path ./src/dev/code_coverage/nyc_config/nyc.server.config.js \
|
||||
node scripts/functional_tests \
|
||||
--config="$ftrConfig" \
|
||||
--exclude-tag "skipCoverage"
|
||||
}
|
||||
|
||||
reportMergeFunctional() {
|
||||
echo "--- Merging code coverage for FTR Configs"
|
||||
|
||||
NODE_OPTIONS=--max_old_space_size=16384 yarn nyc report \
|
||||
--nycrc-path src/dev/code_coverage/nyc_config/nyc.functional.config.js --reporter json
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue