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

Fixed a bug impacting data filter configuration through the visual editor. #574

Merged
merged 4 commits into from
Jul 10, 2023

Conversation

AWSHurneyt
Copy link
Collaborator

@AWSHurneyt AWSHurneyt commented Jun 15, 2023

Description

  1. Fixed a bug impacting data filter configuration through the visual editor.
  2. Added integration test.
  3. Reduced cypress test flakiness.

Issues Resolved

  1. Bug issue [BUG] Cannot add data filter when creating monitor in alerting #558
  2. Flaky test tracking issue [BUG] Tracking issue for known flaky tests #415

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@AWSHurneyt
Copy link
Collaborator Author

Created a separate PR to resolve the unit test failure, as it seems unrelated to these changes.
#576

@AWSHurneyt AWSHurneyt mentioned this pull request Jun 15, 2023
5 tasks
@codecov
Copy link

codecov bot commented Jun 16, 2023

Codecov Report

Merging #574 (5d6da94) into main (353aa25) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #574   +/-   ##
=======================================
  Coverage   52.86%   52.86%           
=======================================
  Files         212      212           
  Lines        5594     5594           
  Branches      782      782           
=======================================
  Hits         2957     2957           
  Misses       2635     2635           
  Partials        2        2           

see 2 files with indirect coverage changes

@AWSHurneyt
Copy link
Collaborator Author

Created a separate PR to resolve the unit test failure, as it seems unrelated to these changes. #576

That PR was merged. Pulled those changes into the dev branch for this PR, and now the unit tests are passing.

@AWSHurneyt
Copy link
Collaborator Author

AWSHurneyt commented Jun 16, 2023

The cypress tests are expected to fail on main branch at the moment. They succeed locally, and in this dummy PR that runs the tests against the 2.x branch AWSHurneyt#11

…as flakiness didn't improve.

Signed-off-by: AWSHurneyt <[email protected]>
Copy link
Member

@getsaurabh02 getsaurabh02 left a comment

Choose a reason for hiding this comment

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

LGTM

@AWSHurneyt AWSHurneyt merged commit 18bdd05 into opensearch-project:main Jul 10, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 10, 2023
…itor. (#574)

* Reduced flakiness of query monitor cypress tests.

Signed-off-by: AWSHurneyt <[email protected]>

* Fixed a bug impacting data filter configuration through the visual editor. Added integration test.

Signed-off-by: AWSHurneyt <[email protected]>

* Removed some test refactoring that were intended to reduce flakiness as flakiness didn't improve.

Signed-off-by: AWSHurneyt <[email protected]>

---------

Signed-off-by: AWSHurneyt <[email protected]>
(cherry picked from commit 18bdd05)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 10, 2023
…itor. (#574)

* Reduced flakiness of query monitor cypress tests.

Signed-off-by: AWSHurneyt <[email protected]>

* Fixed a bug impacting data filter configuration through the visual editor. Added integration test.

Signed-off-by: AWSHurneyt <[email protected]>

* Removed some test refactoring that were intended to reduce flakiness as flakiness didn't improve.

Signed-off-by: AWSHurneyt <[email protected]>

---------

Signed-off-by: AWSHurneyt <[email protected]>
(cherry picked from commit 18bdd05)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 10, 2023
…itor. (#574)

* Reduced flakiness of query monitor cypress tests.

Signed-off-by: AWSHurneyt <[email protected]>

* Fixed a bug impacting data filter configuration through the visual editor. Added integration test.

Signed-off-by: AWSHurneyt <[email protected]>

* Removed some test refactoring that were intended to reduce flakiness as flakiness didn't improve.

Signed-off-by: AWSHurneyt <[email protected]>

---------

Signed-off-by: AWSHurneyt <[email protected]>
(cherry picked from commit 18bdd05)
bowenlan-amzn pushed a commit that referenced this pull request Jul 11, 2023
…itor. (#574) (#606)

* Reduced flakiness of query monitor cypress tests.

Signed-off-by: AWSHurneyt <[email protected]>

* Fixed a bug impacting data filter configuration through the visual editor. Added integration test.

Signed-off-by: AWSHurneyt <[email protected]>

* Removed some test refactoring that were intended to reduce flakiness as flakiness didn't improve.

Signed-off-by: AWSHurneyt <[email protected]>

---------

Signed-off-by: AWSHurneyt <[email protected]>
(cherry picked from commit 18bdd05)

Co-authored-by: AWSHurneyt <[email protected]>
AWSHurneyt added a commit that referenced this pull request Jul 12, 2023
…itor. (#574) (#607)

* Reduced flakiness of query monitor cypress tests.

Signed-off-by: AWSHurneyt <[email protected]>

* Fixed a bug impacting data filter configuration through the visual editor. Added integration test.

Signed-off-by: AWSHurneyt <[email protected]>

* Removed some test refactoring that were intended to reduce flakiness as flakiness didn't improve.

Signed-off-by: AWSHurneyt <[email protected]>

---------

Signed-off-by: AWSHurneyt <[email protected]>
(cherry picked from commit 18bdd05)

Co-authored-by: AWSHurneyt <[email protected]>
AWSHurneyt added a commit that referenced this pull request Jul 12, 2023
…itor. (#574) (#608)

* Reduced flakiness of query monitor cypress tests.

Signed-off-by: AWSHurneyt <[email protected]>

* Fixed a bug impacting data filter configuration through the visual editor. Added integration test.

Signed-off-by: AWSHurneyt <[email protected]>

* Removed some test refactoring that were intended to reduce flakiness as flakiness didn't improve.

Signed-off-by: AWSHurneyt <[email protected]>

---------

Signed-off-by: AWSHurneyt <[email protected]>
(cherry picked from commit 18bdd05)

Co-authored-by: AWSHurneyt <[email protected]>
@zakisaad
Copy link

Hello

This is impacting us on production: we cannot create new monitors (we are using Amazon OS version OpenSearch_2_7_R20230706). When could we expect this to be made available to upgrade to (I note your username has an AWS affilication, @AWSHurneyt - hope you have some insight).

@AWSHurneyt
Copy link
Collaborator Author

Hi @zakisaad ,
We don't have a scheduled date for 2.7 patch at the moment. This fix is present in OpenSearch 2.9.
https://opensearch.org/releases.html

As a workaround, data filters can be configured using the extraction query editor UI. Here's an example of what it would look like if you wanted to add products.product_id is 123 and user is steph filters to the opensearch_dashboards_sample_data_ecommerce index.

{
  "size": 0,
  "aggregations": {
    "composite_agg": {
      "composite": {
        "sources": [
          {
            "user": {
              "terms": {
                "field": "user"
              }
            }
          }
        ]
      },
      "aggs": {}
    }
  },
  "query": {
    "bool": {
      "filter": [
        {
          "range": {
            "order_date": {
              "gte": "{{period_end}}||-1h",
              "lte": "{{period_end}}",
              "format": "epoch_millis"
            }
          }
        },
        {
          "term": {
            "products.product_id": 123
          }
        },
        {
          "term": {
            "user": "steph"
          }
        }
      ]
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants