mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
# Backport This will backport the following commits from `main` to `8.7`: - [[performance] use journey own ftr config to run scalability test (#152596)](https://github.com/elastic/kibana/pull/152596) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Dzmitry Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2023-03-07T12:20:21Z","message":"[performance] use journey own ftr config to run scalability test (#152596)\n\nWhile debugging scalability testing failure for\r\n`cloud_security_dashboard` journey, I found that we hardcoded base FTR\r\nconfig to `x-pack/performance/journeys/login.ts` and main issue is that\r\nKibana is not started properly.\r\n\r\nThis PR makes few changes:\r\n- update `kbn-performance-testing-dataset-extractor` to save journey\r\npath as `configPath` so it can be later used to start ES/Kibana in the\r\nscalability run with the same configuration it was run for the single\r\nuser journey run.\r\n- update scalability entry configuration to read base FTR config from\r\ngenerated scalability json file (`configPath` property)\r\n\r\nHow to test:\r\n- make sure to clone the latest\r\n[kibana-load-testing](https://github.com/elastic/kibana-load-testing)\r\nrepo and build it `mvn clean test-compile`\r\n- from kibana root directory run any api capacity test\r\n```\r\nnode scripts/run_scalability.js --journey-path x-pack/test/scalability/apis/api.core.capabilities.json\r\n```\r\nExpected result: logs should display\r\n```\r\ndebg Loading config file from x-pack/performance/journeys/login.ts\r\n```\r\n- download the latest artifacts from\r\n[buildkite](https://buildkite.com/elastic/kibana-performance-data-set-extraction/builds/171#0186a342-9dea-4a9b-bbe4-c96449563269),\r\nfind `cloud_security_dashboard-<uuid>.json`\r\n- from kibana root directory run scalability test for\r\n`cloud_security_dashboard` journey\r\n```\r\nnode scripts/run_scalability.js --journey-path <path to cloud_security_dashboard-<uuid>.json>\r\n```\r\nExpected result: logs should display \r\n```\r\ndebg Loading config file from x-pack/performance/journeys/cloud_security_dashboard.ts\r\n```\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"bc44f524ac547f0211486c125b999fdd94bb03bf","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","wg:performance","v8.8.0","v8.6.3","v8.7.1"],"number":152596,"url":"https://github.com/elastic/kibana/pull/152596","mergeCommit":{"message":"[performance] use journey own ftr config to run scalability test (#152596)\n\nWhile debugging scalability testing failure for\r\n`cloud_security_dashboard` journey, I found that we hardcoded base FTR\r\nconfig to `x-pack/performance/journeys/login.ts` and main issue is that\r\nKibana is not started properly.\r\n\r\nThis PR makes few changes:\r\n- update `kbn-performance-testing-dataset-extractor` to save journey\r\npath as `configPath` so it can be later used to start ES/Kibana in the\r\nscalability run with the same configuration it was run for the single\r\nuser journey run.\r\n- update scalability entry configuration to read base FTR config from\r\ngenerated scalability json file (`configPath` property)\r\n\r\nHow to test:\r\n- make sure to clone the latest\r\n[kibana-load-testing](https://github.com/elastic/kibana-load-testing)\r\nrepo and build it `mvn clean test-compile`\r\n- from kibana root directory run any api capacity test\r\n```\r\nnode scripts/run_scalability.js --journey-path x-pack/test/scalability/apis/api.core.capabilities.json\r\n```\r\nExpected result: logs should display\r\n```\r\ndebg Loading config file from x-pack/performance/journeys/login.ts\r\n```\r\n- download the latest artifacts from\r\n[buildkite](https://buildkite.com/elastic/kibana-performance-data-set-extraction/builds/171#0186a342-9dea-4a9b-bbe4-c96449563269),\r\nfind `cloud_security_dashboard-<uuid>.json`\r\n- from kibana root directory run scalability test for\r\n`cloud_security_dashboard` journey\r\n```\r\nnode scripts/run_scalability.js --journey-path <path to cloud_security_dashboard-<uuid>.json>\r\n```\r\nExpected result: logs should display \r\n```\r\ndebg Loading config file from x-pack/performance/journeys/cloud_security_dashboard.ts\r\n```\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"bc44f524ac547f0211486c125b999fdd94bb03bf"}},"sourceBranch":"main","suggestedTargetBranches":["8.6","8.7"],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/152596","number":152596,"mergeCommit":{"message":"[performance] use journey own ftr config to run scalability test (#152596)\n\nWhile debugging scalability testing failure for\r\n`cloud_security_dashboard` journey, I found that we hardcoded base FTR\r\nconfig to `x-pack/performance/journeys/login.ts` and main issue is that\r\nKibana is not started properly.\r\n\r\nThis PR makes few changes:\r\n- update `kbn-performance-testing-dataset-extractor` to save journey\r\npath as `configPath` so it can be later used to start ES/Kibana in the\r\nscalability run with the same configuration it was run for the single\r\nuser journey run.\r\n- update scalability entry configuration to read base FTR config from\r\ngenerated scalability json file (`configPath` property)\r\n\r\nHow to test:\r\n- make sure to clone the latest\r\n[kibana-load-testing](https://github.com/elastic/kibana-load-testing)\r\nrepo and build it `mvn clean test-compile`\r\n- from kibana root directory run any api capacity test\r\n```\r\nnode scripts/run_scalability.js --journey-path x-pack/test/scalability/apis/api.core.capabilities.json\r\n```\r\nExpected result: logs should display\r\n```\r\ndebg Loading config file from x-pack/performance/journeys/login.ts\r\n```\r\n- download the latest artifacts from\r\n[buildkite](https://buildkite.com/elastic/kibana-performance-data-set-extraction/builds/171#0186a342-9dea-4a9b-bbe4-c96449563269),\r\nfind `cloud_security_dashboard-<uuid>.json`\r\n- from kibana root directory run scalability test for\r\n`cloud_security_dashboard` journey\r\n```\r\nnode scripts/run_scalability.js --journey-path <path to cloud_security_dashboard-<uuid>.json>\r\n```\r\nExpected result: logs should display \r\n```\r\ndebg Loading config file from x-pack/performance/journeys/cloud_security_dashboard.ts\r\n```\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"bc44f524ac547f0211486c125b999fdd94bb03bf"}},{"branch":"8.6","label":"v8.6.3","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.7","label":"v8.7.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
This commit is contained in:
parent
84356afd13
commit
a74084da7d
5 changed files with 9 additions and 4 deletions
|
@ -77,6 +77,7 @@ export async function runExtractor() {
|
|||
return extractor({
|
||||
param: {
|
||||
journeyName: journey.config.getName(),
|
||||
configPath,
|
||||
scalabilitySetup,
|
||||
testData,
|
||||
buildId,
|
||||
|
|
|
@ -42,7 +42,8 @@ export const extractor = async ({ param, client, log }: CLIParams) => {
|
|||
username: client.username,
|
||||
password: client.password,
|
||||
};
|
||||
const { journeyName, scalabilitySetup, testData, buildId, withoutStaticResources } = param;
|
||||
const { journeyName, configPath, scalabilitySetup, testData, buildId, withoutStaticResources } =
|
||||
param;
|
||||
log.info(
|
||||
`Searching transactions with 'labels.testBuildId=${buildId}' and 'labels.journeyName=${journeyName}'`
|
||||
);
|
||||
|
@ -87,6 +88,7 @@ export const extractor = async ({ param, client, log }: CLIParams) => {
|
|||
await saveFile(
|
||||
{
|
||||
journeyName,
|
||||
configPath,
|
||||
kibanaVersion,
|
||||
scalabilitySetup,
|
||||
testData,
|
||||
|
@ -101,6 +103,7 @@ export const extractor = async ({ param, client, log }: CLIParams) => {
|
|||
await saveFile(
|
||||
{
|
||||
journeyName,
|
||||
configPath,
|
||||
kibanaVersion,
|
||||
testData,
|
||||
streams: esStreams,
|
||||
|
|
|
@ -40,6 +40,7 @@ export interface TestData {
|
|||
export interface CLIParams {
|
||||
param: {
|
||||
journeyName: string;
|
||||
configPath: string;
|
||||
scalabilitySetup?: ScalabilitySetup;
|
||||
testData: TestData;
|
||||
buildId: string;
|
||||
|
|
|
@ -42,10 +42,9 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
|||
}
|
||||
|
||||
const journey: ScalabilityJourney = JSON.parse(fs.readFileSync(scalabilityJsonPath, 'utf8'));
|
||||
const configPath = journey.configPath ?? 'x-pack/performance/journeys/login.ts';
|
||||
|
||||
const baseConfig = (
|
||||
await readConfigFile(require.resolve('../../performance/journeys/login.ts'))
|
||||
).getAll();
|
||||
const baseConfig = (await readConfigFile(path.resolve(REPO_ROOT, configPath))).getAll();
|
||||
|
||||
return {
|
||||
...baseConfig,
|
||||
|
|
|
@ -9,6 +9,7 @@ import { ScalabilitySetup } from '@kbn/journeys';
|
|||
|
||||
export interface ScalabilityJourney {
|
||||
journeyName: string;
|
||||
configPath?: string;
|
||||
scalabilitySetup: ScalabilitySetup;
|
||||
testData?: {
|
||||
esArchives: string[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue