[Entity Store] Make schema properties nullable#264509
Conversation
|
/flaky scoutConfig:x-pack/solutions/security/plugins/entity_store/test/scout/api/playwright.config.ts:30 |
Flaky Test Runner✅ Build triggered - kibana-flaky-test-suite-runner#11758
|
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#11758[❌] x-pack/solutions/security/plugins/entity_store/test/scout/api/playwright.config.ts: 28/30 tests passed. |
|
/flaky scoutConfig:x-pack/solutions/security/plugins/entity_store/test/scout/api/playwright.config.ts:30 |
Flaky Test Runner✅ Build triggered - kibana-flaky-test-suite-runner#11769
|
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#11769[❌] x-pack/solutions/security/plugins/entity_store/test/scout/api/playwright.config.ts: 28/30 tests passed. |
eb717be to
a35b9a7
Compare
|
/flaky scoutConfig:x-pack/solutions/security/plugins/entity_store/test/scout/api/playwright.config.ts:30 |
Flaky Test Runner✅ Build triggered - kibana-flaky-test-suite-runner#11772
|
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#11772[❌] x-pack/solutions/security/plugins/entity_store/test/scout/api/playwright.config.ts: 29/30 tests passed. |
a35b9a7 to
4a69d89
Compare
|
/flaky scoutConfig:x-pack/solutions/security/plugins/entity_store/test/scout/api/playwright.config.ts:30 |
Flaky Test Runner✅ Build triggered - kibana-flaky-test-suite-runner#11779
|
4a69d89 to
9ca5665
Compare
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#11779[❌] x-pack/solutions/security/plugins/entity_store/test/scout/api/playwright.config.ts: 28/30 tests passed. |
7371004 to
c43f925
Compare
1afb2cf to
a95b418
Compare
yes, but that that schema change is now reverted. thanks! |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
8351e52 to
a75d0a8
Compare
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
1 similar comment
✅ Actions performedFull review triggered. |
📝 WalkthroughWalkthroughEngine descriptor log-extraction fields are made explicitly nullable with default 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Actions performedFull review triggered. |
2 similar comments
✅ Actions performedFull review triggered. |
✅ Actions performedFull review triggered. |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
…tion_tests/ci_checks
✅ Actions performedFull review triggered. |
1 similar comment
✅ Actions performedFull review triggered. |
💛 Build succeeded, but was flaky
Failed CI Steps
Test Failures
Metrics [docs]
History
|
There was a problem hiding this comment.
♻️ Duplicate comments (1)
x-pack/solutions/security/plugins/entity_store/server/domain/saved_objects/engine_descriptor/types.ts (1)
246-253:⚠️ Potential issue | 🟠 MajorNormalize legacy empty-string
paginationIdduring the v5 backfill.Line 252 still preserves
''from the v2 migration (paginationId ?? ''), so preexisting descriptors will not actually move to the newnullsentinel after upgrading. That leaves migrated docs with mixed cursor semantics and can keep recovery logic on the legacy empty-string path.🐛 Proposed fix
- paginationId: logExtractionState?.paginationId ?? null, + paginationId: + logExtractionState?.paginationId === '' + ? null + : logExtractionState?.paginationId ?? null,🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@x-pack/solutions/security/plugins/entity_store/server/domain/saved_objects/engine_descriptor/types.ts` around lines 246 - 253, The backfillFn currently preserves the legacy empty-string sentinel for paginationId, so update the v5 backfill to normalize '' to null: inside backfillFn (and the logExtractionState handling) compute paginationId from document.attributes.logExtractionState and if it's exactly the empty string set it to null, otherwise keep its value or default to null; reference the backfillFn, logExtractionState, and paginationId identifiers when making this change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In
`@x-pack/solutions/security/plugins/entity_store/server/domain/saved_objects/engine_descriptor/types.ts`:
- Around line 246-253: The backfillFn currently preserves the legacy
empty-string sentinel for paginationId, so update the v5 backfill to normalize
'' to null: inside backfillFn (and the logExtractionState handling) compute
paginationId from document.attributes.logExtractionState and if it's exactly the
empty string set it to null, otherwise keep its value or default to null;
reference the backfillFn, logExtractionState, and paginationId identifiers when
making this change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: c10dabf1-4268-4604-a13e-48e38c2659bd
📒 Files selected for processing (8)
packages/kbn-check-saved-objects-cli/src/migrations/__fixtures__/entity-engine-descriptor-v2/10.5.0.jsonsrc/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.tsx-pack/solutions/security/plugins/entity_store/server/domain/logs_extraction/logs_extraction_client.test.tsx-pack/solutions/security/plugins/entity_store/server/domain/logs_extraction/logs_extraction_client.tsx-pack/solutions/security/plugins/entity_store/server/domain/saved_objects/engine_descriptor/constants.tsx-pack/solutions/security/plugins/entity_store/server/domain/saved_objects/engine_descriptor/index.tsx-pack/solutions/security/plugins/entity_store/server/domain/saved_objects/engine_descriptor/types.tsx-pack/solutions/security/plugins/entity_store/server/routes/apis/status.ts
|
Starting backport for target branches: 9.4 https://github.com/elastic/kibana/actions/runs/24958258962 |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `9.4`: - [[Entity Store] Make schema properties nullable (#264509)](#264509) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"orouz","email":"or.ouziel@elastic.co"},"sourceCommit":{"committedDate":"2026-04-26T13:51:50Z","message":"[Entity Store] Make schema properties nullable (#264509)","sha":"135ed57d5c599b12c2ac6c35cb5986be49b2dd05","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","Entity Store (Next)","Team:Core Analysis","v9.4.0","v9.5.0"],"title":"[Entity Store] Make schema properties nullable","number":264509,"url":"https://github.com/elastic/kibana/pull/264509","mergeCommit":{"message":"[Entity Store] Make schema properties nullable (#264509)","sha":"135ed57d5c599b12c2ac6c35cb5986be49b2dd05"}},"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/264509","number":264509,"mergeCommit":{"message":"[Entity Store] Make schema properties nullable (#264509)","sha":"135ed57d5c599b12c2ac6c35cb5986be49b2dd05"}}]}] BACKPORT--> Co-authored-by: orouz <or.ouziel@elastic.co>
reverts #263087, which fixed error clearing via read-modify-write (updateWith) - introduced a race condition causing flaky tests (diagnosed in #264303).
fix: make error (and logExtractionState fields) nullable and set them to null directly. works correctly with
mergeAttributes: true, which treatsundefinedas "leave unchanged" but does writesnullexplicitly3 flaky runs in this PR failed on unrelated tests. targeted flaky tests all passed: #264475, #264372, #264303, #264299