Skip to content

Conversation

@dmlemeshko
Copy link
Contributor

@dmlemeshko dmlemeshko commented Jul 28, 2025

Summary

This PR is a preparation before moving solution tests from x-pack/test_serverless. Since we move tests in chunks, having backward imports (solution imports in "platform" code) will lead to circular dependency issue. And we can't move all in 1 PR, it is just too much code.

This PR temporarily copies helpers/constants/page objects to x-pack/test_serverless so that directory has only imports from kbn/test-suites-xpack-platform and not solutions. Duplicates will be removed after we finish relocating all the Security Solution tests.

@dmlemeshko dmlemeshko changed the title Ska/fix helper imports [ska] remove test-helper imports that lead to circular dependencies issue Jul 28, 2025
@dmlemeshko dmlemeshko self-assigned this Jul 28, 2025
@dmlemeshko dmlemeshko added release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v9.2.0 v9.1.1 v8.19.1 labels Jul 28, 2025
@dmlemeshko dmlemeshko marked this pull request as ready for review July 28, 2025 12:08
@dmlemeshko dmlemeshko requested review from a team as code owners July 28, 2025 12:08
Copy link
Contributor

@maxcold maxcold left a comment

Choose a reason for hiding this comment

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

cloud_security_posture changes lgtm

serverless: true,

services: {}, // define later
services: svlServices,
Copy link
Contributor Author

@dmlemeshko dmlemeshko Jul 28, 2025

Choose a reason for hiding this comment

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

config without services loaded was failing when Cypress tests started with FTR were trying to use KibanaServer call

Copy link
Contributor

@gergoabraham gergoabraham left a comment

Choose a reason for hiding this comment

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

@elastic/security-defend-workflows related changes look good 👍

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

cc @dmlemeshko

@dmlemeshko dmlemeshko merged commit 83029af into elastic:main Jul 28, 2025
13 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

https://github.com/elastic/kibana/actions/runs/16571629384

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts
9.1 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 229587

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jul 30, 2025
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 229587 locally
cc: @dmlemeshko

dmlemeshko added a commit to dmlemeshko/kibana that referenced this pull request Jul 30, 2025
…ssue (elastic#229587)

## Summary

This PR is a preparation before moving solution tests from
`x-pack/test_serverless`. Since we move tests in chunks, having backward
imports (solution imports in "platform" code) will lead to circular
dependency issue. And we can't move all in 1 PR, it is just too much
code.

This PR temporarily copies helpers/constants/page objects to
`x-pack/test_serverless` so that directory has only imports from
`kbn/test-suites-xpack-platform` and not solutions. Duplicates will be
removed after we finish relocating all the Security Solution tests.

---------

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

# Conflicts:
#	x-pack/test_serverless/tsconfig.json
@dmlemeshko
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
9.1

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 Jul 31, 2025
…cies issue (#229587) (#230006)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[ska] remove test-helper imports that lead to circular dependencies
issue (#229587)](#229587)

<!--- 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-07-28T14:21:14Z","message":"[ska]
remove test-helper imports that lead to circular dependencies issue
(#229587)\n\n## Summary\n\nThis PR is a preparation before moving
solution tests from\n`x-pack/test_serverless`. Since we move tests in
chunks, having backward\nimports (solution imports in \"platform\" code)
will lead to circular\ndependency issue. And we can't move all in 1 PR,
it is just too much\ncode.\n\nThis PR temporarily copies
helpers/constants/page objects to\n`x-pack/test_serverless` so that
directory has only imports from\n`kbn/test-suites-xpack-platform` and
not solutions. Duplicates will be\nremoved after we finish relocating
all the Security Solution tests.\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"83029af8a13b74b4f3c70da2cb4c330ac03edcf1","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport
missing","backport:version","v9.2.0","v9.1.1","v8.19.1"],"title":"[ska]
remove test-helper imports that lead to circular dependencies
issue","number":229587,"url":"https://github.com/elastic/kibana/pull/229587","mergeCommit":{"message":"[ska]
remove test-helper imports that lead to circular dependencies issue
(#229587)\n\n## Summary\n\nThis PR is a preparation before moving
solution tests from\n`x-pack/test_serverless`. Since we move tests in
chunks, having backward\nimports (solution imports in \"platform\" code)
will lead to circular\ndependency issue. And we can't move all in 1 PR,
it is just too much\ncode.\n\nThis PR temporarily copies
helpers/constants/page objects to\n`x-pack/test_serverless` so that
directory has only imports from\n`kbn/test-suites-xpack-platform` and
not solutions. Duplicates will be\nremoved after we finish relocating
all the Security Solution tests.\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"83029af8a13b74b4f3c70da2cb4c330ac03edcf1"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/229587","number":229587,"mergeCommit":{"message":"[ska]
remove test-helper imports that lead to circular dependencies issue
(#229587)\n\n## Summary\n\nThis PR is a preparation before moving
solution tests from\n`x-pack/test_serverless`. Since we move tests in
chunks, having backward\nimports (solution imports in \"platform\" code)
will lead to circular\ndependency issue. And we can't move all in 1 PR,
it is just too much\ncode.\n\nThis PR temporarily copies
helpers/constants/page objects to\n`x-pack/test_serverless` so that
directory has only imports from\n`kbn/test-suites-xpack-platform` and
not solutions. Duplicates will be\nremoved after we finish relocating
all the Security Solution tests.\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"83029af8a13b74b4f3c70da2cb4c330ac03edcf1"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jul 31, 2025
delanni pushed a commit to delanni/kibana that referenced this pull request Aug 5, 2025
…ssue (elastic#229587)

## Summary

This PR is a preparation before moving solution tests from
`x-pack/test_serverless`. Since we move tests in chunks, having backward
imports (solution imports in "platform" code) will lead to circular
dependency issue. And we can't move all in 1 PR, it is just too much
code.

This PR temporarily copies helpers/constants/page objects to
`x-pack/test_serverless` so that directory has only imports from
`kbn/test-suites-xpack-platform` and not solutions. Duplicates will be
removed after we finish relocating all the Security Solution tests.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
dmlemeshko added a commit to dmlemeshko/kibana that referenced this pull request Aug 11, 2025
…ssue (elastic#229587)

## Summary

This PR is a preparation before moving solution tests from
`x-pack/test_serverless`. Since we move tests in chunks, having backward
imports (solution imports in "platform" code) will lead to circular
dependency issue. And we can't move all in 1 PR, it is just too much
code.

This PR temporarily copies helpers/constants/page objects to
`x-pack/test_serverless` so that directory has only imports from
`kbn/test-suites-xpack-platform` and not solutions. Duplicates will be
removed after we finish relocating all the Security Solution tests.

---------

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

# Conflicts:
#	x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/cloud_security_metering.ts
#	x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/status/status_indexed.ts
#	x-pack/test_serverless/tsconfig.json
@dmlemeshko
Copy link
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 Aug 12, 2025
…ncies issue (#229587) (#231326)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[ska] remove test-helper imports that lead to circular dependencies
issue (#229587)](#229587)

<!--- 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-07-28T14:21:14Z","message":"[ska]
remove test-helper imports that lead to circular dependencies issue
(#229587)\n\n## Summary\n\nThis PR is a preparation before moving
solution tests from\n`x-pack/test_serverless`. Since we move tests in
chunks, having backward\nimports (solution imports in \"platform\" code)
will lead to circular\ndependency issue. And we can't move all in 1 PR,
it is just too much\ncode.\n\nThis PR temporarily copies
helpers/constants/page objects to\n`x-pack/test_serverless` so that
directory has only imports from\n`kbn/test-suites-xpack-platform` and
not solutions. Duplicates will be\nremoved after we finish relocating
all the Security Solution tests.\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"83029af8a13b74b4f3c70da2cb4c330ac03edcf1","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.2.0","v9.1.1","v8.19.1"],"title":"[ska]
remove test-helper imports that lead to circular dependencies
issue","number":229587,"url":"https://github.com/elastic/kibana/pull/229587","mergeCommit":{"message":"[ska]
remove test-helper imports that lead to circular dependencies issue
(#229587)\n\n## Summary\n\nThis PR is a preparation before moving
solution tests from\n`x-pack/test_serverless`. Since we move tests in
chunks, having backward\nimports (solution imports in \"platform\" code)
will lead to circular\ndependency issue. And we can't move all in 1 PR,
it is just too much\ncode.\n\nThis PR temporarily copies
helpers/constants/page objects to\n`x-pack/test_serverless` so that
directory has only imports from\n`kbn/test-suites-xpack-platform` and
not solutions. Duplicates will be\nremoved after we finish relocating
all the Security Solution tests.\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"83029af8a13b74b4f3c70da2cb4c330ac03edcf1"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/229587","number":229587,"mergeCommit":{"message":"[ska]
remove test-helper imports that lead to circular dependencies issue
(#229587)\n\n## Summary\n\nThis PR is a preparation before moving
solution tests from\n`x-pack/test_serverless`. Since we move tests in
chunks, having backward\nimports (solution imports in \"platform\" code)
will lead to circular\ndependency issue. And we can't move all in 1 PR,
it is just too much\ncode.\n\nThis PR temporarily copies
helpers/constants/page objects to\n`x-pack/test_serverless` so that
directory has only imports from\n`kbn/test-suites-xpack-platform` and
not solutions. Duplicates will be\nremoved after we finish relocating
all the Security Solution tests.\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"83029af8a13b74b4f3c70da2cb4c330ac03edcf1"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/230006","number":230006,"state":"MERGED","mergeCommit":{"sha":"d4b9bb4c78f908e4460100d50cd952128419269c","message":"[9.1]
[ska] remove test-helper imports that lead to circular dependencies
issue (#229587) (#230006)\n\n# Backport\n\nThis will backport the
following commits from `main` to `9.1`:\n- [[ska] remove test-helper
imports that lead to circular dependencies\nissue
(#229587)](https://github.com/elastic/kibana/pull/229587)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>"}},{"branch":"8.19","label":"v8.19.1","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:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes v8.19.3 v9.1.1 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants