init on install#263732
Conversation
Catch flakiness early (recommended)Recommended before merge: run the flaky test runner against this PR to catch flakiness early. Trigger a run with the Flaky Test Runner UI or post this comment on the PR: This check is experimental. Share your feedback in the #appex-qa channel. Posted via Macroscope — Flaky Test Runner nudge |
There was a problem hiding this comment.
Scout Test Review
🔴 Blocker
apiTest.only left in committed code — this will skip every other test in the suite when the file runs.
Posted via Macroscope — Scout Test Review
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
If we are in a non default space and entity store is running, we'll not init the entity maintainers framework in case of a new maintainer was introduced.
✅ Actions performedFull review triggered. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe changes refactor Entity Store V2 installation to shift entity maintainers initialization from the client-side hook to the server-side install route handler. The ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
✅ Actions performedFull review triggered. |
…aintainer After PR #263732 (init on install), entity maintainers are initialized during the Entity Store install flow. The CSV upload test relied on maintainers not being initialized, causing a race condition where the automated-resolution maintainer links entities before the test can assert. Stop the maintainer explicitly in the before hook with a try/catch for backward compatibility.
There was a problem hiding this comment.
👍 Positive reinforcement — The new maintainers verification block in the install happy-path test is well-structured: it validates the response body (not just the status code), reuses INTERNAL_HEADERS and ENTITY_STORE_ROUTES from the shared constants file, and properly types the response. The apiTest.only blocker from the prior review has been fixed. Nice work!
Posted via Macroscope — Scout Test Review
| const uninstall = await apiClient.post(ENTITY_STORE_ROUTES.public.UNINSTALL, { | ||
| headers: defaultHeaders, |
There was a problem hiding this comment.
⚪ Nit — Validate the response body
expect(maintainers.every(…)).toBe(true) reduces the whole array to a single boolean, so a failure says "expected false to be true" with no indication of which maintainer has a wrong status. Asserting per-element gives a much better diagnostic:
| const uninstall = await apiClient.post(ENTITY_STORE_ROUTES.public.UNINSTALL, { | |
| headers: defaultHeaders, | |
| expect(maintainers.length).toBeGreaterThan(0); | |
| for (const m of maintainers) { | |
| expect(m.taskStatus).toBe('started'); | |
| } |
Posted via Macroscope — Scout Test Review
⏳ Build in-progress, with failures
Failed CI StepsHistory
cc @chennn1990 |
ymao1
left a comment
There was a problem hiding this comment.
Entity analytics changes LGTM. Code review of test changes only. Could we run the flaky test runner on these tests?
|
Starting backport for target branches: 9.4 https://github.com/elastic/kibana/actions/runs/24631353870 |
@ymao1 yes, green run |
Install now runs entity maintainer initialization whenever a real install happens (assetManager.init followed by entityMaintainersClient.init), so maintainer tasks are scheduled as part of the install path instead of only via a separate init call. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit ed3bbba)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
* main: (114 commits) Fix observability_ai_assistant_tool_call EBT error when connector is an inference endpoint (elastic#263334) init on install (elastic#263732) [One Workflow] fail-fast TaskRecovery for interrupted runs (elastic#261275) [Entity Store] Reset state error after successful task run (elastic#263087) [api-docs] 2026-04-19 Daily api_docs build (elastic#264280) [UII] Fix integration card row height calculation (elastic#264212) [scout] migrate FTR logstash api tests (elastic#262953) [StorageIndexAdapter] Set auto_expand_replicas to fix yellow health on single-node ES clusters (elastic#263096) [api-docs] 2026-04-18 Daily api_docs build (elastic#264260) [Scout] Update test config manifests (elastic#264257) [Security Solution][Detection Engine] enables AI rule creation feature flag (elastic#264036) [dashboards as code] only validate id on PUT route when creating new dashboard (elastic#264161) chore(NA): bump version to 9.5.0 (elastic#262165) skip failing test suite (elastic#263649) skip failing test suite (elastic#264236) [Discover] Convert remaining Enzyme tests to RTL (elastic#259676) auto-implement: Labels in model endpoints table of the model details flyout look misaligned (elastic#263770) [ci] Promote ES docker image after verification (elastic#263890) [Observability:Onboarding] Remove suppress global announcements that was breaking ensemble tests (elastic#264169) [Cases][AttachmentV2] Migrate persistable state part 2 - ML and AIOps charts (elastic#262597) ...
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
1 similar comment
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
# Backport This will backport the following commits from `main` to `9.4`: - [init on install (#263732)](#263732) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Chen Ashuri","email":"chen.ashuri@elastic.co"},"sourceCommit":{"committedDate":"2026-04-19T14:27:02Z","message":"init on install (#263732)\n\nInstall now runs entity maintainer initialization whenever a real\ninstall happens (assetManager.init followed by\nentityMaintainersClient.init), so maintainer tasks are scheduled as part\nof the install path instead of only via a separate init call.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"ed3bbba673cb691766464f9c6965e8a55ffe1a2b","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.4.0","v9.5.0"],"title":"init on install","number":263732,"url":"https://github.com/elastic/kibana/pull/263732","mergeCommit":{"message":"init on install (#263732)\n\nInstall now runs entity maintainer initialization whenever a real\ninstall happens (assetManager.init followed by\nentityMaintainersClient.init), so maintainer tasks are scheduled as part\nof the install path instead of only via a separate init call.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"ed3bbba673cb691766464f9c6965e8a55ffe1a2b"}},"sourceBranch":"main","suggestedTargetBranches":["9.4"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/263732","number":263732,"mergeCommit":{"message":"init on install (#263732)\n\nInstall now runs entity maintainer initialization whenever a real\ninstall happens (assetManager.init followed by\nentityMaintainersClient.init), so maintainer tasks are scheduled as part\nof the install path instead of only via a separate init call.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"ed3bbba673cb691766464f9c6965e8a55ffe1a2b"}}]}] BACKPORT--> Co-authored-by: Chen Ashuri <chen.ashuri@elastic.co>
Install now runs entity maintainer initialization whenever a real install happens (assetManager.init followed by entityMaintainersClient.init), so maintainer tasks are scheduled as part of the install path instead of only via a separate init call.