Skip to content

Comments

[ska] relocate common services and utils to security_solution_api_integration dir#228780

Merged
delanni merged 31 commits intoelastic:mainfrom
dmlemeshko:ska/relocate-sec-solution-ftr-helpers
Aug 8, 2025
Merged

[ska] relocate common services and utils to security_solution_api_integration dir#228780
delanni merged 31 commits intoelastic:mainfrom
dmlemeshko:ska/relocate-sec-solution-ftr-helpers

Conversation

@dmlemeshko
Copy link
Contributor

@dmlemeshko dmlemeshko commented Jul 21, 2025

Summary

It is a preparation work before we relocate x-pack/test/security_solution_api_integration under x-pack/solutions/security/test:

  • moving helpers/utils inside directory to avoid updating imports after relocation
  • importing from security_solution_api_integration inside x-pack/solutions/security/test leads to circular dependency issue, so I copied common/utils/detections_response as a temporary workaround until tests dir is relocated

@dmlemeshko dmlemeshko marked this pull request as ready for review July 22, 2025 15:03
@dmlemeshko dmlemeshko requested review from a team as code owners July 22, 2025 15:03
@dmlemeshko dmlemeshko self-assigned this Jul 22, 2025
@dmlemeshko dmlemeshko added release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v9.1.0 v8.19.0 v9.2.0 labels Jul 22, 2025
@banderror banderror requested review from maximpn and removed request for dplumlee July 24, 2025 10:05
Copy link
Contributor

@opauloh opauloh 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

Copy link
Member

@spong spong left a comment

Choose a reason for hiding this comment

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

Security GenAI changes LGTM! 👍 Thanks for helping with this refactor @dmlemeshko! 🙂

Copy link
Contributor

@rylnd rylnd left a comment

Choose a reason for hiding this comment

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

Detection Engine changes LGTM

Copy link
Contributor

@PhilippeOberti PhilippeOberti Aug 8, 2025

Choose a reason for hiding this comment

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

@dmlemeshko This file along a bunch of others are now duplicated. Was this intentional? Couldn't we find a way to extract the files in a place where they car be reused?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is intentional but only for a short time till we relocate main test directories. Moving it to package could be a better way, but since we will remove duplicates later I would leave it for test owners

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #17 / Interactive setup APIs - Enrollment flow should be able to enroll with valid authentication code

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
spaces 236 237 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
spaces 28.5KB 28.6KB +67.0B
Unknown metric groups

API count

id before after diff
spaces 256 259 +3

History

cc @dmlemeshko

@delanni delanni merged commit 0051e2c into elastic:main Aug 8, 2025
13 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

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

@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

You might need to backport the following PRs to 9.1:
- [Security Solution] [SKA] Moved cypress folder (#230198)
- [ska] remove 'test-suites-xpack-observability' imports in x-pack/test (#226174)

Manual backport

To create the backport manually run:

node scripts/backport --pr 228780

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 Aug 12, 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 228780 locally
cc: @dmlemeshko

1 similar comment
@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 228780 locally
cc: @dmlemeshko

dmlemeshko added a commit to dmlemeshko/kibana that referenced this pull request Aug 13, 2025
…egration dir (elastic#228780)

## Summary

It is a preparation work before we relocate
`x-pack/test/security_solution_api_integration` under
`x-pack/solutions/security/test`:

- moving helpers/utils inside directory to avoid updating imports after
relocation
- importing from `security_solution_api_integration` inside
`x-pack/solutions/security/test` leads to circular dependency issue, so
I copied `common/utils/detections_response` as a temporary workaround
until tests dir is relocated

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
(cherry picked from commit 0051e2c)

# Conflicts:
#	x-pack/test/api_integration/services/security_solution_api.gen.ts
#	x-pack/test/common/services/index.ts
#	x-pack/test/security_solution_api_integration/test_suites/siem_migrations/rules/trial_license_complete_tier/get_prebuilt_rules.ts
#	x-pack/test/security_solution_api_integration/test_suites/siem_migrations/rules/trial_license_complete_tier/install.ts
#	x-pack/test/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 Aug 13, 2025
…pi_integration dir (#228780) (#231623)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[ska] relocate common services and utils to
security_solution_api_integration dir
(#228780)](#228780)

<!--- 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-08-08T09:48:47Z","message":"[ska]
relocate common services and utils to security_solution_api_integration
dir (#228780)\n\n## Summary\n\nIt is a preparation work before we
relocate\n`x-pack/test/security_solution_api_integration`
under\n`x-pack/solutions/security/test`:\n\n- moving helpers/utils
inside directory to avoid updating imports after\nrelocation\n-
importing from `security_solution_api_integration`
inside\n`x-pack/solutions/security/test` leads to circular dependency
issue, so\nI copied `common/utils/detections_response` as a temporary
workaround\nuntil tests dir is relocated\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Maxim
Palenov
<maxim.palenov@elastic.co>","sha":"0051e2c7d2c1cb10124de1385bb3fd7974173a3c","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]
relocate common services and utils to security_solution_api_integration
dir","number":228780,"url":"https://github.com/elastic/kibana/pull/228780","mergeCommit":{"message":"[ska]
relocate common services and utils to security_solution_api_integration
dir (#228780)\n\n## Summary\n\nIt is a preparation work before we
relocate\n`x-pack/test/security_solution_api_integration`
under\n`x-pack/solutions/security/test`:\n\n- moving helpers/utils
inside directory to avoid updating imports after\nrelocation\n-
importing from `security_solution_api_integration`
inside\n`x-pack/solutions/security/test` leads to circular dependency
issue, so\nI copied `common/utils/detections_response` as a temporary
workaround\nuntil tests dir is relocated\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Maxim
Palenov
<maxim.palenov@elastic.co>","sha":"0051e2c7d2c1cb10124de1385bb3fd7974173a3c"}},"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/228780","number":228780,"mergeCommit":{"message":"[ska]
relocate common services and utils to security_solution_api_integration
dir (#228780)\n\n## Summary\n\nIt is a preparation work before we
relocate\n`x-pack/test/security_solution_api_integration`
under\n`x-pack/solutions/security/test`:\n\n- moving helpers/utils
inside directory to avoid updating imports after\nrelocation\n-
importing from `security_solution_api_integration`
inside\n`x-pack/solutions/security/test` leads to circular dependency
issue, so\nI copied `common/utils/detections_response` as a temporary
workaround\nuntil tests dir is relocated\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Maxim
Palenov
<maxim.palenov@elastic.co>","sha":"0051e2c7d2c1cb10124de1385bb3fd7974173a3c"}},{"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 added v9.1.3 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Aug 13, 2025
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
…egration dir (elastic#228780)

## Summary

It is a preparation work before we relocate
`x-pack/test/security_solution_api_integration` under
`x-pack/solutions/security/test`:

- moving helpers/utils inside directory to avoid updating imports after
relocation
- importing from `security_solution_api_integration` inside
`x-pack/solutions/security/test` leads to circular dependency issue, so
I copied `common/utils/detections_response` as a temporary workaround
until tests dir is relocated

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
qn895 pushed a commit to qn895/kibana that referenced this pull request Aug 26, 2025
…egration dir (elastic#228780)

## Summary

It is a preparation work before we relocate
`x-pack/test/security_solution_api_integration` under
`x-pack/solutions/security/test`:

- moving helpers/utils inside directory to avoid updating imports after
relocation
- importing from `security_solution_api_integration` inside
`x-pack/solutions/security/test` leads to circular dependency issue, so
I copied `common/utils/detections_response` as a temporary workaround
until tests dir is relocated

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
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.1 v9.1.1 v9.1.3 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.