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

Failing ES Promotion: test/functional/apps/getting_started/_shakespeare·js.Getting Started Shakespeare should configure Terms aggregation on play_name #82206

Closed
brianseeders opened this issue Oct 30, 2020 · 3 comments · Fixed by #89346
Labels
blocker failed-es-promotion failed-test A test failure on a tracked branch, potentially flaky-test skipped-test Team:QA Team label for QA Team v7.11.0 v8.0.0

Comments

@brianseeders
Copy link
Contributor

This failing test is preventing the promotion of a new 7.11 and master snapshot of ES.

[00:17:28]               └- ✖ fail: Getting Started  Shakespeare should configure Terms aggregation on play_name
[00:17:28]               │      retry.try timeout: Error: expected [ 65, 62, 55, 53, 51 ] to sort of equal [ 71, 65, 62, 55, 55 ]
[00:17:28]               │     at Assertion.assert (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:100:11)
[00:17:28]               │     at Assertion.eql (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:244:8)
[00:17:28]               │     at retry.try (/dev/shm/workspace/kibana/test/functional/apps/getting_started/_shakespeare.js:139:25)
[00:17:28]               │     at process._tickCallback (internal/process/next_tick.js:68:7)

See https://kibana-ci.elastic.co/job/elasticsearch+snapshots+verify/1687/testReport/junit/Chrome%20UI%20Functional%20Tests/test_functional_apps_getting_started__shakespeare%C2%B7js/Kibana_Pipeline___kibana_oss_agent___Getting_Started__Shakespeare_should_configure_Terms_aggregation_on_play_name/

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-qa (Team:QA)

@brianseeders brianseeders added skipped-test failed-test A test failure on a tracked branch, potentially flaky-test labels Oct 30, 2020
gmmorris added a commit to gmmorris/kibana that referenced this issue Nov 2, 2020
* master:
  Add derivative function (elastic#81178)
  [Discover] Deangularize context_app.html, part 3 (elastic#81838)
  [Visualize] Vis listing page breaks on unknown vis type (elastic#82018)
  Rename `batchSize` parameter to `batch_size` to be consisten with the API namings guidelines. (elastic#82123)
  Minor edits in Single Metric Viewer (elastic#82159)
  [Actions] Fix type contract (elastic#82168)
  Upgrade EUI to v30.1.1 (elastic#81499)
  Skip failing ES snapshot test (elastic#82207)
  Skip ES snapshot failing suite (elastic#82206)
  [Alerting UI] Grouped list of alert types using producers in Types filter of Alerts tab (elastic#81876)
  [Maps] convert vector style component to typescript round 1 (elastic#81961)
  Fix link to upgrade assistant (elastic#82138)
  Rename "service overview" to "service inventory" (elastic#81933)
  adjust policy test to drop test for server addresses (elastic#82120)
  Cleanup/codeowners (elastic#82146)
  [DOCS] Updates add data content (elastic#81093)
  [DOCS] Remove index mgmt docs (elastic#82099)
  [Search] fix cancelation related memory leaks (elastic#81996)
phillipb added a commit to phillipb/kibana that referenced this issue Nov 2, 2020
…e-details-overlay

* 'master' of github.com:elastic/kibana: (72 commits)
  [CCR] Update README.md on how to start 2 clusters for testing (elastic#81487)
  [APM] Scale transaction rate correctly (elastic#82155)
  Upgrade to hapi version 18 (elastic#80468)
  [Uptime] Remove custom handling of license enabling (elastic#82019)
  [Telemetry] Remove `from` and `to` timestamps from usage stats APIs (elastic#81579)
  Enable send to background in Vega (elastic#82229)
  Enable send to background in Timelion (elastic#82232)
  [Actions & Connectors] removes Connector flyouts after usage (elastic#82126)
  Add derivative function (elastic#81178)
  [Discover] Deangularize context_app.html, part 3 (elastic#81838)
  [Visualize] Vis listing page breaks on unknown vis type (elastic#82018)
  Rename `batchSize` parameter to `batch_size` to be consisten with the API namings guidelines. (elastic#82123)
  Minor edits in Single Metric Viewer (elastic#82159)
  [Actions] Fix type contract (elastic#82168)
  Upgrade EUI to v30.1.1 (elastic#81499)
  Skip failing ES snapshot test (elastic#82207)
  Skip ES snapshot failing suite (elastic#82206)
  [Alerting UI] Grouped list of alert types using producers in Types filter of Alerts tab (elastic#81876)
  [Maps] convert vector style component to typescript round 1 (elastic#81961)
  Fix link to upgrade assistant (elastic#82138)
  ...
@LeeDr
Copy link

LeeDr commented Jan 20, 2021

This seems like an actual Elasticsearch bug to me. Either that or there's something wrong with our query.

The play_name in this data which has the expected unique count of 71 is Richard III. It should be the first bar in this vertical bar graph but doesn't appear in the results at all until I change the terms agg size up to 12 (from the default of 5).

When the size for the terms agg is less than 12, the largest value that appears is Henry VI Part 2 with the value of 65 as shown in the error when the test fails. I pinged the Elasticsearch team and I'll wait to see their response before filing an issue and I'll reference it here.

The next largest is 62, then 55 which tracks the offset in the expected values. But there's more differences after that.

As another experiment I used size: 2 and size: 1 and also got very confusing results.

Here's the first request (copied from the visualization Inspect menu) with size: 2;

{
  "aggs": {
    "2": {
      "terms": {
        "field": "play_name",
        "order": {
          "1": "desc"
        },
        "size": 2
      },
      "aggs": {
        "1": {
          "cardinality": {
            "field": "speaker"
          }
        }
      }
    }
  },
  "size": 0,
  "fields": [],
  "script_fields": {},
  "stored_fields": [
    "*"
  ],
  "_source": {
    "excludes": []
  },
  "query": {
    "bool": {
      "must": [],
      "filter": [
        {
          "match_all": {}
        }
      ],
      "should": [],
      "must_not": []
    }
  }
}

The response when `size: 2` is "Henry VI Part 2" with 65, and "Coriolanus" with 62
{
  "took": 4,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": 111396,
    "max_score": null,
    "hits": []
  },
  "aggregations": {
    "2": {
      "doc_count_error_upper_bound": -1,
      "sum_other_doc_count": 104070, << this seems wrong. There are 111,396 docs (107404 + 3992)
      "buckets": [
        {
          "1": {
            "value": 65
          },
          "key": "Henry VI Part 2",
          "doc_count": 3334
        },
        {
          "1": {
            "value": 62
          },
          "key": "Coriolanus",
          "doc_count": 3992
        }
      ]
    }
  }
}

Changed to only get size: 1

{
  "aggs": {
    "2": {
      "terms": {
        "field": "play_name",
        "order": {
          "1": "desc"
        },
        "size": 1
      },
      "aggs": {
        "1": {
          "cardinality": {
            "field": "speaker"
          }
        }
      }
    }
  },
  "size": 0,
  "fields": [],
  "script_fields": {},
  "stored_fields": [
    "*"
  ],
  "_source": {
    "excludes": []
  },
  "query": {
    "bool": {
      "must": [],
      "filter": [
        {
          "match_all": {}
        }
      ],
      "should": [],
      "must_not": []
    }
  }
}

The response when size: 1 should show "Henry VI Part 2" with 65, but instead shows "Coriolanus" with 62
(and in fact, it should show Richard III with 71)

{
  "took": 3,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": 111396,
    "max_score": null,
    "hits": []
  },
  "aggregations": {
    "2": {
      "doc_count_error_upper_bound": -1,
      "sum_other_doc_count": 107404, << There are 111,396 docs (107404 + 3992)
      "buckets": [
        {
          "1": {
            "value": 62
          },
          "key": "Coriolanus",
          "doc_count": 3992
        }
      ]
    }
  }
}

@LeeDr
Copy link

LeeDr commented Jan 21, 2021

Elasticsearch team has a PR for a fix. Once it's merged I'll unskip this Kibana test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker failed-es-promotion failed-test A test failure on a tracked branch, potentially flaky-test skipped-test Team:QA Team label for QA Team v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants