Skip to content

[ska] relocate x-pack/test/cases_api_integration#225056

Merged
dmlemeshko merged 28 commits intoelastic:mainfrom
dmlemeshko:ska/relocate-cases_api_integration
Jun 25, 2025
Merged

[ska] relocate x-pack/test/cases_api_integration#225056
dmlemeshko merged 28 commits intoelastic:mainfrom
dmlemeshko:ska/relocate-cases_api_integration

Conversation

@dmlemeshko
Copy link
Copy Markdown
Contributor

@dmlemeshko dmlemeshko commented Jun 24, 2025

Summary

Part of https://github.com/elastic/kibana-team/issues/1503

This PR is mostly about moving tests from x-pack/test/cases_api_integration and updating related imports

Before:

x-pack/test/
     | - cases_api_integration/

After:

x-pack/platform/test/
     | - cases_api_integration/
 
x-pack/solutions/security/test/
     | - cases_api_integration/

@kibanamachine
Copy link
Copy Markdown
Contributor

Cloud deployments require a Github label, please add ci:cloud-deploy or ci:cloud-redeploy and trigger the job through the checkbox again.

@dmlemeshko dmlemeshko self-assigned this Jun 24, 2025
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

Copy link
Copy Markdown
Contributor Author

@dmlemeshko dmlemeshko Jun 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copied to simplify imports. we will remove original files in the follow-up with more tests relocated

@dmlemeshko dmlemeshko marked this pull request as ready for review June 24, 2025 19:05
@dmlemeshko dmlemeshko requested review from a team as code owners June 24, 2025 19:05
@dmlemeshko dmlemeshko added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting v9.1.0 v8.19.0 labels Jun 24, 2025
@csr csr self-requested a review June 25, 2025 08:30
getQueryAlertIds,
} from '@kbn/test-suites-xpack/common/utils/security_solution';

export const createSecuritySolutionAlerts = async (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see the reduced scope here. I noticed these utilities were previously located in x-pack/platform/test/cases_api_integration/common/lib/alerts.ts and have now been moved to the dedicated Security cases_api_integration plugin.

"@kbn/observability-alert-details": "link:x-pack/solutions/observability/packages/alert-details",
"@kbn/observability-alerting-test-data": "link:x-pack/solutions/observability/packages/alerting-test-data",
"@kbn/observability-fixtures-plugin": "link:x-pack/test/cases_api_integration/common/plugins/observability",
"@kbn/observability-fixtures-plugin": "link:x-pack/platform/test/cases_api_integration/common/plugins/observability",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems odd to have a plugin that is called observabilityFixtures categorised inside platform.

I could not find if / how the platform code depends on this one, the only thing I've seen is that it registers a Kibana feature. This fixture is then referenced / used in a bunch of places.

@jonathan-buttner is there a strong reason for naming this "Observability"? or could that have been any other project type?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cases exists in Observability, Security, and the Stack management page. I believe this fixtures plugin handles testings some observability specific functionality.

Copy link
Copy Markdown
Member

@gsoldevila gsoldevila Jun 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the looks of it, the observabilityFixture and securitySolutionFixture could be renamed into solution1Fixture and solution2Fixture and everything would continue to work, correct?

The point I'm trying to make is that cases is a generic platform plugin, and we have a bunch of FTR tests testing it, which are also defined at platform level (explicitly relocated under a /platform/ folder with this PR), so we want those tests (and the test data) to remain "solution-agnostic" as much as possible.

On the other hand, if these are truly Observability-specific fixtures that are needed only to test things that are specific to the Observability solution, then maybe it'd make sense to move those tests and fixtures under x-pack/solutions/observability/test (so that in the future, they are tested only for oblt projects).

Or maybe it's a combination of both, and there's a subset of tests that belongs to each category?

That being said, I don't want to block the PR on this. It can be addressed as a follow-up discussion / task.

Copy link
Copy Markdown
Contributor

@denar50 denar50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Code owners review for the files owned by @elastic/security-detection-engine

Copy link
Copy Markdown
Member

@gsoldevila gsoldevila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from core standpoint (3 kibana.jsonc files moved without changes)

@dmlemeshko dmlemeshko enabled auto-merge (squash) June 25, 2025 15:00
@dmlemeshko dmlemeshko merged commit bb7cce6 into elastic:main Jun 25, 2025
13 checks passed
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #27 / Stateful Observability - Deployment-agnostic API integration tests SyntheticsAPITests EnableDefaultAlerting deletes (and recreates) the default rule when settings are updated

Metrics [docs]

Unknown metric groups

ESLint disabled in files

id before after diff
@kbn/test-suites-xpack 17 15 -2
@kbn/test-suites-xpack-platform 5 6 +1
@kbn/test-suites-xpack-security 1 2 +1
total -0

ESLint disabled line counts

id before after diff
@kbn/test-suites-xpack 340 220 -120
@kbn/test-suites-xpack-platform 356 466 +110
@kbn/test-suites-xpack-security 47 51 +4
total -6

Total ESLint disabled count

id before after diff
@kbn/test-suites-xpack 357 235 -122
@kbn/test-suites-xpack-platform 361 472 +111
@kbn/test-suites-xpack-security 48 53 +5
total -6

History

cc @dmlemeshko

dmlemeshko added a commit to dmlemeshko/kibana that referenced this pull request Jun 26, 2025
## Summary

Part of elastic/kibana-team#1503

This PR is mostly about moving tests from
x-pack/test/cases_api_integration and updating related imports

Before:

```
x-pack/test/
     | - cases_api_integration/
```

After:
```
x-pack/platform/test/
     | - cases_api_integration/

x-pack/solutions/security/test/
     | - cases_api_integration/
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit bb7cce6)

# Conflicts:
#	.buildkite/ftr_platform_stateful_configs.yml
#	.github/CODEOWNERS
#	x-pack/platform/test/cases_api_integration/common/lib/api/index.ts
#	x-pack/platform/test/cases_api_integration/security_and_spaces/config_trial_common.ts
#	x-pack/platform/test/cases_api_integration/security_and_spaces/tests/common/comments/get_all_comments.ts
#	x-pack/platform/test/cases_api_integration/security_and_spaces/tests/common/index_common_trial/index.ts
#	x-pack/platform/test/cases_api_integration/security_and_spaces/tests/common/user_actions/get_all_user_actions.ts
#	x-pack/platform/test/cases_api_integration/security_and_spaces/tests/trial/cases/user_actions/get_all_user_actions.ts
#	x-pack/platform/test/cases_api_integration/security_and_spaces/tests/trial/index.ts
#	x-pack/platform/test/cases_api_integration/spaces_only/tests/common/comments/get_all_comments.ts
#	x-pack/solutions/security/test/cases_api_integration/security_and_spaces/tests/common/comments/delete_comment.ts
#	x-pack/test/cases_api_integration/security_and_spaces/config_trial_common.ts
#	x-pack/test/functional_with_es_ssl/apps/cases/group2/attachment_framework.ts
#	x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_trial.ts
@dmlemeshko
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

dmlemeshko added a commit that referenced this pull request Jun 27, 2025
…25491)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[ska] relocate x-pack/test/cases_api_integration
(#225056)](#225056)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2025-06-25T17:04:29Z","message":"[ska]
relocate x-pack/test/cases_api_integration (#225056)\n\n##
Summary\n\nPart of
https://github.com/elastic/kibana-team/issues/1503\n\nThis PR is mostly
about moving tests from\nx-pack/test/cases_api_integration and updating
related imports\n\nBefore:\n\n```\nx-pack/test/\n | -
cases_api_integration/\n```\n\nAfter: \n```\nx-pack/platform/test/\n | -
cases_api_integration/\n \nx-pack/solutions/security/test/\n | -
cases_api_integration/\n```\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"bb7cce6d7b0cf5cc4a28648dd846b5328080df7f","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","v9.1.0","v8.19.0"],"title":"[ska]
relocate
x-pack/test/cases_api_integration","number":225056,"url":"https://github.com/elastic/kibana/pull/225056","mergeCommit":{"message":"[ska]
relocate x-pack/test/cases_api_integration (#225056)\n\n##
Summary\n\nPart of
https://github.com/elastic/kibana-team/issues/1503\n\nThis PR is mostly
about moving tests from\nx-pack/test/cases_api_integration and updating
related imports\n\nBefore:\n\n```\nx-pack/test/\n | -
cases_api_integration/\n```\n\nAfter: \n```\nx-pack/platform/test/\n | -
cases_api_integration/\n \nx-pack/solutions/security/test/\n | -
cases_api_integration/\n```\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"bb7cce6d7b0cf5cc4a28648dd846b5328080df7f"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225056","number":225056,"mergeCommit":{"message":"[ska]
relocate x-pack/test/cases_api_integration (#225056)\n\n##
Summary\n\nPart of
https://github.com/elastic/kibana-team/issues/1503\n\nThis PR is mostly
about moving tests from\nx-pack/test/cases_api_integration and updating
related imports\n\nBefore:\n\n```\nx-pack/test/\n | -
cases_api_integration/\n```\n\nAfter: \n```\nx-pack/platform/test/\n | -
cases_api_integration/\n \nx-pack/solutions/security/test/\n | -
cases_api_integration/\n```\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"bb7cce6d7b0cf5cc4a28648dd846b5328080df7f"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants