Skip to content

[ska] relocate 'shared/lib/security' helpers to 'osquery/cypress' dir#225438

Merged
pheyos merged 6 commits intoelastic:mainfrom
dmlemeshko:ska/remove-test-deps-from-osquery-cypress
Jun 27, 2025
Merged

[ska] relocate 'shared/lib/security' helpers to 'osquery/cypress' dir#225438
pheyos merged 6 commits intoelastic:mainfrom
dmlemeshko:ska/remove-test-deps-from-osquery-cypress

Conversation

@dmlemeshko
Copy link
Contributor

Summary

This PR removes kbn/test-suites-serverless as kbn reference for osquery/cypress test-helper module in order to fix circular dependency I faced in #225377

Since the main consumer of that shared/lib/security code is osquery/cypress test module, I believe it is a resonable change in order to unblock us relocating tests from x-pack/test dir.

@dmlemeshko dmlemeshko self-assigned this Jun 26, 2025
this.tags(['failsOnMKI']);
before(async () => {
await PageObjects.svlCommonPage.loginWithRole(ServerlessRoleName.PLATFORM_ENGINEER);
await PageObjects.svlCommonPage.loginWithRole('platform_engineer');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we are safe with hardcoded value to avoid extra imports

Copy link
Contributor

Choose a reason for hiding this comment

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

was it causing a circular dependency issue?

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, importing from kbn/test-suites-serverless is the only obvious reason to face this:

Project references may not form a circular graph. Cycle detected: /opt/buildkite-agent/builds/bk-agent-prod-gcp-1750917190110240407/elastic/kibana-pull-request/kibana/tsconfig.refs.json
--
kibana/x-pack/platform/plugins/shared/osquery/cypress/tsconfig.type_check.json
kibana/x-pack/test_serverless/tsconfig.type_check.json
kibana/x-pack/test/tsconfig.type_check.json
kibana/x-pack/solutions/observability/test/tsconfig.type_check.json
kibana/x-pack/platform/test/tsconfig.type_check.json

@dmlemeshko dmlemeshko marked this pull request as ready for review June 26, 2025 14:01
@dmlemeshko dmlemeshko requested review from a team as code owners June 26, 2025 14:01
@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 26, 2025
@csr csr self-requested a review June 26, 2025 14:12
Copy link
Contributor

@csr csr left a comment

Choose a reason for hiding this comment

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

LGTM

@dmlemeshko dmlemeshko requested a review from darnautov June 26, 2025 16:21
Copy link
Contributor

@tomsonpl tomsonpl left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@dmlemeshko dmlemeshko enabled auto-merge (squash) June 27, 2025 09:56
Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #40 / Unified Tabs Examples Managing Unified Tabs can edit tab label with keyboard events

Metrics [docs]

Unknown metric groups

ESLint disabled in files

id before after diff
@kbn/test-suites-serverless 1 0 -1
osquery 1 2 +1
total -0

Total ESLint disabled count

id before after diff
@kbn/test-suites-serverless 2 1 -1
osquery 117 118 +1
total -0

History

cc @dmlemeshko

@pheyos pheyos disabled auto-merge June 27, 2025 12:50
@pheyos pheyos merged commit 10cc7b3 into elastic:main Jun 27, 2025
8 checks passed
dmlemeshko added a commit to dmlemeshko/kibana that referenced this pull request Jul 7, 2025
…elastic#225438)

## Summary

This PR removes `kbn/test-suites-serverless` as kbn reference for
osquery/cypress test-helper module in order to fix circular dependency I
faced in elastic#225377

Since the main consumer of that `shared/lib/security` code is
`osquery/cypress` test module, I believe it is a resonable change in
order to unblock us relocating tests from `x-pack/test` dir.

(cherry picked from commit 10cc7b3)
@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 to dmlemeshko/kibana that referenced this pull request Jul 7, 2025
…elastic#225438)

## Summary

This PR removes `kbn/test-suites-serverless` as kbn reference for
osquery/cypress test-helper module in order to fix circular dependency I
faced in elastic#225377

Since the main consumer of that `shared/lib/security` code is
`osquery/cypress` test module, I believe it is a resonable change in
order to unblock us relocating tests from `x-pack/test` dir.

(cherry picked from commit 10cc7b3)
@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 to dmlemeshko/kibana that referenced this pull request Jul 8, 2025
…elastic#225438)

## Summary

This PR removes `kbn/test-suites-serverless` as kbn reference for
osquery/cypress test-helper module in order to fix circular dependency I
faced in elastic#225377

Since the main consumer of that `shared/lib/security` code is
`osquery/cypress` test module, I believe it is a resonable change in
order to unblock us relocating tests from `x-pack/test` dir.

(cherry picked from commit 10cc7b3)
@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 Jul 8, 2025
…s' dir (#225438) (#226802)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[ska] relocate 'shared/lib/security' helpers to 'osquery/cypress' dir
(#225438)](#225438)

<!--- 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-27T12:50:52Z","message":"[ska]
relocate 'shared/lib/security' helpers to 'osquery/cypress' dir
(#225438)\n\n## Summary\n\nThis PR removes `kbn/test-suites-serverless`
as kbn reference for\nosquery/cypress test-helper module in order to fix
circular dependency I\nfaced in
https://github.com/elastic/kibana/pull/225377\n\nSince the main consumer
of that `shared/lib/security` code is\n`osquery/cypress` test module, I
believe it is a resonable change in\norder to unblock us relocating
tests from `x-pack/test`
dir.","sha":"10cc7b3c62cdd4346792fefa2d403d3ddf759e6a","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","v9.1.0","v8.19.0","v9.2.0"],"title":"[ska]
relocate 'shared/lib/security' helpers to 'osquery/cypress'
dir","number":225438,"url":"https://github.com/elastic/kibana/pull/225438","mergeCommit":{"message":"[ska]
relocate 'shared/lib/security' helpers to 'osquery/cypress' dir
(#225438)\n\n## Summary\n\nThis PR removes `kbn/test-suites-serverless`
as kbn reference for\nosquery/cypress test-helper module in order to fix
circular dependency I\nfaced in
https://github.com/elastic/kibana/pull/225377\n\nSince the main consumer
of that `shared/lib/security` code is\n`osquery/cypress` test module, I
believe it is a resonable change in\norder to unblock us relocating
tests from `x-pack/test`
dir.","sha":"10cc7b3c62cdd4346792fefa2d403d3ddf759e6a"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225438","number":225438,"mergeCommit":{"message":"[ska]
relocate 'shared/lib/security' helpers to 'osquery/cypress' dir
(#225438)\n\n## Summary\n\nThis PR removes `kbn/test-suites-serverless`
as kbn reference for\nosquery/cypress test-helper module in order to fix
circular dependency I\nfaced in
https://github.com/elastic/kibana/pull/225377\n\nSince the main consumer
of that `shared/lib/security` code is\n`osquery/cypress` test module, I
believe it is a resonable change in\norder to unblock us relocating
tests from `x-pack/test`
dir.","sha":"10cc7b3c62cdd4346792fefa2d403d3ddf759e6a"}}]}] BACKPORT-->
dmlemeshko added a commit that referenced this pull request Jul 8, 2025
…ss' dir (#225438) (#226803)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[ska] relocate 'shared/lib/security' helpers to 'osquery/cypress' dir
(#225438)](#225438)

<!--- 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-27T12:50:52Z","message":"[ska]
relocate 'shared/lib/security' helpers to 'osquery/cypress' dir
(#225438)\n\n## Summary\n\nThis PR removes `kbn/test-suites-serverless`
as kbn reference for\nosquery/cypress test-helper module in order to fix
circular dependency I\nfaced in
https://github.com/elastic/kibana/pull/225377\n\nSince the main consumer
of that `shared/lib/security` code is\n`osquery/cypress` test module, I
believe it is a resonable change in\norder to unblock us relocating
tests from `x-pack/test`
dir.","sha":"10cc7b3c62cdd4346792fefa2d403d3ddf759e6a","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","v9.1.0","v8.19.0","v9.2.0"],"title":"[ska]
relocate 'shared/lib/security' helpers to 'osquery/cypress'
dir","number":225438,"url":"https://github.com/elastic/kibana/pull/225438","mergeCommit":{"message":"[ska]
relocate 'shared/lib/security' helpers to 'osquery/cypress' dir
(#225438)\n\n## Summary\n\nThis PR removes `kbn/test-suites-serverless`
as kbn reference for\nosquery/cypress test-helper module in order to fix
circular dependency I\nfaced in
https://github.com/elastic/kibana/pull/225377\n\nSince the main consumer
of that `shared/lib/security` code is\n`osquery/cypress` test module, I
believe it is a resonable change in\norder to unblock us relocating
tests from `x-pack/test`
dir.","sha":"10cc7b3c62cdd4346792fefa2d403d3ddf759e6a"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/226802","number":226802,"state":"OPEN"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225438","number":225438,"mergeCommit":{"message":"[ska]
relocate 'shared/lib/security' helpers to 'osquery/cypress' dir
(#225438)\n\n## Summary\n\nThis PR removes `kbn/test-suites-serverless`
as kbn reference for\nosquery/cypress test-helper module in order to fix
circular dependency I\nfaced in
https://github.com/elastic/kibana/pull/225377\n\nSince the main consumer
of that `shared/lib/security` code is\n`osquery/cypress` test module, I
believe it is a resonable change in\norder to unblock us relocating
tests from `x-pack/test`
dir.","sha":"10cc7b3c62cdd4346792fefa2d403d3ddf759e6a"}}]}] BACKPORT-->
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 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

Comments