[CI] Balance/split CI groups and remove docker-specific group (#130181)

This commit is contained in:
Brian Seeders 2022-04-14 11:04:13 -04:00 committed by GitHub
parent 6adc94b7fc
commit 1dce1d8d97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 22 additions and 76 deletions

View file

@ -29,7 +29,7 @@ steps:
- command: .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Default CI Group'
parallelism: 27
parallelism: 29
agents:
queue: n2-4
depends_on: build
@ -40,18 +40,6 @@ steps:
- exit_status: '*'
limit: 1
- command: CI_GROUP=Docker .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Docker CI Group'
agents:
queue: n2-4
depends_on: build
timeout_in_minutes: 120
key: default-cigroup-docker
retry:
automatic:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/oss_cigroup.sh
label: 'OSS CI Group'
parallelism: 11

View file

@ -32,11 +32,7 @@
{
"key": "xpack/cigroup",
"name": "Default CI Group",
"ciGroups": 27
},
{
"key": "xpack/cigroup/Docker",
"name": "Default CI Group Docker"
"ciGroups": 29
},
{
"key": "xpack/firefox",
@ -47,4 +43,4 @@
"name": "Default Accessibility"
}
]
}
}

View file

@ -51,7 +51,7 @@ steps:
- command: .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Default CI Group'
parallelism: 27
parallelism: 29
agents:
queue: n2-4-spot
depends_on: build
@ -64,20 +64,6 @@ steps:
- exit_status: '*'
limit: 1
- command: CI_GROUP=Docker .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Docker CI Group'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
key: default-cigroup-docker
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/oss_cigroup.sh
label: 'OSS CI Group'
parallelism: 11

View file

@ -17,7 +17,7 @@ steps:
- command: .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Default CI Group'
parallelism: 27
parallelism: 29
agents:
queue: n2-4
depends_on: build
@ -28,18 +28,6 @@ steps:
- exit_status: '*'
limit: 1
- command: CI_GROUP=Docker .buildkite/scripts/steps/functional/xpack_cigroup.sh
label: 'Docker CI Group'
agents:
queue: n2-4
depends_on: build
timeout_in_minutes: 120
key: default-cigroup-docker
retry:
automatic:
- exit_status: '*'
limit: 1
- command: .buildkite/scripts/steps/functional/oss_cigroup.sh
label: 'OSS CI Group'
parallelism: 11

View file

@ -39,4 +39,5 @@ xpack:
- ciGroup25
- ciGroup26
- ciGroup27
- ciGroupDocker
- ciGroup28
- ciGroup29

View file

@ -12,16 +12,7 @@ import { createAssignmentProxy } from './assignment_proxy';
import { wrapFunction } from './wrap_function';
import { wrapRunnableArgs } from './wrap_runnable_args';
function split(arr, fn) {
const a = [];
const b = [];
for (const i of arr) {
(fn(i) ? a : b).push(i);
}
return [a, b];
}
export function decorateMochaUi(log, lifecycle, context, { isDockerGroup, rootTags }) {
export function decorateMochaUi(log, lifecycle, context, { rootTags }) {
// incremented at the start of each suite, decremented after
// so that in each non-suite call we can know if we are within
// a suite, or that when a suite is defined it is within a suite
@ -63,7 +54,7 @@ export function decorateMochaUi(log, lifecycle, context, { isDockerGroup, rootTa
const relativeFilePath = relative(REPO_ROOT, this.file);
this._tags = [
...(isDockerGroup ? ['ciGroupDocker', relativeFilePath] : [relativeFilePath]),
relativeFilePath,
// we attach the "root tags" to all the child suites of the root suite, so that if they
// need to be excluded they can be removed from the root suite without removing the entire
// root suite
@ -71,17 +62,7 @@ export function decorateMochaUi(log, lifecycle, context, { isDockerGroup, rootTa
];
this.suiteTag = relativeFilePath; // The tag that uniquely targets this suite/file
this.tags = (tags) => {
const newTags = Array.isArray(tags) ? tags : [tags];
const [tagsToAdd, tagsToIgnore] = split(newTags, (t) =>
!isDockerGroup ? true : !t.startsWith('ciGroup')
);
if (tagsToIgnore.length) {
log.warning(
`ignoring ciGroup tags because test is being run by a config using 'dockerServers', tags: ${tagsToIgnore}`
);
}
const tagsToAdd = Array.isArray(tags) ? tags : [tags];
this._tags = [...this._tags, ...tagsToAdd];
};
this.onlyEsVersion = (semver) => {

View file

@ -11,7 +11,7 @@ import { FtrProviderContext } from '../../../common/ftr_provider_context';
export default ({ loadTestFile }: FtrProviderContext): void => {
describe('Detection rule type telemetry', function () {
describe('', function () {
this.tags('ciGroup11');
this.tags('ciGroup28');
loadTestFile(require.resolve('./usage_collector/all_types'));
loadTestFile(require.resolve('./usage_collector/detection_rules'));
loadTestFile(require.resolve('./usage_collector/detection_rule_status'));

View file

@ -9,6 +9,8 @@ import { setupTestUsers } from './test_users';
export default function ({ loadTestFile, getService }) {
describe('Fleet Endpoints', function () {
this.tags('ciGroup29');
before(async () => {
await setupTestUsers(getService('security'));
});

View file

@ -9,6 +9,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default ({ loadTestFile, getService }: FtrProviderContext) => {
describe('Uptime app', function () {
this.tags('ciGroup8');
describe('with generated data', () => {
loadTestFile(require.resolve('./synthetics_integration'));
});

View file

@ -14,7 +14,7 @@ export default function ({ loadTestFile, getService, getPageObjects }: FtrProvid
const searchSessions = getService('searchSessions');
describe('Dashboard', function () {
this.tags('ciGroup3');
this.tags('ciGroup5');
before(async () => {
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');

View file

@ -13,7 +13,7 @@ export default function ({ loadTestFile, getService, getPageObjects }: FtrProvid
const PageObjects = getPageObjects(['common']);
describe('Search session sharing', function () {
this.tags('ciGroup3');
this.tags('ciGroup5');
before(async () => {
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');

View file

@ -14,7 +14,7 @@ export default function ({ loadTestFile, getService, getPageObjects }: FtrProvid
const searchSessions = getService('searchSessions');
describe('Discover', function () {
this.tags('ciGroup3');
this.tags('ciGroup5');
before(async () => {
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');

View file

@ -12,7 +12,7 @@ export default function ({ loadTestFile, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
describe('lens search sessions', function () {
this.tags('ciGroup3');
this.tags('ciGroup5');
before(async () => {
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');

View file

@ -12,7 +12,7 @@ export default function ({ loadTestFile, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
describe('search sessions management', function () {
this.tags('ciGroup3');
this.tags('ciGroup5');
before(async () => {
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');

View file

@ -16,6 +16,7 @@ export default function (providerContext: FtrProviderContext) {
const { loadTestFile, getService } = providerContext;
describe('endpoint', function () {
this.tags('ciGroup7');
const ingestManager = getService('ingestManager');
const log = getService('log');
const endpointTestResources = getService('endpointTestResources');

View file

@ -13,6 +13,8 @@ export default function endpointAPIIntegrationTests(providerContext: FtrProvider
const { loadTestFile, getService } = providerContext;
describe('Endpoint plugin', function () {
this.tags('ciGroup9');
const ingestManager = getService('ingestManager');
const log = getService('log');