Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
# Backport This will backport the following commits from `main` to `8.8`: - [[KQL] Fix node builder with empty array (#155901)](#155901) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Lukas Olson","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-04-27T18:28:12Z","message":"[KQL] Fix node builder with empty array (#155901)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/95657.\r\n\r\nUpdates the logic for `nodeBuilder` when passing an empty array to\r\n`nodeBuilder.and`/`nodeBuilder.or` to actually return a `KueryNode`\r\ninstead of `undefined`.\r\n\r\n### Checklist\r\n\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"654287b3adc928dd1582998504b7ed043259c3ae","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:KQL","release_note:skip","backport:skip","Team:DataDiscovery","v8.9.0"],"number":155901,"url":"https://github.com/elastic/kibana/pull/155901","mergeCommit":{"message":"[KQL] Fix node builder with empty array (#155901)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/95657.\r\n\r\nUpdates the logic for `nodeBuilder` when passing an empty array to\r\n`nodeBuilder.and`/`nodeBuilder.or` to actually return a `KueryNode`\r\ninstead of `undefined`.\r\n\r\n### Checklist\r\n\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"654287b3adc928dd1582998504b7ed043259c3ae"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155901","number":155901,"mergeCommit":{"message":"[KQL] Fix node builder with empty array (#155901)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/95657.\r\n\r\nUpdates the logic for `nodeBuilder` when passing an empty array to\r\n`nodeBuilder.and`/`nodeBuilder.or` to actually return a `KueryNode`\r\ninstead of `undefined`.\r\n\r\n### Checklist\r\n\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"654287b3adc928dd1582998504b7ed043259c3ae"}}]}] BACKPORT--> Co-authored-by: Lukas Olson <[email protected]>
- Loading branch information