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

Visualize date histogram incorrectly set for Rollup-based visualization, causing it to fail #36295

Closed
cjcenizal opened this issue May 8, 2019 · 7 comments · Fixed by #39537
Closed
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Rollups Feature:Visualizations Generic visualization features (in case no more specific feature label is available) Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@cjcenizal
Copy link
Contributor

This bug exists on master, possibly on older release branches too.

To reproduce:

  1. Add sample data and create a rollup job with this config:
PUT _rollup/job/test
{
    "index_pattern": "k*",
    "rollup_index": "test",
    "cron": "0 * * * * ?",
    "page_size" :1000,
    "groups" : {
      "date_histogram": {
        "fixed_interval": "24h",
        "field": "order_date",
        "time_zone": "UTC"
      }
    }
}
  1. Create an index pattern and a visualization. Use a date histogram visualization with a 24h interval and a time range of several days, per this screenshot:

image

The request will fail. Notice that the date_histogram aggregation we're sending with the request has an interval of 3h, not the 24h we specified.

If we manually fix this by setting it to 24h and send the request in Console, the request succeeds:

GET test3/_rollup_search
{
  "size":0,
  "aggregations":{
    "2":{
      "date_histogram":{
        "field":"order_date",
        "interval":"30s",
        "time_zone":"UTC",
        "min_doc_count":1
      }
    }
  },
  "query":{
    "bool":{
      "must":[
        {
          "range":{
            "order_date":{
              "format":"strict_date_optional_time",
              "gte":"2019-05-03T18:37:32.779Z",
              "lte":"2019-05-08T18:52:32.779Z"
            }
          }
        }
      ],
      "filter":[
        {
          "match_all":{

          }
        }
      ],
      "should":[

      ],
      "must_not":[

      ]
    }
  }
}
@cjcenizal cjcenizal added bug Fixes for quality problems that affect the customer experience Feature:Visualizations Generic visualization features (in case no more specific feature label is available) Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Rollups labels May 8, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@cjcenizal
Copy link
Contributor Author

This seems related to #34690

@cjcenizal
Copy link
Contributor Author

This was fixed in TSVB by #36081.

@wylieconlon
Copy link
Contributor

I've found the source of the bug. It's unrelated to #34690, although that is also happening at the same time. I'll have a PR up soon that fixes the issue.

@wylieconlon
Copy link
Contributor

@cjcenizal Is this a bug in 7.2 as well? The current plan is to backport to 7.3

@cjcenizal
Copy link
Contributor Author

@wylieconlon
Copy link
Contributor

@cjcenizal I can confirm that this is a bug in 7.2 as well.

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:Rollups Feature:Visualizations Generic visualization features (in case no more specific feature label is available) Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants