Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Fix new job with must_not saved search #71831

Conversation

jgowdyelastic
Copy link
Member

@jgowdyelastic jgowdyelastic commented Jul 15, 2020

Corrects logic when saved search contains a not operator in the kuery string.
e.g. NOT airline : "AAL"

Fixes #68298

@jgowdyelastic jgowdyelastic marked this pull request as ready for review July 15, 2020 14:03
@jgowdyelastic jgowdyelastic requested a review from a team as a code owner July 15, 2020 14:03
@jgowdyelastic jgowdyelastic requested review from peteharverson, darnautov, walterra and qn895 and removed request for walterra July 15, 2020 14:03
@jgowdyelastic jgowdyelastic self-assigned this Jul 15, 2020
@jgowdyelastic jgowdyelastic added :ml bug Fixes for quality problems that affect the customer experience Feature:Anomaly Detection ML anomaly detection release_note:fix v7.9.0 v8.0.0 labels Jul 15, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@jgowdyelastic
Copy link
Member Author

@elasticmachine merge upstream

filter: [],
indexRefName: 'kibanaSavedObjectMeta.searchSourceJSON.index',
};
savedSearch.attributes.kibanaSavedObjectMeta.searchSourceJSON = JSON.stringify(searchSource);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as you mutate savedSearch in each test, it's better to initialize it in beforeEach callback to avoid potential issues

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed in 41db653

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and LGTM

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

miscellaneous assets size

id value diff baseline
ml 1.2MB +128.0B 1.2MB
upgradeAssistant 22.6KB -7.0B 22.6KB
total - +121.0B -

page load bundle size

id value diff baseline
ml 4.3MB +158.0B 4.3MB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qn895
Copy link
Member

qn895 commented Jul 15, 2020

Tested and LGTM.

@jgowdyelastic jgowdyelastic merged commit 84c9662 into elastic:master Jul 15, 2020
jgowdyelastic added a commit to jgowdyelastic/kibana that referenced this pull request Jul 15, 2020
* [ML] Fix new job with must_not saved search

* adding tests

* initialising saved search in beforeEach

* another commit for odd github issues

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@jgowdyelastic jgowdyelastic deleted the fix-new-job-with-must_not-saved-search branch July 15, 2020 21:19
jgowdyelastic added a commit to jgowdyelastic/kibana that referenced this pull request Jul 15, 2020
* [ML] Fix new job with must_not saved search

* adding tests

* initialising saved search in beforeEach

* another commit for odd github issues

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
jgowdyelastic added a commit that referenced this pull request Jul 16, 2020
* [ML] Fix new job with must_not saved search

* adding tests

* initialising saved search in beforeEach

* another commit for odd github issues

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
jgowdyelastic added a commit that referenced this pull request Jul 16, 2020
* [ML] Fix new job with must_not saved search

* adding tests

* initialising saved search in beforeEach

* another commit for odd github issues

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 16, 2020
* master: (37 commits)
  [Lens] Handle failing existence check (elastic#70718)
  [Security Solution]Fix in-app links and popup window text (elastic#71403)
  [esArchiver] automatically retry if alias creation fails (elastic#71910)
  Move data stream index pattern creation test to xpack (elastic#71511)
  [Maps] Improve language for mvt card (elastic#71947)
  [Security][Detections] Unskip failing modal tests (elastic#71969)
  skip flaky suite (elastic#71987)
  skip flaky suite (elastic#71979)
  [Security Solution] [Detections] Revert "[Security Solution] [Detections] Fixes bug for determining when we hit max signals after filtering with lists (elastic#71768)" (elastic#71956)
  rename ilm policy to remove -default (elastic#71952)
  Adjust ordering of Management category apps to make Ingest Manager higher (elastic#71948)
  skip flaky suite (elastic#71971)
  skip flaky suite (elastic#71951)
  [kbn/optimizer] ignore compressed files when reporting stats (elastic#71940)
  skip flaky suite (elastic#71867)
  [ML] Fix new job with must_not saved search (elastic#71831)
  [Resolver] Fix bug where process detail panel doesn't show up (elastic#71754)
  Cleanup (elastic#71849)
  [Resolver] aria-level and aria-flowto support enhancements (elastic#71887)
  skip flaky suite (elastic#71304)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 16, 2020
…feature-privileges

* alerting/consumer-based-rbac: (491 commits)
  [Lens] Handle failing existence check (elastic#70718)
  [Security Solution]Fix in-app links and popup window text (elastic#71403)
  [esArchiver] automatically retry if alias creation fails (elastic#71910)
  Move data stream index pattern creation test to xpack (elastic#71511)
  [Maps] Improve language for mvt card (elastic#71947)
  [Security][Detections] Unskip failing modal tests (elastic#71969)
  skip flaky suite (elastic#71987)
  skip flaky suite (elastic#71979)
  [Security Solution] [Detections] Revert "[Security Solution] [Detections] Fixes bug for determining when we hit max signals after filtering with lists (elastic#71768)" (elastic#71956)
  rename ilm policy to remove -default (elastic#71952)
  Adjust ordering of Management category apps to make Ingest Manager higher (elastic#71948)
  skip flaky suite (elastic#71971)
  skip flaky suite (elastic#71951)
  [kbn/optimizer] ignore compressed files when reporting stats (elastic#71940)
  skip flaky suite (elastic#71867)
  [ML] Fix new job with must_not saved search (elastic#71831)
  [Resolver] Fix bug where process detail panel doesn't show up (elastic#71754)
  Cleanup (elastic#71849)
  [Resolver] aria-level and aria-flowto support enhancements (elastic#71887)
  skip flaky suite (elastic#71304)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Anomaly Detection ML anomaly detection :ml release_note:fix v7.9.0 v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ML] Saved search using KQL with negation operator (NOT) returns a blank page on ML job creation
6 participants