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

[TSVB] Replaces hardcoded ids with uuid #97423

Merged
merged 10 commits into from May 12, 2021

Conversation

stratoula
Copy link
Contributor

@stratoula stratoula commented Apr 19, 2021

Summary

Closes #96670.

It removes the hardcoded ids from TSVB and replaces them with uuid.

I have made some tests and I can't find any regression or any reason that we can't do it.

Example of a TSVB SO:

{
  "title": "TSVB with uuid",
  "type": "metrics",
  "aggs": [],
  "params": {
    "time_range_mode": "entire_time_range",
    "id": "b2ab15d7-b630-469d-a225-01a5e4540417",
    "type": "timeseries",
    "series": [
      {
        "id": "1e4ac859-b811-4082-9b15-85933fec6df4",
        "color": "#68BC00",
        "split_mode": "terms",
        "palette": {
          "type": "palette",
          "name": "default"
        },
        "metrics": [
          {
            "id": "e2ce6889-a2d3-4361-8d7b-ae478687b30c",
            "type": "count"
          }
        ],
        "separate_axis": 0,
        "axis_position": "right",
        "formatter": "number",
        "chart_type": "line",
        "line_width": 1,
        "point_size": 1,
        "fill": 0.5,
        "stacked": "none",
        "terms_field": "category.keyword"
      }
    ],
    "time_field": "order_date",
    "use_kibana_indexes": true,
    "interval": "",
    "axis_position": "left",
    "axis_formatter": "number",
    "axis_scale": "normal",
    "show_legend": 1,
    "show_grid": 1,
    "tooltip_mode": "show_all",
    "isModelInvalid": false,
    "index_pattern_ref_name": "metrics_0_index_pattern"
  }
}

@stratoula stratoula changed the title [TSVB] Replace hardcoded ids with uuid [TSVB] Replaces hardcoded ids with uuid Apr 19, 2021
@stratoula
Copy link
Contributor Author

stratoula commented Apr 19, 2021

@timroes @wylieconlon can you think of any reason that we can't replace these hardcoded ids?
I have already discussed it with @alexwizp and he also can't think of anything that blocks us from doing it.

@stratoula stratoula added Feature:TSVB TSVB (Time Series Visual Builder) release_note:enhancement labels Apr 19, 2021
Copy link
Contributor

@alexwizp alexwizp left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@wylieconlon wylieconlon left a comment

Choose a reason for hiding this comment

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

It looks like this was the only place in TSVB where we weren't using uuid? It seems safe in theory, I haven't run the code.

@@ -25,11 +25,11 @@ export const metricsVisDefinition = {
group: VisGroups.PROMOTED,
visConfig: {
defaults: {
id: '61ca57f0-469d-11e7-af02-69e470af7417',
id: uuid.v1(),
Copy link
Contributor

Choose a reason for hiding this comment

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

We have chosen to use import uuid from 'uuid/v4' in Lens because it's fully random: uuid v1 is not a random ID.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes Wylie, only here we are using hardcoded ids. Everywhere else we are using uuid.v1()
Nice feedback about v4, will use this instead 🙂

@stratoula stratoula marked this pull request as ready for review April 20, 2021 05:39
@stratoula stratoula requested a review from a team April 20, 2021 05:39
@stratoula stratoula added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Apr 20, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

This PR makes the problem much less severe, but it's still possible to end up with identical ids because uuid.v4() is only called once on Kibana client start. This means if a user creates multiple TSVB visualizations without reloading the page, they will end up with the same ids again.

If they reload the page, it will work as expected.

Leaving it up to you whether that's good enough.

@stratoula
Copy link
Contributor Author

Thanx Joe, no it is not, I will change the implementation. thanx for that 🙂

@stratoula stratoula changed the title [TSVB] Replaces hardcoded ids with uuid [WIP][TSVB] Replaces hardcoded ids with uuid Apr 21, 2021
@stratoula stratoula added v7.14.0 and removed v7.13.0 labels Apr 21, 2021
@@ -15,7 +15,6 @@ import { EditorController, TSVB_EDITOR_NAME } from './application/editor_control
import { createMetricsFn } from './metrics_fn';
import { metricsVisDefinition } from './metrics_type';
import {
setSavedObjectsClient,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Irrelevant with this PR but we dont use anywhere this setter/getter

@@ -17,10 +17,6 @@ export const [getFieldFormats, setFieldFormats] = createGetterSetter<
DataPublicPluginStart['fieldFormats']
>('FieldFormats');

export const [getSavedObjectsClient, setSavedObjectsClient] = createGetterSetter<SavedObjectsStart>(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same here

@stratoula stratoula changed the title [WIP][TSVB] Replaces hardcoded ids with uuid [TSVB] Replaces hardcoded ids with uuid May 6, 2021
@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula
Copy link
Contributor Author

@flash1293 it should be ok now!

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

I tested this PR the follwing way:

  • Create new dashboard
  • Add TSVB panel - save without changing anything
  • Add second TSVB panel - save again without changing anything
  • Hitting refresh

It would expect the requests sent by the panels to be different, but all ids are identical.

@stratoula
Copy link
Contributor Author

@flash1293 yes, I know about this case but it seems to be a very edge case. It happens because you don't change anything on the editor, so it initializes with the same id.
If you think is important I can check if we can also cover this scenario

@flash1293
Copy link
Contributor

flash1293 commented May 12, 2021

@stratoula Hm, I did the following now:

  • Create new dashboard
  • Add TSVB panel - change metric to avg of bytes and save
  • Add second TSVB panel - change metric to max of bytes and save
  • Hitting refresh

In the request to TSVB, the panel ids are different, but series ids and metric ids are still identical.

In the issue linked above it seems like these are the ones this is all about:

The slow log tracks the series id and the aggregation id. If these were uuids then we would've been able to pinpoint the exact visualization that's having issues, but since they're both using an id that's shared by all the time series visualizations we have this became a dead end.

I also checked the request sent to ES from TSVB and it does not include the panel id, but series and metric id.

panel 1:

[
  {
    "time_range_mode": "entire_time_range",
    "id": "0ee3ab0f-ffa4-4b82-8603-49a950e72219",
    "type": "timeseries",
    "series": [
      {
        "id": "c9cb55d7-3cee-40c5-a4a1-1ca6a70858e8",
        "color": "#68BC00",
        "split_mode": "everything",
        "palette": {
          "type": "palette",
          "name": "default"
        },
        "metrics": [
          {
            "id": "898b7371-ec19-4582-b391-c0d79cd40b93",
            "type": "avg",
            "field": "bytes"
          }
        ],
        "separate_axis": 0,
        "axis_position": "right",
        "formatter": "number",
        "chart_type": "line",
        "line_width": 1,
        "point_size": 1,
        "fill": 0.5,
        "stacked": "none",
        "label": "",
        "type": "timeseries"
      }
    ],
    "time_field": "",
    "index_pattern": "",
    "use_kibana_indexes": true,
    "interval": "",
    "axis_position": "left",
    "axis_formatter": "number",
    "axis_scale": "normal",
    "show_legend": 1,
    "show_grid": 1,
    "tooltip_mode": "show_all",
    "drop_last_bucket": 0
  }
]

panel 2:

[
  {
    "time_range_mode": "entire_time_range",
    "id": "39aee402-7da3-4a0f-85d6-e9b652aba45d",
    "type": "timeseries",
    "series": [
      {
        "id": "c9cb55d7-3cee-40c5-a4a1-1ca6a70858e8",
        "color": "#68BC00",
        "split_mode": "everything",
        "palette": {
          "type": "palette",
          "name": "default"
        },
        "metrics": [
          {
            "id": "898b7371-ec19-4582-b391-c0d79cd40b93",
            "type": "max",
            "field": "bytes"
          }
        ],
        "separate_axis": 0,
        "axis_position": "right",
        "formatter": "number",
        "chart_type": "line",
        "line_width": 1,
        "point_size": 1,
        "fill": 0.5,
        "stacked": "none",
        "label": "",
        "type": "timeseries"
      }
    ],
    "time_field": "",
    "index_pattern": "",
    "use_kibana_indexes": true,
    "interval": "",
    "axis_position": "left",
    "axis_formatter": "number",
    "axis_scale": "normal",
    "show_legend": 1,
    "show_grid": 1,
    "tooltip_mode": "show_all",
    "drop_last_bucket": 0
  }
]

requests:

[
  {
    "index": "kibana_sample_data_logs",
    "body": {
      "size": 0,
      "query": {
        "bool": {
          "must": [
            {
              "range": {
                "timestamp": {
                  "gte": "2021-05-11T08:57:24.680Z",
                  "lte": "2021-05-12T08:57:24.680Z",
                  "format": "strict_date_optional_time"
                }
              }
            }
          ],
          "filter": [
            {
              "match_all": {}
            }
          ],
          "should": [],
          "must_not": []
        }
      },
      "aggs": {
        "timeseries": {
          "date_histogram": {
            "field": "timestamp",
            "min_doc_count": 0,
            "time_zone": "Europe/Berlin",
            "extended_bounds": {
              "min": 1620723444680,
              "max": 1620809844680
            },
            "fixed_interval": "600s"
          },
          "aggs": {
            "898b7371-ec19-4582-b391-c0d79cd40b93": {
              "max": {
                "field": "bytes"
              }
            }
          },
          "meta": {
            "timeField": "timestamp",
            "intervalString": "600s",
            "bucketSize": 600,
            "seriesId": "c9cb55d7-3cee-40c5-a4a1-1ca6a70858e8",
            "index": "90943e30-9a47-11e8-b64d-95841ca0b247"
          }
        }
      },
      "runtime_mappings": {
        "hour_of_day": {
          "type": "long",
          "script": {
            "source": "emit(doc['timestamp'].value.getHour());"
          }
        }
      },
      "timeout": "30000ms"
    }
  }
]
[
  {
    "index": "kibana_sample_data_logs",
    "body": {
      "size": 0,
      "query": {
        "bool": {
          "must": [
            {
              "range": {
                "timestamp": {
                  "gte": "2021-05-11T08:57:24.680Z",
                  "lte": "2021-05-12T08:57:24.680Z",
                  "format": "strict_date_optional_time"
                }
              }
            }
          ],
          "filter": [
            {
              "match_all": {}
            }
          ],
          "should": [],
          "must_not": []
        }
      },
      "aggs": {
        "timeseries": {
          "date_histogram": {
            "field": "timestamp",
            "min_doc_count": 0,
            "time_zone": "Europe/Berlin",
            "extended_bounds": {
              "min": 1620723444680,
              "max": 1620809844680
            },
            "fixed_interval": "600s"
          },
          "aggs": {
            "898b7371-ec19-4582-b391-c0d79cd40b93": {
              "avg": {
                "field": "bytes"
              }
            }
          },
          "meta": {
            "timeField": "timestamp",
            "intervalString": "600s",
            "bucketSize": 600,
            "seriesId": "c9cb55d7-3cee-40c5-a4a1-1ca6a70858e8",
            "index": "90943e30-9a47-11e8-b64d-95841ca0b247"
          }
        }
      },
      "runtime_mappings": {
        "hour_of_day": {
          "type": "long",
          "script": {
            "source": "emit(doc['timestamp'].value.getHour());"
          }
        }
      },
      "timeout": "30000ms"
    }
  }
]

As a quick fix we might be able to add the panel id to the meta object, then it would be trackable by the slow query log.

@stratoula
Copy link
Contributor Author

Thank you Joe! I will try to add the panel id to meta.

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Tested the previous case and unique panelId is added to the request. This should be enough to cross-correlate with the problematic visualization by searching on the kibana index. LGTM

@stratoula
Copy link
Contributor Author

@flash1293 thank you a lot for your help with this issue ❤️

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / Chrome UI Functional Tests.test/functional/apps/visualize/input_control_vis/chained_controls·ts.visualize app input controls chained controls should filter child control options by parent control value

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 1 times on tracked branches: https://github.com/elastic/kibana/issues/96997

[00:00:00]       │
[00:00:00]         └-: visualize app
[00:00:00]           └-> "before all" hook in "visualize app"
[00:00:00]           └-> "before all" hook in "visualize app"
[00:00:00]             │ debg Starting visualize before method
[00:00:00]             │ info [logstash_functional] Loading "mappings.json"
[00:00:00]             │ info [logstash_functional] Loading "data.json.gz"
[00:00:00]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [logstash-2015.09.22] creating index, cause [api], templates [], shards [1]/[0]
[00:00:00]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.22][0]]])." previous.health="YELLOW" reason="shards started [[logstash-2015.09.22][0]]"
[00:00:00]             │ info [logstash_functional] Created index "logstash-2015.09.22"
[00:00:00]             │ debg [logstash_functional] "logstash-2015.09.22" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:00]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [logstash-2015.09.20] creating index, cause [api], templates [], shards [1]/[0]
[00:00:00]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.20][0]]])." previous.health="YELLOW" reason="shards started [[logstash-2015.09.20][0]]"
[00:00:00]             │ info [logstash_functional] Created index "logstash-2015.09.20"
[00:00:00]             │ debg [logstash_functional] "logstash-2015.09.20" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:00]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [logstash-2015.09.21] creating index, cause [api], templates [], shards [1]/[0]
[00:00:00]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.21][0]]])." previous.health="YELLOW" reason="shards started [[logstash-2015.09.21][0]]"
[00:00:00]             │ info [logstash_functional] Created index "logstash-2015.09.21"
[00:00:00]             │ debg [logstash_functional] "logstash-2015.09.21" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:10]             │ info progress: 9619
[00:00:13]             │ info [logstash_functional] Indexed 4633 docs into "logstash-2015.09.22"
[00:00:13]             │ info [logstash_functional] Indexed 4757 docs into "logstash-2015.09.20"
[00:00:13]             │ info [logstash_functional] Indexed 4614 docs into "logstash-2015.09.21"
[00:00:13]             │ info [long_window_logstash] Loading "mappings.json"
[00:00:13]             │ info [long_window_logstash] Loading "data.json.gz"
[00:00:13]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [long-window-logstash-0] creating index, cause [api], templates [], shards [1]/[0]
[00:00:13]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[long-window-logstash-0][0]]])." previous.health="YELLOW" reason="shards started [[long-window-logstash-0][0]]"
[00:00:13]             │ info [long_window_logstash] Created index "long-window-logstash-0"
[00:00:13]             │ debg [long_window_logstash] "long-window-logstash-0" settings {"index":{"analysis":{"analyzer":{"makelogs_url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:23]             │ info progress: 11359
[00:00:25]             │ info [long_window_logstash] Indexed 14005 docs into "long-window-logstash-0"
[00:00:26]             │ info [visualize] Loading "mappings.json"
[00:00:26]             │ info [visualize] Loading "data.json"
[00:00:26]             │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [.kibana_8.0.0_001/rI4KmXRMS42fj8yVf_7_bw] deleting index
[00:00:26]             │ info [visualize] Deleted existing index ".kibana_8.0.0_001"
[00:00:26]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [.kibana] creating index, cause [api], templates [], shards [1]/[1]
[00:00:26]             │ info [visualize] Created index ".kibana"
[00:00:26]             │ debg [visualize] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:00:26]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [.kibana/wY4yOz8OS-qVenf2QKORXg] update_mapping [_doc]
[00:00:26]             │ info [visualize] Indexed 13 docs into ".kibana"
[00:00:26]             │ debg Migrating saved objects
[00:00:26]             │ proc [kibana]   log   [14:53:33.039] [info][savedobjects-service] [.kibana] INIT -> LEGACY_SET_WRITE_BLOCK. took: 7ms.
[00:00:26]             │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] adding block write to indices [[.kibana/wY4yOz8OS-qVenf2QKORXg]]
[00:00:26]             │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] completed adding block write to indices [.kibana]
[00:00:26]             │ proc [kibana]   log   [14:53:33.109] [info][savedobjects-service] [.kibana] LEGACY_SET_WRITE_BLOCK -> LEGACY_CREATE_REINDEX_TARGET. took: 70ms.
[00:00:26]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [.kibana_pre6.5.0_001] creating index, cause [api], templates [], shards [1]/[1]
[00:00:26]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] updating number_of_replicas to [0] for indices [.kibana_pre6.5.0_001]
[00:00:26]             │ proc [kibana]   log   [14:53:33.182] [info][savedobjects-service] [.kibana] LEGACY_CREATE_REINDEX_TARGET -> LEGACY_REINDEX. took: 73ms.
[00:00:26]             │ proc [kibana]   log   [14:53:33.209] [info][savedobjects-service] [.kibana] LEGACY_REINDEX -> LEGACY_REINDEX_WAIT_FOR_TASK. took: 27ms.
[00:00:26]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [.tasks] creating index, cause [auto(bulk api)], templates [], shards [1]/[1]
[00:00:26]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] updating number_of_replicas to [0] for indices [.tasks]
[00:00:26]             │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] 1627 finished with response BulkByScrollResponse[took=89.2ms,timed_out=false,sliceId=null,updated=0,created=13,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:00:26]             │ proc [kibana]   log   [14:53:33.427] [info][savedobjects-service] [.kibana] LEGACY_REINDEX_WAIT_FOR_TASK -> LEGACY_DELETE. took: 218ms.
[00:00:26]             │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [.kibana/wY4yOz8OS-qVenf2QKORXg] deleting index
[00:00:27]             │ proc [kibana]   log   [14:53:33.467] [info][savedobjects-service] [.kibana] LEGACY_DELETE -> SET_SOURCE_WRITE_BLOCK. took: 40ms.
[00:00:27]             │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] adding block write to indices [[.kibana_pre6.5.0_001/CdBn1C8rQvWNxfT6Hys40A]]
[00:00:27]             │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] completed adding block write to indices [.kibana_pre6.5.0_001]
[00:00:27]             │ proc [kibana]   log   [14:53:33.516] [info][savedobjects-service] [.kibana] SET_SOURCE_WRITE_BLOCK -> CREATE_REINDEX_TEMP. took: 49ms.
[00:00:27]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [.kibana_8.0.0_reindex_temp] creating index, cause [api], templates [], shards [1]/[1]
[00:00:27]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] updating number_of_replicas to [0] for indices [.kibana_8.0.0_reindex_temp]
[00:00:27]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_8.0.0_reindex_temp][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_8.0.0_reindex_temp][0]]"
[00:00:27]             │ proc [kibana]   log   [14:53:33.581] [info][savedobjects-service] [.kibana] CREATE_REINDEX_TEMP -> REINDEX_SOURCE_TO_TEMP_OPEN_PIT. took: 65ms.
[00:00:27]             │ proc [kibana]   log   [14:53:33.595] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_OPEN_PIT -> REINDEX_SOURCE_TO_TEMP_READ. took: 14ms.
[00:00:27]             │ proc [kibana]   log   [14:53:33.618] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_INDEX. took: 23ms.
[00:00:27]             │ proc [kibana]   log   [14:53:33.641] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_INDEX -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 23ms.
[00:00:27]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [.kibana_8.0.0_reindex_temp/ambUY4iCQreDkggrSlz23w] update_mapping [_doc]
[00:00:27]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [.kibana_8.0.0_reindex_temp/ambUY4iCQreDkggrSlz23w] update_mapping [_doc]
[00:00:27]             │ proc [kibana]   log   [14:53:33.726] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_READ. took: 85ms.
[00:00:27]             │ proc [kibana]   log   [14:53:33.742] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_CLOSE_PIT. took: 16ms.
[00:00:27]             │ proc [kibana]   log   [14:53:33.757] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_CLOSE_PIT -> SET_TEMP_WRITE_BLOCK. took: 15ms.
[00:00:27]             │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] adding block write to indices [[.kibana_8.0.0_reindex_temp/ambUY4iCQreDkggrSlz23w]]
[00:00:27]             │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] completed adding block write to indices [.kibana_8.0.0_reindex_temp]
[00:00:27]             │ proc [kibana]   log   [14:53:33.813] [info][savedobjects-service] [.kibana] SET_TEMP_WRITE_BLOCK -> CLONE_TEMP_TO_TARGET. took: 56ms.
[00:00:27]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] applying create index request using existing index [.kibana_8.0.0_reindex_temp] metadata
[00:00:27]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [.kibana_8.0.0_001] creating index, cause [clone_index], templates [], shards [1]/[1]
[00:00:27]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] updating number_of_replicas to [0] for indices [.kibana_8.0.0_001]
[00:00:27]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [.kibana_8.0.0_001/pSfMG3KjTt6nXHkpmluhMg] create_mapping
[00:00:27]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_8.0.0_001][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_8.0.0_001][0]]"
[00:00:27]             │ proc [kibana]   log   [14:53:33.959] [info][savedobjects-service] [.kibana] CLONE_TEMP_TO_TARGET -> REFRESH_TARGET. took: 146ms.
[00:00:27]             │ proc [kibana]   log   [14:53:33.966] [info][savedobjects-service] [.kibana] REFRESH_TARGET -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 7ms.
[00:00:27]             │ proc [kibana]   log   [14:53:33.972] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_READ. took: 6ms.
[00:00:27]             │ proc [kibana]   log   [14:53:33.989] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_READ -> OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT. took: 17ms.
[00:00:27]             │ proc [kibana]   log   [14:53:33.995] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT -> UPDATE_TARGET_MAPPINGS. took: 6ms.
[00:00:27]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [.kibana_8.0.0_001/pSfMG3KjTt6nXHkpmluhMg] update_mapping [_doc]
[00:00:27]             │ proc [kibana]   log   [14:53:34.047] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK. took: 52ms.
[00:00:27]             │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] 1721 finished with response BulkByScrollResponse[took=91.6ms,timed_out=false,sliceId=null,updated=13,created=0,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:00:27]             │ proc [kibana]   log   [14:53:34.156] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> MARK_VERSION_INDEX_READY. took: 109ms.
[00:00:27]             │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [.kibana_8.0.0_reindex_temp/ambUY4iCQreDkggrSlz23w] deleting index
[00:00:27]             │ proc [kibana]   log   [14:53:34.195] [info][savedobjects-service] [.kibana] MARK_VERSION_INDEX_READY -> DONE. took: 39ms.
[00:00:27]             │ proc [kibana]   log   [14:53:34.196] [info][savedobjects-service] [.kibana] Migration completed after 1164ms
[00:00:27]             │ debg [visualize] Migrated Kibana index after loading Kibana data
[00:00:27]             │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC","visualization:visualize:legacyChartsLibrary":true}
[00:00:27]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [.kibana_8.0.0_001/pSfMG3KjTt6nXHkpmluhMg] update_mapping [_doc]
[00:00:29]             │ debg replacing kibana config doc: {"defaultIndex":"logstash-*","format:bytes:defaultPattern":"0,0.[000]b"}
[00:00:30]           └-: 
[00:00:30]             └-> "before all" hook in ""
[00:06:32]             └-: input controls
[00:06:32]               └-> "before all" hook in "input controls"
[00:08:18]               └-: chained controls
[00:08:18]                 └-> "before all" hook for "should disable child control when parent control is not set"
[00:08:18]                 └-> "before all" hook for "should disable child control when parent control is not set"
[00:08:18]                   │ debg navigating to visualize url: http://localhost:61211/app/visualize#/
[00:08:18]                   │ debg navigate to: http://localhost:61211/app/visualize#/
[00:08:18]                   │ debg browser[INFO] http://localhost:61211/app/visualize?_t=1620831684587#/ 340 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:08:18]                   │
[00:08:18]                   │ debg browser[INFO] http://localhost:61211/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:08:18]                   │ debg ... sleep(700) start
[00:08:18]                   │ debg ... sleep(700) end
[00:08:18]                   │ debg returned from get, calling refresh
[00:08:19]                   │ debg browser[INFO] http://localhost:61211/app/visualize?_t=1620831684587#/ 340 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:08:19]                   │
[00:08:19]                   │ debg browser[INFO] http://localhost:61211/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:08:20]                   │ debg currentUrl = http://localhost:61211/app/visualize#/
[00:08:20]                   │          appUrl = http://localhost:61211/app/visualize#/
[00:08:20]                   │ debg TestSubjects.find(kibanaChrome)
[00:08:20]                   │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:08:20]                   │ debg ... sleep(501) start
[00:08:20]                   │ debg ... sleep(501) end
[00:08:20]                   │ debg in navigateTo url = http://localhost:61211/app/visualize#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:08:20]                   │ debg TestSubjects.exists(statusPageContainer)
[00:08:20]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:08:23]                   │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:08:23]                   │ debg TestSubjects.click(visListingTitleLink-chained-input-control)
[00:08:23]                   │ debg Find.clickByCssSelector('[data-test-subj="visListingTitleLink-chained-input-control"]') with timeout=20000
[00:08:23]                   │ debg Find.findByCssSelector('[data-test-subj="visListingTitleLink-chained-input-control"]') with timeout=20000
[00:08:24]                   │ debg isGlobalLoadingIndicatorVisible
[00:08:24]                   │ debg TestSubjects.exists(globalLoadingIndicator)
[00:08:24]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:08:25]                   │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:08:26]                   │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:08:26]                   │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:08:26]                   │ debg TestSubjects.find(addFilter)
[00:08:26]                   │ debg Find.findByCssSelector('[data-test-subj="addFilter"]') with timeout=10000
[00:08:26]                 └-> should disable child control when parent control is not set
[00:08:26]                   └-> "before each" hook: global before each for "should disable child control when parent control is not set"
[00:08:26]                   │ debg comboBox.getOptionsList, comboBoxSelector: listControlSelect0
[00:08:26]                   │ debg TestSubjects.find(listControlSelect0)
[00:08:26]                   │ debg Find.findByCssSelector('[data-test-subj="listControlSelect0"]') with timeout=10000
[00:08:26]                   │ debg TestSubjects.click(listControlSelect0)
[00:08:26]                   │ debg Find.clickByCssSelector('[data-test-subj="listControlSelect0"]') with timeout=10000
[00:08:26]                   │ debg Find.findByCssSelector('[data-test-subj="listControlSelect0"]') with timeout=10000
[00:08:27]                   │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:08:27]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:08:27]                   │ debg TestSubjects.find(~comboBoxOptionsList)
[00:08:27]                   │ debg Find.findByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=10000
[00:08:27]                   │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:08:27]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:08:27]                   │ debg Find.findByCssSelector('[data-test-subj="inputControl1"] input') with timeout=10000
[00:08:27]                   └- ✓ pass  (1.4s) "visualize app  input controls chained controls should disable child control when parent control is not set"
[00:08:27]                 └-> should filter child control options by parent control value
[00:08:27]                   └-> "before each" hook: global before each for "should filter child control options by parent control value"
[00:08:27]                   │ debg comboBox.set, comboBoxSelector: listControlSelect0
[00:08:27]                   │ debg TestSubjects.find(listControlSelect0)
[00:08:27]                   │ debg Find.findByCssSelector('[data-test-subj="listControlSelect0"]') with timeout=10000
[00:08:27]                   │ debg comboBox.setElement, value: BR
[00:08:27]                   │ debg comboBox.isOptionSelected, value: BR
[00:08:30]                   │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:08:30]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:08:30]                   │ debg Find.allByCssSelector('.euiFilterSelectItem[title^="BR"]') with timeout=2500
[00:08:30]                   │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:08:30]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:08:30]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] [.async-search] creating index, cause [auto(bulk api)], templates [], shards [1]/[0]
[00:08:30]                   │ debg comboBox.getOptionsList, comboBoxSelector: listControlSelect1
[00:08:30]                   │ debg TestSubjects.find(listControlSelect1)
[00:08:30]                   │ debg Find.findByCssSelector('[data-test-subj="listControlSelect1"]') with timeout=10000
[00:08:30]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1620829924787625766] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.async-search][0]]])." previous.health="YELLOW" reason="shards started [[.async-search][0]]"
[00:08:31]                   │ debg TestSubjects.click(listControlSelect1)
[00:08:31]                   │ debg Find.clickByCssSelector('[data-test-subj="listControlSelect1"]') with timeout=10000
[00:08:31]                   │ debg Find.findByCssSelector('[data-test-subj="listControlSelect1"]') with timeout=10000
[00:08:33]                   │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:08:33]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:08:33]                   │ debg TestSubjects.find(~comboBoxOptionsList)
[00:08:33]                   │ debg Find.findByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=10000
[00:08:33]                   │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:08:33]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:08:33]                   │ info Taking screenshot "/dev/shm/workspace/parallel/21/kibana/test/functional/screenshots/failure/visualize app  input controls chained controls should filter child control options by parent control value.png"
[00:08:33]                   │ info Current URL is: http://localhost:61211/app/visualize#/edit/68305470-87bc-11e9-a991-3b492a7c3e09?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(filters:!(),linked:!f,query:(language:kuery,query:%27%27),uiState:(),vis:(aggs:!(),params:(controls:!((fieldName:geo.src,id:%271559757816862%27,indexPattern:%27logstash-*%27,label:%27%27,options:(dynamicOptions:!t,multiselect:!t,order:desc,size:5,type:terms),parent:%27%27,type:list),(fieldName:clientip,id:%271559757836347%27,indexPattern:%27logstash-*%27,label:%27%27,options:(dynamicOptions:!t,multiselect:!t,order:desc,size:5,type:terms),parent:%271559757816862%27,type:list)),pinFilters:!f,updateFiltersOnChange:!f,useTimeFilter:!f),title:%27chained%20input%20control%27,type:input_control_vis))
[00:08:33]                   │ info Saving page source to: /dev/shm/workspace/parallel/21/kibana/test/functional/failure_debug/html/visualize app  input controls chained controls should filter child control options by parent control value.html
[00:08:33]                   └- ✖ fail: visualize app  input controls chained controls should filter child control options by parent control value
[00:08:33]                   │      Error: expected '14.61.182.136,24.186.122.118,26.80.12.188,27.137.8.156,9.69.255.135' to equal '14.61.182.136,3.174.21.181,6.183.121.70,71.241.97.89,9.69.255.135'
[00:08:33]                   │       at Assertion.assert (node_modules/@kbn/expect/expect.js:100:11)
[00:08:33]                   │       at Assertion.equal (node_modules/@kbn/expect/expect.js:227:8)
[00:08:33]                   │       at Context.<anonymous> (test/functional/apps/visualize/input_control_vis/chained_controls.ts:44:61)
[00:08:33]                   │       at runMicrotasks (<anonymous>)
[00:08:33]                   │       at processTicksAndRejections (internal/process/task_queues.js:93:5)
[00:08:33]                   │       at Object.apply (node_modules/@kbn/test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)
[00:08:33]                   │ 
[00:08:33]                   │ 

Stack Trace

Error: expected '14.61.182.136,24.186.122.118,26.80.12.188,27.137.8.156,9.69.255.135' to equal '14.61.182.136,3.174.21.181,6.183.121.70,71.241.97.89,9.69.255.135'
    at Assertion.assert (node_modules/@kbn/expect/expect.js:100:11)
    at Assertion.equal (node_modules/@kbn/expect/expect.js:227:8)
    at Context.<anonymous> (test/functional/apps/visualize/input_control_vis/chained_controls.ts:44:61)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at Object.apply (node_modules/@kbn/test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
visTypeTimeseries 1.7MB 1.7MB -2.7KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
visTypeTimeseries 27.4KB 28.5KB +1.1KB
Unknown metric groups

References to deprecated APIs

id before after diff
globalSearch 4 2 -2
indexManagement 12 7 -5
infra 5 3 -2
licensing 18 15 -3
monitoring 109 56 -53
total -65

History

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

@stratoula stratoula merged commit dffa143 into elastic:master May 12, 2021
stratoula added a commit to stratoula/kibana that referenced this pull request May 12, 2021
* [TSVB] Replace hardcoded ids with uuid

* Use v4 instead

* Add id on the model initialization

* Change the id in case of new visualization

* Add paneld to the meta object

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
stratoula added a commit that referenced this pull request May 12, 2021
* [TSVB] Replace hardcoded ids with uuid

* Use v4 instead

* Add id on the model initialization

* Change the id in case of new visualization

* Add paneld to the meta object

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:TSVB TSVB (Time Series Visual Builder) release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timeseries visualizations, series and aggregations shouldn't use a hardcoded id
6 participants