Skip to content

Commit

Permalink
[8.x] [ftr][deployment-agnostic] move APM tests in its own config file (
Browse files Browse the repository at this point in the history
elastic#200562) (elastic#200924)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ftr][deployment-agnostic] move APM tests in its own config file
(elastic#200562)](elastic#200562)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-20T09:09:44Z","message":"[ftr][deployment-agnostic]
move APM tests in its own config file (elastic#200562)\n\n##
Summary\r\n\r\nPart of elastic#199182\r\n\r\nWith great progress of elastic#193245 the
number of tests in Observability\r\ndeployment-agnostic config files is
growing and so does config run time\r\nby reaching **30**
minutes.\r\n\r\nAs we try to keep pipeline runtime reasonable, this PR
adds a new\r\nconfigs `oblt.apm.stateful.config.ts`
and\r\n`oblt.apm.serverless.config.ts` that load only APM-related tests
from\r\nhttps://github.com/elastic/kibana/blob/main/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/index.ts\r\n\r\nIt
should help to speed up execution, we will double check
config\r\nruntime when APM test migration is completed.\r\n\r\nFor
reviewers: no extra work is expected from Oblt teams if new tests\r\nare
still imported
in\r\n`x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/index.ts`","sha":"a85127605c7bf7e0e349bc7bb687b69f72b6fe18","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","FTR","backport:version","v8.17.0"],"number":200562,"url":"https://github.com/elastic/kibana/pull/200562","mergeCommit":{"message":"[ftr][deployment-agnostic]
move APM tests in its own config file (elastic#200562)\n\n##
Summary\r\n\r\nPart of elastic#199182\r\n\r\nWith great progress of elastic#193245 the
number of tests in Observability\r\ndeployment-agnostic config files is
growing and so does config run time\r\nby reaching **30**
minutes.\r\n\r\nAs we try to keep pipeline runtime reasonable, this PR
adds a new\r\nconfigs `oblt.apm.stateful.config.ts`
and\r\n`oblt.apm.serverless.config.ts` that load only APM-related tests
from\r\nhttps://github.com/elastic/kibana/blob/main/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/index.ts\r\n\r\nIt
should help to speed up execution, we will double check
config\r\nruntime when APM test migration is completed.\r\n\r\nFor
reviewers: no extra work is expected from Oblt teams if new tests\r\nare
still imported
in\r\n`x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/index.ts`","sha":"a85127605c7bf7e0e349bc7bb687b69f72b6fe18"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200562","number":200562,"mergeCommit":{"message":"[ftr][deployment-agnostic]
move APM tests in its own config file (elastic#200562)\n\n##
Summary\r\n\r\nPart of elastic#199182\r\n\r\nWith great progress of elastic#193245 the
number of tests in Observability\r\ndeployment-agnostic config files is
growing and so does config run time\r\nby reaching **30**
minutes.\r\n\r\nAs we try to keep pipeline runtime reasonable, this PR
adds a new\r\nconfigs `oblt.apm.stateful.config.ts`
and\r\n`oblt.apm.serverless.config.ts` that load only APM-related tests
from\r\nhttps://github.com/elastic/kibana/blob/main/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/index.ts\r\n\r\nIt
should help to speed up execution, we will double check
config\r\nruntime when APM test migration is completed.\r\n\r\nFor
reviewers: no extra work is expected from Oblt teams if new tests\r\nare
still imported
in\r\n`x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/index.ts`","sha":"a85127605c7bf7e0e349bc7bb687b69f72b6fe18"}},{"branch":"8.x","label":"v8.17.0","labelRegex":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
  • Loading branch information
dmlemeshko authored Nov 26, 2024
1 parent 570afd9 commit e1691eb
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 6 deletions.
1 change: 1 addition & 0 deletions .buildkite/ftr_oblt_serverless_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ disabled:
- x-pack/test_serverless/functional/test_suites/observability/config.screenshots.ts
# serverless config files that run deployment-agnostic tests
- x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
- x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts

# Serverless tests only run on main
defaultQueue: 'n2-4-spot'
Expand Down
1 change: 1 addition & 0 deletions .buildkite/ftr_oblt_stateful_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ enabled:
- x-pack/test/functional/apps/apm/config.ts
# stateful configs that run deployment-agnostic tests
- x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts
- x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* 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; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context';

export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) {
describe('Serverless Observability - Deployment-agnostic APM API integration tests', function () {
// load new oblt APM-only deployment-agnostic test here
loadTestFile(require.resolve('../../apis/observability/apm'));
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* 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; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { createServerlessTestConfig } from '../../default_configs/serverless.config.base';

export default createServerlessTestConfig({
serverlessProject: 'oblt',
testFiles: [require.resolve('./oblt.apm.index.ts')],
junit: {
reportName: 'Serverless Observability - Deployment-agnostic APM API Integration Tests',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context';

export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) {
describe('Serverless Observability - Deployment-agnostic api integration tests', () => {
// load new oblt and platform deployment-agnostic test here
describe('Serverless Observability - Deployment-agnostic API integration tests', function () {
// load new oblt (except APM) and platform deployment-agnostic test here
loadTestFile(require.resolve('../../apis/console'));
loadTestFile(require.resolve('../../apis/core'));
loadTestFile(require.resolve('../../apis/management'));
Expand All @@ -18,6 +18,5 @@ export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext)
loadTestFile(require.resolve('../../apis/painless_lab'));
loadTestFile(require.resolve('../../apis/saved_objects_management'));
loadTestFile(require.resolve('../../apis/observability/slo'));
loadTestFile(require.resolve('../../apis/observability/apm'));
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* 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; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context';

export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) {
describe('Stateful Observability - Deployment-agnostic APM API integration tests', () => {
loadTestFile(require.resolve('../../apis/observability/apm'));
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* 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; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { createStatefulTestConfig } from '../../default_configs/stateful.config.base';

export default createStatefulTestConfig({
testFiles: [require.resolve('./oblt.apm.index.ts')],
junit: {
reportName: 'Stateful Observability - Deployment-agnostic APM API Integration Tests',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context';

export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) {
describe('apis', () => {
// load new oblt deployment-agnostic test here
describe('Stateful Observability - Deployment-agnostic API integration tests', () => {
// load new oblt (except APM) deployment-agnostic tests here
loadTestFile(require.resolve('../../apis/observability/alerting'));
loadTestFile(require.resolve('../../apis/observability/dataset_quality'));
loadTestFile(require.resolve('../../apis/observability/slo'));
loadTestFile(require.resolve('../../apis/observability/infra'));
loadTestFile(require.resolve('../../apis/observability/apm'));
});
}

0 comments on commit e1691eb

Please sign in to comment.