Skip to content

Commit

Permalink
[8.x] [ML] AIOps: Fix and reenable functional tests for log rate anal…
Browse files Browse the repository at this point in the history
…ysis (#197760) (#197796)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] AIOps: Fix and reenable functional tests for log rate analysis
(#197760)](#197760)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Walter
Rafelsberger","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-25T10:18:24Z","message":"[ML]
AIOps: Fix and reenable functional tests for log rate analysis
(#197760)\n\n## Summary\r\n\r\nFollow up to #189863 and
#196585.\r\nRelated to #176387.\r\n\r\nThis updates asserting the url
state for log rate analysis with a query\r\nand reenables the functional
tests.\r\n\r\n### Checklist\r\n\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\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] This was checked for breaking
API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)","sha":"6ef03697460aba0d3774c0c03fb7fb58c76c00bd","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","release_note:skip","v9.0.0","Feature:ML/AIOps","v8.16.0","backport:version","v8.17.0"],"title":"[ML]
AIOps: Fix and reenable functional tests for log rate
analysis","number":197760,"url":"https://github.com/elastic/kibana/pull/197760","mergeCommit":{"message":"[ML]
AIOps: Fix and reenable functional tests for log rate analysis
(#197760)\n\n## Summary\r\n\r\nFollow up to #189863 and
#196585.\r\nRelated to #176387.\r\n\r\nThis updates asserting the url
state for log rate analysis with a query\r\nand reenables the functional
tests.\r\n\r\n### Checklist\r\n\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\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] This was checked for breaking
API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)","sha":"6ef03697460aba0d3774c0c03fb7fb58c76c00bd"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197760","number":197760,"mergeCommit":{"message":"[ML]
AIOps: Fix and reenable functional tests for log rate analysis
(#197760)\n\n## Summary\r\n\r\nFollow up to #189863 and
#196585.\r\nRelated to #176387.\r\n\r\nThis updates asserting the url
state for log rate analysis with a query\r\nand reenables the functional
tests.\r\n\r\n### Checklist\r\n\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\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] This was checked for breaking
API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)","sha":"6ef03697460aba0d3774c0c03fb7fb58c76c00bd"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Walter Rafelsberger <[email protected]>
  • Loading branch information
kibanamachine and walterra authored Oct 25, 2024
1 parent 5b591c4 commit b7ad3e2
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 102 deletions.
3 changes: 1 addition & 2 deletions x-pack/test/functional/apps/aiops/log_rate_analysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
}

// Failing: See https://github.com/elastic/kibana/issues/176387
describe.skip('log rate analysis', function () {
describe('log rate analysis', function () {
for (const testData of logRateAnalysisTestData) {
describe(`with '${testData.sourceIndexOrSavedSearch}'`, function () {
before(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,128 +64,134 @@ export const farequoteDataViewTestDataWithQuery: TestData = {
filters: [],
searchQuery: {
bool: {
filter: [],
must_not: [
filter: [
{
bool: {
minimum_should_match: 1,
should: [
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'SWR',
must_not: {
bool: {
minimum_should_match: 1,
should: [
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'SWR',
},
},
},
},
],
},
],
},
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'ACA',
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'ACA',
},
},
},
},
],
},
],
},
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'AWE',
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'AWE',
},
},
},
},
],
},
],
},
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'BAW',
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'BAW',
},
},
},
},
],
},
],
},
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'JAL',
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'JAL',
},
},
},
},
],
},
],
},
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'JBU',
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'JBU',
},
},
},
},
],
},
],
},
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'JZA',
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'JZA',
},
},
},
},
],
},
],
},
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'KLM',
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'KLM',
},
},
},
},
],
},
],
},
},
],
},
],
},
},
},
],
must: [],
must_not: [],
should: [],
},
},
searchQueryLanguage: 'kuery',
Expand Down

0 comments on commit b7ad3e2

Please sign in to comment.