[kbn/scout] move samlAuth call to create ES security indexes after servers start#247630
Merged
dmlemeshko merged 5 commits intoelastic:mainfrom Jan 5, 2026
Merged
Conversation
csr
approved these changes
Dec 30, 2025
Member
csr
left a comment
There was a problem hiding this comment.
Code LGTM. We discussed separately that you'll be running the flaky test runner to ensure no issues.
…com:dmlemeshko/kibana into scout/trigger-saml-auth-after-servers-start
Contributor
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#10281[✅] x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts: 20/20 tests passed. |
Contributor
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#10283[✅] x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts: 20/20 tests passed. |
csr
approved these changes
Jan 5, 2026
Contributor
|
Starting backport for target branches: 8.19, 9.1, 9.2, 9.3 |
Contributor
💚 Build Succeeded
Metrics [docs]
History
|
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jan 5, 2026
…rvers start (elastic#247630) Originally we added this code as part of `preCreateSecurityIndexesFixture` called in `globalSetupHook`. It automatically enforces `global.setup.ts` creation even if the hook has no tests-specific logic: file existence triggers the hook call. This PR moves the logic to server start assuming it is only needed for the local cluster and it should simplify Scout/Playwright hook logic and make hook optional as it was originally intended. From CI logs we can see indexes were created before Playwright tests were started: ``` 2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default] 2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]])." previous.health="YELLOW" reason="shards started [[.security-tokens-7][0]]" 2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default] 2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8] 2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]])." previous.health="YELLOW" reason="shards started [[.security-profile-8][0]]" 2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with "saml" provider succeeded (requires redirect: true). {"service":{"node":{"roles":["background_tasks","ui"]}}} 2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local ``` (cherry picked from commit f109902)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jan 5, 2026
…rvers start (elastic#247630) Originally we added this code as part of `preCreateSecurityIndexesFixture` called in `globalSetupHook`. It automatically enforces `global.setup.ts` creation even if the hook has no tests-specific logic: file existence triggers the hook call. This PR moves the logic to server start assuming it is only needed for the local cluster and it should simplify Scout/Playwright hook logic and make hook optional as it was originally intended. From CI logs we can see indexes were created before Playwright tests were started: ``` 2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default] 2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]])." previous.health="YELLOW" reason="shards started [[.security-tokens-7][0]]" 2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default] 2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8] 2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]])." previous.health="YELLOW" reason="shards started [[.security-profile-8][0]]" 2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with "saml" provider succeeded (requires redirect: true). {"service":{"node":{"roles":["background_tasks","ui"]}}} 2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local ``` (cherry picked from commit f109902)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jan 5, 2026
…rvers start (elastic#247630) Originally we added this code as part of `preCreateSecurityIndexesFixture` called in `globalSetupHook`. It automatically enforces `global.setup.ts` creation even if the hook has no tests-specific logic: file existence triggers the hook call. This PR moves the logic to server start assuming it is only needed for the local cluster and it should simplify Scout/Playwright hook logic and make hook optional as it was originally intended. From CI logs we can see indexes were created before Playwright tests were started: ``` 2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default] 2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]])." previous.health="YELLOW" reason="shards started [[.security-tokens-7][0]]" 2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default] 2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8] 2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]])." previous.health="YELLOW" reason="shards started [[.security-profile-8][0]]" 2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with "saml" provider succeeded (requires redirect: true). {"service":{"node":{"roles":["background_tasks","ui"]}}} 2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local ``` (cherry picked from commit f109902)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jan 5, 2026
…rvers start (elastic#247630) Originally we added this code as part of `preCreateSecurityIndexesFixture` called in `globalSetupHook`. It automatically enforces `global.setup.ts` creation even if the hook has no tests-specific logic: file existence triggers the hook call. This PR moves the logic to server start assuming it is only needed for the local cluster and it should simplify Scout/Playwright hook logic and make hook optional as it was originally intended. From CI logs we can see indexes were created before Playwright tests were started: ``` 2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default] 2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]])." previous.health="YELLOW" reason="shards started [[.security-tokens-7][0]]" 2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default] 2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8] 2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]])." previous.health="YELLOW" reason="shards started [[.security-profile-8][0]]" 2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with "saml" provider succeeded (requires redirect: true). {"service":{"node":{"roles":["background_tasks","ui"]}}} 2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local ``` (cherry picked from commit f109902)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Jan 5, 2026
…ter servers start (#247630) (#247796) # Backport This will backport the following commits from `main` to `9.2`: - [[kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)](#247630) <!--- Backport version: 9.6.6 --> ### 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":"2026-01-05T10:33:17Z","message":"[kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)\n\nOriginally we added this code as part of\n`preCreateSecurityIndexesFixture` called in `globalSetupHook`.\n\nIt automatically enforces `global.setup.ts` creation even if the hook\nhas no tests-specific logic: file existence triggers the hook call.\n\nThis PR moves the logic to server start assuming it is only needed for\nthe local cluster and it should simplify Scout/Playwright hook logic and\nmake hook optional as it was originally intended.\n\nFrom CI logs we can see indexes were created before Playwright tests\nwere started:\n```\n\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-tokens-7][0]]\"\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8]\n2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-profile-8][0]]\"\n2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with \"saml\" provider succeeded (requires redirect: true). {\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\n2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local\n```","sha":"f1099028f7e4c613b792fdae881613a69711909f","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.4.0"],"title":"[kbn/scout] move samlAuth call to create ES security indexes after servers start","number":247630,"url":"https://github.com/elastic/kibana/pull/247630","mergeCommit":{"message":"[kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)\n\nOriginally we added this code as part of\n`preCreateSecurityIndexesFixture` called in `globalSetupHook`.\n\nIt automatically enforces `global.setup.ts` creation even if the hook\nhas no tests-specific logic: file existence triggers the hook call.\n\nThis PR moves the logic to server start assuming it is only needed for\nthe local cluster and it should simplify Scout/Playwright hook logic and\nmake hook optional as it was originally intended.\n\nFrom CI logs we can see indexes were created before Playwright tests\nwere started:\n```\n\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-tokens-7][0]]\"\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8]\n2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-profile-8][0]]\"\n2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with \"saml\" provider succeeded (requires redirect: true). {\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\n2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local\n```","sha":"f1099028f7e4c613b792fdae881613a69711909f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/247630","number":247630,"mergeCommit":{"message":"[kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)\n\nOriginally we added this code as part of\n`preCreateSecurityIndexesFixture` called in `globalSetupHook`.\n\nIt automatically enforces `global.setup.ts` creation even if the hook\nhas no tests-specific logic: file existence triggers the hook call.\n\nThis PR moves the logic to server start assuming it is only needed for\nthe local cluster and it should simplify Scout/Playwright hook logic and\nmake hook optional as it was originally intended.\n\nFrom CI logs we can see indexes were created before Playwright tests\nwere started:\n```\n\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-tokens-7][0]]\"\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8]\n2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-profile-8][0]]\"\n2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with \"saml\" provider succeeded (requires redirect: true). {\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\n2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local\n```","sha":"f1099028f7e4c613b792fdae881613a69711909f"}}]}] BACKPORT--> Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
kibanamachine
added a commit
that referenced
this pull request
Jan 5, 2026
…ter servers start (#247630) (#247797) # Backport This will backport the following commits from `main` to `9.3`: - [[kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)](#247630) <!--- Backport version: 9.6.6 --> ### 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":"2026-01-05T10:33:17Z","message":"[kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)\n\nOriginally we added this code as part of\n`preCreateSecurityIndexesFixture` called in `globalSetupHook`.\n\nIt automatically enforces `global.setup.ts` creation even if the hook\nhas no tests-specific logic: file existence triggers the hook call.\n\nThis PR moves the logic to server start assuming it is only needed for\nthe local cluster and it should simplify Scout/Playwright hook logic and\nmake hook optional as it was originally intended.\n\nFrom CI logs we can see indexes were created before Playwright tests\nwere started:\n```\n\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-tokens-7][0]]\"\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8]\n2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-profile-8][0]]\"\n2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with \"saml\" provider succeeded (requires redirect: true). {\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\n2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local\n```","sha":"f1099028f7e4c613b792fdae881613a69711909f","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.4.0"],"title":"[kbn/scout] move samlAuth call to create ES security indexes after servers start","number":247630,"url":"https://github.com/elastic/kibana/pull/247630","mergeCommit":{"message":"[kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)\n\nOriginally we added this code as part of\n`preCreateSecurityIndexesFixture` called in `globalSetupHook`.\n\nIt automatically enforces `global.setup.ts` creation even if the hook\nhas no tests-specific logic: file existence triggers the hook call.\n\nThis PR moves the logic to server start assuming it is only needed for\nthe local cluster and it should simplify Scout/Playwright hook logic and\nmake hook optional as it was originally intended.\n\nFrom CI logs we can see indexes were created before Playwright tests\nwere started:\n```\n\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-tokens-7][0]]\"\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8]\n2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-profile-8][0]]\"\n2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with \"saml\" provider succeeded (requires redirect: true). {\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\n2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local\n```","sha":"f1099028f7e4c613b792fdae881613a69711909f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/247630","number":247630,"mergeCommit":{"message":"[kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)\n\nOriginally we added this code as part of\n`preCreateSecurityIndexesFixture` called in `globalSetupHook`.\n\nIt automatically enforces `global.setup.ts` creation even if the hook\nhas no tests-specific logic: file existence triggers the hook call.\n\nThis PR moves the logic to server start assuming it is only needed for\nthe local cluster and it should simplify Scout/Playwright hook logic and\nmake hook optional as it was originally intended.\n\nFrom CI logs we can see indexes were created before Playwright tests\nwere started:\n```\n\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-tokens-7][0]]\"\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8]\n2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-profile-8][0]]\"\n2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with \"saml\" provider succeeded (requires redirect: true). {\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\n2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local\n```","sha":"f1099028f7e4c613b792fdae881613a69711909f"}}]}] BACKPORT--> Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
kibanamachine
added a commit
that referenced
this pull request
Jan 5, 2026
…ter servers start (#247630) (#247795) # Backport This will backport the following commits from `main` to `9.1`: - [[kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)](#247630) <!--- Backport version: 9.6.6 --> ### 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":"2026-01-05T10:33:17Z","message":"[kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)\n\nOriginally we added this code as part of\n`preCreateSecurityIndexesFixture` called in `globalSetupHook`.\n\nIt automatically enforces `global.setup.ts` creation even if the hook\nhas no tests-specific logic: file existence triggers the hook call.\n\nThis PR moves the logic to server start assuming it is only needed for\nthe local cluster and it should simplify Scout/Playwright hook logic and\nmake hook optional as it was originally intended.\n\nFrom CI logs we can see indexes were created before Playwright tests\nwere started:\n```\n\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-tokens-7][0]]\"\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8]\n2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-profile-8][0]]\"\n2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with \"saml\" provider succeeded (requires redirect: true). {\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\n2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local\n```","sha":"f1099028f7e4c613b792fdae881613a69711909f","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.4.0"],"title":"[kbn/scout] move samlAuth call to create ES security indexes after servers start","number":247630,"url":"https://github.com/elastic/kibana/pull/247630","mergeCommit":{"message":"[kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)\n\nOriginally we added this code as part of\n`preCreateSecurityIndexesFixture` called in `globalSetupHook`.\n\nIt automatically enforces `global.setup.ts` creation even if the hook\nhas no tests-specific logic: file existence triggers the hook call.\n\nThis PR moves the logic to server start assuming it is only needed for\nthe local cluster and it should simplify Scout/Playwright hook logic and\nmake hook optional as it was originally intended.\n\nFrom CI logs we can see indexes were created before Playwright tests\nwere started:\n```\n\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-tokens-7][0]]\"\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8]\n2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-profile-8][0]]\"\n2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with \"saml\" provider succeeded (requires redirect: true). {\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\n2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local\n```","sha":"f1099028f7e4c613b792fdae881613a69711909f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/247630","number":247630,"mergeCommit":{"message":"[kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)\n\nOriginally we added this code as part of\n`preCreateSecurityIndexesFixture` called in `globalSetupHook`.\n\nIt automatically enforces `global.setup.ts` creation even if the hook\nhas no tests-specific logic: file existence triggers the hook call.\n\nThis PR moves the logic to server start assuming it is only needed for\nthe local cluster and it should simplify Scout/Playwright hook logic and\nmake hook optional as it was originally intended.\n\nFrom CI logs we can see indexes were created before Playwright tests\nwere started:\n```\n\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-tokens-7][0]]\"\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8]\n2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-profile-8][0]]\"\n2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with \"saml\" provider succeeded (requires redirect: true). {\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\n2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local\n```","sha":"f1099028f7e4c613b792fdae881613a69711909f"}}]}] BACKPORT--> Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
kibanamachine
added a commit
that referenced
this pull request
Jan 5, 2026
…fter servers start (#247630) (#247794) # Backport This will backport the following commits from `main` to `8.19`: - [[kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)](#247630) <!--- Backport version: 9.6.6 --> ### 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":"2026-01-05T10:33:17Z","message":"[kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)\n\nOriginally we added this code as part of\n`preCreateSecurityIndexesFixture` called in `globalSetupHook`.\n\nIt automatically enforces `global.setup.ts` creation even if the hook\nhas no tests-specific logic: file existence triggers the hook call.\n\nThis PR moves the logic to server start assuming it is only needed for\nthe local cluster and it should simplify Scout/Playwright hook logic and\nmake hook optional as it was originally intended.\n\nFrom CI logs we can see indexes were created before Playwright tests\nwere started:\n```\n\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-tokens-7][0]]\"\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8]\n2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-profile-8][0]]\"\n2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with \"saml\" provider succeeded (requires redirect: true). {\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\n2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local\n```","sha":"f1099028f7e4c613b792fdae881613a69711909f","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.4.0"],"title":"[kbn/scout] move samlAuth call to create ES security indexes after servers start","number":247630,"url":"https://github.com/elastic/kibana/pull/247630","mergeCommit":{"message":"[kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)\n\nOriginally we added this code as part of\n`preCreateSecurityIndexesFixture` called in `globalSetupHook`.\n\nIt automatically enforces `global.setup.ts` creation even if the hook\nhas no tests-specific logic: file existence triggers the hook call.\n\nThis PR moves the logic to server start assuming it is only needed for\nthe local cluster and it should simplify Scout/Playwright hook logic and\nmake hook optional as it was originally intended.\n\nFrom CI logs we can see indexes were created before Playwright tests\nwere started:\n```\n\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-tokens-7][0]]\"\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8]\n2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-profile-8][0]]\"\n2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with \"saml\" provider succeeded (requires redirect: true). {\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\n2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local\n```","sha":"f1099028f7e4c613b792fdae881613a69711909f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/247630","number":247630,"mergeCommit":{"message":"[kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)\n\nOriginally we added this code as part of\n`preCreateSecurityIndexesFixture` called in `globalSetupHook`.\n\nIt automatically enforces `global.setup.ts` creation even if the hook\nhas no tests-specific logic: file existence triggers the hook call.\n\nThis PR moves the logic to server start assuming it is only needed for\nthe local cluster and it should simplify Scout/Playwright hook logic and\nmake hook optional as it was originally intended.\n\nFrom CI logs we can see indexes were created before Playwright tests\nwere started:\n```\n\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-tokens-7][0]]\"\n2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default]\n2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1]\n2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8]\n2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\" message=\"Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]]).\" previous.health=\"YELLOW\" reason=\"shards started [[.security-profile-8][0]]\"\n2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with \"saml\" provider succeeded (requires redirect: true). {\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\n2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local\n```","sha":"f1099028f7e4c613b792fdae881613a69711909f"}}]}] BACKPORT--> --------- Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
CAWilson94
pushed a commit
to CAWilson94/kibana
that referenced
this pull request
Jan 6, 2026
…rvers start (elastic#247630) Originally we added this code as part of `preCreateSecurityIndexesFixture` called in `globalSetupHook`. It automatically enforces `global.setup.ts` creation even if the hook has no tests-specific logic: file existence triggers the hook call. This PR moves the logic to server start assuming it is only needed for the local cluster and it should simplify Scout/Playwright hook logic and make hook optional as it was originally intended. From CI logs we can see indexes were created before Playwright tests were started: ``` 2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default] 2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]])." previous.health="YELLOW" reason="shards started [[.security-tokens-7][0]]" 2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default] 2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8] 2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]])." previous.health="YELLOW" reason="shards started [[.security-profile-8][0]]" 2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with "saml" provider succeeded (requires redirect: true). {"service":{"node":{"roles":["background_tasks","ui"]}}} 2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local ```
dej611
pushed a commit
to dej611/kibana
that referenced
this pull request
Jan 8, 2026
…rvers start (elastic#247630) Originally we added this code as part of `preCreateSecurityIndexesFixture` called in `globalSetupHook`. It automatically enforces `global.setup.ts` creation even if the hook has no tests-specific logic: file existence triggers the hook call. This PR moves the logic to server start assuming it is only needed for the local cluster and it should simplify Scout/Playwright hook logic and make hook optional as it was originally intended. From CI logs we can see indexes were created before Playwright tests were started: ``` 2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default] 2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]])." previous.health="YELLOW" reason="shards started [[.security-tokens-7][0]]" 2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default] 2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8] 2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]])." previous.health="YELLOW" reason="shards started [[.security-profile-8][0]]" 2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with "saml" provider succeeded (requires redirect: true). {"service":{"node":{"roles":["background_tasks","ui"]}}} 2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local ```
devamanv
pushed a commit
to devamanv/kibana
that referenced
this pull request
Jan 12, 2026
…rvers start (elastic#247630) Originally we added this code as part of `preCreateSecurityIndexesFixture` called in `globalSetupHook`. It automatically enforces `global.setup.ts` creation even if the hook has no tests-specific logic: file existence triggers the hook call. This PR moves the logic to server start assuming it is only needed for the local cluster and it should simplify Scout/Playwright hook logic and make hook optional as it was originally intended. From CI logs we can see indexes were created before Playwright tests were started: ``` 2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default] 2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]])." previous.health="YELLOW" reason="shards started [[.security-tokens-7][0]]" 2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default] 2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1] 2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8] 2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]])." previous.health="YELLOW" reason="shards started [[.security-profile-8][0]]" 2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with "saml" provider succeeded (requires redirect: true). {"service":{"node":{"roles":["background_tasks","ui"]}}} 2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Originally we added this code as part of
preCreateSecurityIndexesFixturecalled inglobalSetupHook.It automatically enforces
global.setup.tscreation even if the hook has no tests-specific logic: file existence triggers the hook call.This PR moves the logic to server start assuming it is only needed for the local cluster and it should simplify Scout/Playwright hook logic and make hook optional as it was originally intended.
From CI logs we can see indexes were created before Playwright tests were started: