elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.78k stars 8.18k forks source link

7.17 forward compatibility test failures #137210

Closed suchcodemuchwow closed 1 year ago

suchcodemuchwow commented 2 years ago

Following test has been failed on CI as part of the forward compatibility tests. We are not skipping this for a while but it's quite important to resolve the issue 😇


Error: expect(received).toMatchSnapshot()

Snapshot name: `Reporting APIs CSV Generation from SearchSource Exports CSV with almost all fields when using fieldsFromSource (ES 8) 1`

- Snapshot  - 5
+ Received  + 5

- _id,_index,_score,_type,category,currency,customer_first_name,customer_full_name,customer_gender,customer_id,customer_last_name,customer_phone,day_of_week,day_of_week_i,email,geoip,manufacturer,order_date,order_id,products,products.created_on,sku,taxful_total_price,taxless_total_price,total_quantity,total_unique_products,type,user
+ _id,_index,_score,_type,category,currency,customer_first_name,customer_full_name,customer_gender,customer_id,customer_last_name,customer_phone,day_of_week,day_of_week_i,email,geoip.city_name,geoip.continent_name,geoip.country_iso_code,geoip.location,geoip.region_name,manufacturer,order_date,order_id,products,products.created_on,sku,taxful_total_price,taxless_total_price,total_quantity,total_unique_products,type,user
- 9AMtOW0BH63Xcmy432DJ,ecommerce,-,-,Men's Clothing,EUR,Boris,Boris Bradley,MALE,36,Bradley,-,Wednesday,2,boris@bradley-family.zzz,{"continent_name":"Europe","country_iso_code":"GB","location":{"lat":51.5,"lon":-0.1}},Microlutions, Elitelligence,Jun 25, 2019 @ 00:00:00.000,568397,{"_id":"sold_product_568397_24419","base_price":32.99,"base_unit_price":32.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Microlutions","min_price":17.48,"price":32.99,"product_id":24419,"product_name":"Cargo trousers - oliv","quantity":1,"sku":"ZO0112101121","tax_amount":0,"taxful_price":32.99,"taxless_price":32.99,"unit_discount_amount":0}, {"_id":"sold_product_568397_20207","base_price":28.99,"base_unit_price":28.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Elitelligence","min_price":13.92,"price":28.99,"product_id":20207,"product_name":"Trousers - black","quantity":1,"sku":"ZO0530405304","tax_amount":0,"taxful_price":28.99,"taxless_price":28.99,"unit_discount_amount":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0112101121, ZO0530405304,61.98,61.98,2,2,order,boris
+ 9AMtOW0BH63Xcmy432DJ,ecommerce,-,-,Men's Clothing,EUR,Boris,Boris Bradley,MALE,36,Bradley,-,Wednesday,2,boris@bradley-family.zzz,-,Europe,GB,{"lat":51.5,"lon":-0.1},-,Microlutions, Elitelligence,Jun 25, 2019 @ 00:00:00.000,568397,{"_id":"sold_product_568397_24419","base_price":32.99,"base_unit_price":32.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Microlutions","min_price":17.48,"price":32.99,"product_id":24419,"product_name":"Cargo trousers - oliv","quantity":1,"sku":"ZO0112101121","tax_amount":0,"taxful_price":32.99,"taxless_price":32.99,"unit_discount_amount":0}, {"_id":"sold_product_568397_20207","base_price":28.99,"base_unit_price":28.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Elitelligence","min_price":13.92,"price":28.99,"product_id":20207,"product_name":"Trousers - black","quantity":1,"sku":"ZO0530405304","tax_amount":0,"taxful_price":28.99,"taxless_price":28.99,"unit_discount_amount":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0112101121, ZO0530405304,61.98,61.98,2,2,order,boris
- 9QMtOW0BH63Xcmy432DJ,ecommerce,-,-,Men's Clothing,EUR,Oliver,Oliver Hubbard,MALE,7,Hubbard,-,Wednesday,2,oliver@hubbard-family.zzz,{"continent_name":"Europe","country_iso_code":"GB","location":{"lat":51.5,"lon":-0.1}},Spritechnologies, Microlutions,Jun 25, 2019 @ 00:00:00.000,568044,{"_id":"sold_product_568044_12799","base_price":14.99,"base_unit_price":14.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Spritechnologies","min_price":6.9,"price":14.99,"product_id":12799,"product_name":"Undershirt - dark grey multicolor","quantity":1,"sku":"ZO0630406304","tax_amount":0,"taxful_price":14.99,"taxless_price":14.99,"unit_discount_amount":0}, {"_id":"sold_product_568044_18008","base_price":16.99,"base_unit_price":16.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Microlutions","min_price":8.83,"price":16.99,"product_id":18008,"product_name":"Long sleeved top - purple","quantity":1,"sku":"ZO0120201202","tax_amount":0,"taxful_price":16.99,"taxless_price":16.99,"unit_discount_amount":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0630406304, ZO0120201202,31.98,31.98,2,2,order,oliver
+ 9QMtOW0BH63Xcmy432DJ,ecommerce,-,-,Men's Clothing,EUR,Oliver,Oliver Hubbard,MALE,7,Hubbard,-,Wednesday,2,oliver@hubbard-family.zzz,-,Europe,GB,{"lat":51.5,"lon":-0.1},-,Spritechnologies, Microlutions,Jun 25, 2019 @ 00:00:00.000,568044,{"_id":"sold_product_568044_12799","base_price":14.99,"base_unit_price":14.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Spritechnologies","min_price":6.9,"price":14.99,"product_id":12799,"product_name":"Undershirt - dark grey multicolor","quantity":1,"sku":"ZO0630406304","tax_amount":0,"taxful_price":14.99,"taxless_price":14.99,"unit_discount_amount":0}, {"_id":"sold_product_568044_18008","base_price":16.99,"base_unit_price":16.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Microlutions","min_price":8.83,"price":16.99,"product_id":18008,"product_name":"Long sleeved top - purple","quantity":1,"sku":"ZO0120201202","tax_amount":0,"taxful_price":16.99,"taxless_price":16.99,"unit_discount_amount":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0630406304, ZO0120201202,31.98,31.98,2,2,order,oliver
- OAMtOW0BH63Xcmy432HJ,ecommerce,-,-,Women's Accessories,EUR,Betty,Betty Reese,FEMALE,44,Reese,-,Wednesday,2,betty@reese-family.zzz,{"city_name":"New York","continent_name":"North America","country_iso_code":"US","location":{"lat":40.7,"lon":-74},"region_name":"New York"},Pyramidustries,Jun 25, 2019 @ 00:00:00.000,568229,{"_id":"sold_product_568229_24991","base_price":11.99,"base_unit_price":11.99,"category":"Women's Accessories","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Pyramidustries","min_price":6.35,"price":11.99,"product_id":24991,"product_name":"Scarf - rose/white","quantity":1,"sku":"ZO0192201922","tax_amount":0,"taxful_price":11.99,"taxless_price":11.99,"unit_discount_amount":0}, {"_id":"sold_product_568229_12039","base_price":10.99,"base_unit_price":10.99,"category":"Women's Accessories","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Pyramidustries","min_price":5.82,"price":10.99,"product_id":12039,"product_name":"Scarf - nude/black/turquoise","quantity":1,"sku":"ZO0192801928","tax_amount":0,"taxful_price":10.99,"taxless_price":10.99,"unit_discount_amount":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0192201922, ZO0192801928,22.98,22.98,2,2,order,betty
+ OAMtOW0BH63Xcmy432HJ,ecommerce,-,-,Women's Accessories,EUR,Betty,Betty Reese,FEMALE,44,Reese,-,Wednesday,2,betty@reese-family.zzz,New York,North America,US,{"lat":40.7,"lon":-74},New York,Pyramidustries,Jun 25, 2019 @ 00:00:00.000,568229,{"_id":"sold_product_568229_24991","base_price":11.99,"base_unit_price":11.99,"category":"Women's Accessories","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Pyramidustries","min_price":6.35,"price":11.99,"product_id":24991,"product_name":"Scarf - rose/white","quantity":1,"sku":"ZO0192201922","tax_amount":0,"taxful_price":11.99,"taxless_price":11.99,"unit_discount_amount":0}, {"_id":"sold_product_568229_12039","base_price":10.99,"base_unit_price":10.99,"category":"Women's Accessories","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Pyramidustries","min_price":5.82,"price":10.99,"product_id":12039,"product_name":"Scarf - nude/black/turquoise","quantity":1,"sku":"ZO0192801928","tax_amount":0,"taxful_price":10.99,"taxless_price":10.99,"unit_discount_amount":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0192201922, ZO0192801928,22.98,22.98,2,2,order,betty
- OQMtOW0BH63Xcmy432HJ,ecommerce,-,-,Men's Clothing, Men's Accessories,EUR,Recip,Recip Salazar,MALE,10,Salazar,-,Wednesday,2,recip@salazar-family.zzz,{"city_name":"Istanbul","continent_name":"Asia","country_iso_code":"TR","location":{"lat":41,"lon":29},"region_name":"Istanbul"},Elitelligence,Jun 25, 2019 @ 00:00:00.000,568292,{"_id":"sold_product_568292_23627","base_price":24.99,"base_unit_price":24.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Elitelligence","min_price":12.49,"price":24.99,"product_id":23627,"product_name":"Slim fit jeans - grey","quantity":1,"sku":"ZO0534205342","tax_amount":0,"taxful_price":24.99,"taxless_price":24.99,"unit_discount_amount":0}, {"_id":"sold_product_568292_11149","base_price":10.99,"base_unit_price":10.99,"category":"Men's Accessories","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Elitelligence","min_price":5.06,"price":10.99,"product_id":11149,"product_name":"Sunglasses - black","quantity":1,"sku":"ZO0599605996","tax_amount":0,"taxful_price":10.99,"taxless_price":10.99,"unit_discount_amount":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0534205342, ZO0599605996,35.98,35.98,2,2,order,recip
+ OQMtOW0BH63Xcmy432HJ,ecommerce,-,-,Men's Clothing, Men's Accessories,EUR,Recip,Recip Salazar,MALE,10,Salazar,-,Wednesday,2,recip@salazar-family.zzz,Istanbul,Asia,TR,{"lat":41,"lon":29},Istanbul,Elitelligence,Jun 25, 2019 @ 00:00:00.000,568292,{"_id":"sold_product_568292_23627","base_price":24.99,"base_unit_price":24.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Elitelligence","min_price":12.49,"price":24.99,"product_id":23627,"product_name":"Slim fit jeans - grey","quantity":1,"sku":"ZO0534205342","tax_amount":0,"taxful_price":24.99,"taxless_price":24.99,"unit_discount_amount":0}, {"_id":"sold_product_568292_11149","base_price":10.99,"base_unit_price":10.99,"category":"Men's Accessories","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Elitelligence","min_price":5.06,"price":10.99,"product_id":11149,"product_name":"Sunglasses - black","quantity":1,"sku":"ZO0599605996","tax_amount":0,"taxful_price":10.99,"taxless_price":10.99,"unit_discount_amount":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0534205342, ZO0599605996,35.98,35.98,2,2,order,recip
  ↵
    at Context.<anonymous> (test/reporting_api_integration/reporting_and_security/download_csv_dashboard.ts:164:33)
    at Object.apply (/opt/local-ssd/buildkite/builds/kb-n2-4-58f8593b205c533e/elastic/kibana-7-dot-17-es-8-dot-3-forward-compatibility/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:30)
[00:00:00]     │
[00:00:00]       â””-: Reporting APIs
[00:00:00]         â””-> "before all" hook: beforeTestSuite.trigger in "Reporting APIs"
[00:00:00]         â””-> "before all" hook in "Reporting APIs"
[00:00:00]           │ debg creating role data_analyst
[00:00:00]           │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [data_analyst]
[00:00:00]           │ debg creating role test_reporting_user
[00:00:00]           │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [test_reporting_user]
[00:00:00]           │ debg creating user data_analyst
[00:00:00]           │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [data_analyst]
[00:00:00]           │ debg created user data_analyst
[00:00:00]           │ debg creating user reporting_user
[00:00:00]           │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [reporting_user]
[00:00:00]           │ debg created user reporting_user
[00:01:00]         â””-: CSV Generation from SearchSource
[00:01:00]           â””-> "before all" hook: beforeTestSuite.trigger in "CSV Generation from SearchSource"
[00:01:00]           â””-> "before all" hook in "CSV Generation from SearchSource"
[00:01:00]             │ debg applying update to kibana config: {"csv:quoteValues":false,"dateFormat:tz":"UTC","defaultIndex":"logstash-*"}
[00:01:01]             │ info [x-pack/test/functional/es_archives/reporting/ecommerce] Loading "mappings.json"
[00:01:01]             │ info [x-pack/test/functional/es_archives/reporting/ecommerce] Loading "data.json.gz"
[00:01:01]             │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [ecommerce] creating index, cause [api], templates [], shards [1]/[0]
[00:01:01]             │ info [x-pack/test/functional/es_archives/reporting/ecommerce] Created index "ecommerce"
[00:01:01]             │ debg [x-pack/test/functional/es_archives/reporting/ecommerce] "ecommerce" settings {"index":{"number_of_replicas":"0","number_of_shards":"1"}}
[00:01:02]             │ proc [kibana]   log   [14:02:25.916] [error][plugins][reporting][store] Error in finding the report from the scheduled task info! [id: l628yzo004z1c025563el9i9] [index: .reporting-2022-07-24]
[00:01:02]             │ proc [kibana]   log   [14:02:25.917] [error][plugins][reporting][store] ResponseError: {"_index":".reporting-2022-07-24","_id":"l628yzo004z1c025563el9i9","found":false}
[00:01:02]             │ proc [kibana]     at onBody (/opt/local-ssd/buildkite/builds/kb-n2-4-58f8593b205c533e/elastic/kibana-7-dot-17-es-8-dot-3-forward-compatibility/kibana-build-xpack/node_modules/@elastic/elasticsearch/lib/Transport.js:367:23)
[00:01:02]             │ proc [kibana]     at IncomingMessage.onEnd (/opt/local-ssd/buildkite/builds/kb-n2-4-58f8593b205c533e/elastic/kibana-7-dot-17-es-8-dot-3-forward-compatibility/kibana-build-xpack/node_modules/@elastic/elasticsearch/lib/Transport.js:291:11)
[00:01:02]             │ proc [kibana]     at IncomingMessage.emit (node:events:539:35)
[00:01:02]             │ proc [kibana]     at endReadableNT (node:internal/streams/readable:1345:12)
[00:01:02]             │ proc [kibana]     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
[00:01:02]             │ proc [kibana]   meta: {
[00:01:02]             │ proc [kibana]     body: {
[00:01:02]             │ proc [kibana]       _index: '.reporting-2022-07-24',
[00:01:02]             │ proc [kibana]       _id: 'l628yzo004z1c025563el9i9',
[00:01:02]             │ proc [kibana]       found: false
[00:01:02]             │ proc [kibana]     },
[00:01:02]             │ proc [kibana]     statusCode: 404,
[00:01:02]             │ proc [kibana]     headers: {
[00:01:02]             │ proc [kibana]       'x-elastic-product': 'Elasticsearch',
[00:01:02]             │ proc [kibana]       'content-type': 'application/json',
[00:01:02]             │ proc [kibana]       'content-length': '81'
[00:01:02]             │ proc [kibana]     },
[00:01:02]             │ proc [kibana]     meta: {
[00:01:02]             │ proc [kibana]       context: null,
[00:01:02]             │ proc [kibana]       request: [Object],
[00:01:02]             │ proc [kibana]       name: 'elasticsearch-js',
[00:01:02]             │ proc [kibana]       connection: [Object],
[00:01:02]             │ proc [kibana]       attempts: 0,
[00:01:02]             │ proc [kibana]       aborted: false
[00:01:02]             │ proc [kibana]     }
[00:01:02]             │ proc [kibana]   }
[00:01:02]             │ proc [kibana] }
[00:01:02]             │ proc [kibana]   log   [14:02:25.919] [error][plugins][reporting][runTask] ResponseError: {"_index":".reporting-2022-07-24","_id":"l628yzo004z1c025563el9i9","found":false}
[00:01:02]             │ proc [kibana]     at onBody (/opt/local-ssd/buildkite/builds/kb-n2-4-58f8593b205c533e/elastic/kibana-7-dot-17-es-8-dot-3-forward-compatibility/kibana-build-xpack/node_modules/@elastic/elasticsearch/lib/Transport.js:367:23)
[00:01:02]             │ proc [kibana]     at IncomingMessage.onEnd (/opt/local-ssd/buildkite/builds/kb-n2-4-58f8593b205c533e/elastic/kibana-7-dot-17-es-8-dot-3-forward-compatibility/kibana-build-xpack/node_modules/@elastic/elasticsearch/lib/Transport.js:291:11)
[00:01:02]             │ proc [kibana]     at IncomingMessage.emit (node:events:539:35)
[00:01:02]             │ proc [kibana]     at endReadableNT (node:internal/streams/readable:1345:12)
[00:01:02]             │ proc [kibana]     at processTicksAndRejections (node:internal/process/task_queues:83:21)
[00:01:02]             │ proc [kibana]   log   [14:02:25.919] [error][plugins][reporting][runTask] Job l628yzo004z1c025563el9i9 could not be claimed. Exiting...
[00:01:02]             │ proc [kibana] {"log.level":"info","@timestamp":"2022-07-26T14:02:25.922Z","log":{"logger":"elastic-apm-node"},"ecs":{"version":"1.6.0"},"message":"Sending error to Elastic APM: {\"id\":\"fc260f67b59f88e6f44e2462421f0ba1\"}"}
[00:01:03]             │ info [x-pack/test/functional/es_archives/reporting/ecommerce] Indexed 4675 docs into "ecommerce"
[00:01:03]             │ debg resolved import for x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce.json to /opt/local-ssd/buildkite/builds/kb-n2-4-58f8593b205c533e/elastic/kibana-7-dot-17-es-8-dot-3-forward-compatibility/kibana/x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce.json
[00:01:03]             │ info importing 13 saved objects { space: undefined }
[00:01:03]             │ succ import success
[00:01:03]           â””-: Exports CSV with almost all fields when using fieldsFromSource
[00:01:03]             â””-> "before all" hook: beforeTestSuite.trigger for "(ES 7)"
[00:01:03]             â””-> "before all" hook for "(ES 7)"
[00:01:04]               │ proc [kibana]   log   [14:02:27.417] [warning][csv_searchsource_immediate][csv_searchsource_immediate][execute-job][plugins][reporting] Max Size Reached after 4 rows.
[00:01:04]               │ proc [kibana]   log   [14:02:27.420] [warning][csv_searchsource_immediate][csv_searchsource_immediate][execute-job][plugins][reporting] CSV may contain formulas whose values have been escaped
[00:01:04]               │ proc [kibana]   log   [14:02:27.421] [warning][csv_searchsource_immediate][csv_searchsource_immediate][execute-job][plugins][reporting] Max size reached: CSV output truncated
[00:01:04]               │ proc [kibana]   log   [14:02:27.421] [info][csv_searchsource_immediate][plugins][reporting] Job output size: 5281 bytes.
[00:01:04]             â””-> (ES 7)
[00:01:04]             â””-> (ES 8)
[00:01:04]               â””-> "before each" hook: global before each for "(ES 8)"
[00:01:04]               └- ✖ fail: Reporting APIs CSV Generation from SearchSource Exports CSV with almost all fields when using fieldsFromSource (ES 8)
[00:01:04]               │      Error: expect(received).toMatchSnapshot()
[00:01:04]               │ 
[00:01:04]               │ Snapshot name: `Reporting APIs CSV Generation from SearchSource Exports CSV with almost all fields when using fieldsFromSource (ES 8) 1`
[00:01:04]               │ 
[00:01:04]               │ - Snapshot  - 5
[00:01:04]               │ + Received  + 5
[00:01:04]               │ 
[00:01:04]               │ - _id,_index,_score,_type,category,currency,customer_first_name,customer_full_name,customer_gender,customer_id,customer_last_name,customer_phone,day_of_week,day_of_week_i,email,geoip,manufacturer,order_date,order_id,products,products.created_on,sku,taxful_total_price,taxless_total_price,total_quantity,total_unique_products,type,user
[00:01:04]               │ + _id,_index,_score,_type,category,currency,customer_first_name,customer_full_name,customer_gender,customer_id,customer_last_name,customer_phone,day_of_week,day_of_week_i,email,geoip.city_name,geoip.continent_name,geoip.country_iso_code,geoip.location,geoip.region_name,manufacturer,order_date,order_id,products,products.created_on,sku,taxful_total_price,taxless_total_price,total_quantity,total_unique_products,type,user
[00:01:04]               │ - 9AMtOW0BH63Xcmy432DJ,ecommerce,-,-,Men's Clothing,EUR,Boris,Boris Bradley,MALE,36,Bradley,-,Wednesday,2,boris@bradley-family.zzz,{"continent_name":"Europe","country_iso_code":"GB","location":{"lat":51.5,"lon":-0.1}},Microlutions, Elitelligence,Jun 25, 2019 @ 00:00:00.000,568397,{"_id":"sold_product_568397_24419","base_price":32.99,"base_unit_price":32.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Microlutions","min_price":17.48,"price":32.99,"product_id":24419,"product_name":"Cargo trousers - oliv","quantity":1,"sku":"ZO0112101121","tax_amount":0,"taxful_price":32.99,"taxless_price":32.99,"unit_discount_amount":0}, {"_id":"sold_product_568397_20207","base_price":28.99,"base_unit_price":28.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Elitelligence","min_price":13.92,"price":28.99,"product_id":20207,"product_name":"Trousers - black","quantity":1,"sku":"ZO0530405304","tax_amount":0,"taxful_price":28.99,"taxless_price":28.99,"unit_discount_amount":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0112101121, ZO0530405304,61.98,61.98,2,2,order,boris
[00:01:04]               │ + 9AMtOW0BH63Xcmy432DJ,ecommerce,-,-,Men's Clothing,EUR,Boris,Boris Bradley,MALE,36,Bradley,-,Wednesday,2,boris@bradley-family.zzz,-,Europe,GB,{"lat":51.5,"lon":-0.1},-,Microlutions, Elitelligence,Jun 25, 2019 @ 00:00:00.000,568397,{"_id":"sold_product_568397_24419","base_price":32.99,"base_unit_price":32.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Microlutions","min_price":17.48,"price":32.99,"product_id":24419,"product_name":"Cargo trousers - oliv","quantity":1,"sku":"ZO0112101121","tax_amount":0,"taxful_price":32.99,"taxless_price":32.99,"unit_discount_amount":0}, {"_id":"sold_product_568397_20207","base_price":28.99,"base_unit_price":28.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Elitelligence","min_price":13.92,"price":28.99,"product_id":20207,"product_name":"Trousers - black","quantity":1,"sku":"ZO0530405304","tax_amount":0,"taxful_price":28.99,"taxless_price":28.99,"unit_discount_amount":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0112101121, ZO0530405304,61.98,61.98,2,2,order,boris
[00:01:04]               │ - 9QMtOW0BH63Xcmy432DJ,ecommerce,-,-,Men's Clothing,EUR,Oliver,Oliver Hubbard,MALE,7,Hubbard,-,Wednesday,2,oliver@hubbard-family.zzz,{"continent_name":"Europe","country_iso_code":"GB","location":{"lat":51.5,"lon":-0.1}},Spritechnologies, Microlutions,Jun 25, 2019 @ 00:00:00.000,568044,{"_id":"sold_product_568044_12799","base_price":14.99,"base_unit_price":14.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Spritechnologies","min_price":6.9,"price":14.99,"product_id":12799,"product_name":"Undershirt - dark grey multicolor","quantity":1,"sku":"ZO0630406304","tax_amount":0,"taxful_price":14.99,"taxless_price":14.99,"unit_discount_amount":0}, {"_id":"sold_product_568044_18008","base_price":16.99,"base_unit_price":16.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Microlutions","min_price":8.83,"price":16.99,"product_id":18008,"product_name":"Long sleeved top - purple","quantity":1,"sku":"ZO0120201202","tax_amount":0,"taxful_price":16.99,"taxless_price":16.99,"unit_discount_amount":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0630406304, ZO0120201202,31.98,31.98,2,2,order,oliver
[00:01:04]               │ + 9QMtOW0BH63Xcmy432DJ,ecommerce,-,-,Men's Clothing,EUR,Oliver,Oliver Hubbard,MALE,7,Hubbard,-,Wednesday,2,oliver@hubbard-family.zzz,-,Europe,GB,{"lat":51.5,"lon":-0.1},-,Spritechnologies, Microlutions,Jun 25, 2019 @ 00:00:00.000,568044,{"_id":"sold_product_568044_12799","base_price":14.99,"base_unit_price":14.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Spritechnologies","min_price":6.9,"price":14.99,"product_id":12799,"product_name":"Undershirt - dark grey multicolor","quantity":1,"sku":"ZO0630406304","tax_amount":0,"taxful_price":14.99,"taxless_price":14.99,"unit_discount_amount":0}, {"_id":"sold_product_568044_18008","base_price":16.99,"base_unit_price":16.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Microlutions","min_price":8.83,"price":16.99,"product_id":18008,"product_name":"Long sleeved top - purple","quantity":1,"sku":"ZO0120201202","tax_amount":0,"taxful_price":16.99,"taxless_price":16.99,"unit_discount_amount":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0630406304, ZO0120201202,31.98,31.98,2,2,order,oliver
[00:01:04]               │ - OAMtOW0BH63Xcmy432HJ,ecommerce,-,-,Women's Accessories,EUR,Betty,Betty Reese,FEMALE,44,Reese,-,Wednesday,2,betty@reese-family.zzz,{"city_name":"New York","continent_name":"North America","country_iso_code":"US","location":{"lat":40.7,"lon":-74},"region_name":"New York"},Pyramidustries,Jun 25, 2019 @ 00:00:00.000,568229,{"_id":"sold_product_568229_24991","base_price":11.99,"base_unit_price":11.99,"category":"Women's Accessories","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Pyramidustries","min_price":6.35,"price":11.99,"product_id":24991,"product_name":"Scarf - rose/white","quantity":1,"sku":"ZO0192201922","tax_amount":0,"taxful_price":11.99,"taxless_price":11.99,"unit_discount_amount":0}, {"_id":"sold_product_568229_12039","base_price":10.99,"base_unit_price":10.99,"category":"Women's Accessories","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Pyramidustries","min_price":5.82,"price":10.99,"product_id":12039,"product_name":"Scarf - nude/black/turquoise","quantity":1,"sku":"ZO0192801928","tax_amount":0,"taxful_price":10.99,"taxless_price":10.99,"unit_discount_amount":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0192201922, ZO0192801928,22.98,22.98,2,2,order,betty
[00:01:04]               │ + OAMtOW0BH63Xcmy432HJ,ecommerce,-,-,Women's Accessories,EUR,Betty,Betty Reese,FEMALE,44,Reese,-,Wednesday,2,betty@reese-family.zzz,New York,North America,US,{"lat":40.7,"lon":-74},New York,Pyramidustries,Jun 25, 2019 @ 00:00:00.000,568229,{"_id":"sold_product_568229_24991","base_price":11.99,"base_unit_price":11.99,"category":"Women's Accessories","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Pyramidustries","min_price":6.35,"price":11.99,"product_id":24991,"product_name":"Scarf - rose/white","quantity":1,"sku":"ZO0192201922","tax_amount":0,"taxful_price":11.99,"taxless_price":11.99,"unit_discount_amount":0}, {"_id":"sold_product_568229_12039","base_price":10.99,"base_unit_price":10.99,"category":"Women's Accessories","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Pyramidustries","min_price":5.82,"price":10.99,"product_id":12039,"product_name":"Scarf - nude/black/turquoise","quantity":1,"sku":"ZO0192801928","tax_amount":0,"taxful_price":10.99,"taxless_price":10.99,"unit_discount_amount":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0192201922, ZO0192801928,22.98,22.98,2,2,order,betty
[00:01:04]               │  - OQMtOW0BH63Xcmy432HJ,ecommerce,-,-,Men's Clothing, Men's Accessories,EUR,Recip,Recip Salazar,MALE,10,Salazar,-,Wednesday,2,recip@salazar-family.zzz,{"city_name":"Istanbul","continent_name":"Asia","country_iso_code":"TR","location":{"lat":41,"lon":29},"region_name":"Istanbul"},Elitelligence,Jun 25, 2019 @ 00:00:00.000,568292,{"_id":"sold_product_568292_23627","base_price":24.99,"base_unit_price":24.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Elitelligence","min_price":12.49,"price":24.99,"product_id":23627,"product_name":"Slimfit jeans - grey","quantity":1,"sku":"ZO0534205342","tax_amount":0,"taxful_price":24.99,"taxless_price":24.99,"unit_discount_amount":0}, {"_id":"sold_product_568292_11149","base_price":10.99,"base_unit_price":10.99,"category":"Men's Accessories","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Elitelligence","min_price":5.06,"price":10.99,"product_id":11149,"product_name":"Sunglasses - black","quantity":1,"sku":"ZO0599605996","tax_amount":0,"taxful_price":10.99,"taxless_price":10.99,"unit_discount_amount":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0534205342, ZO0599605996,35.98,35.98,2,2,order,recip
[00:01:04]               │  + OQMtOW0BH63Xcmy432HJ,ecommerce,-,-,Men's Clothing, Men's Accessories,EUR,Recip,Recip Salazar,MALE,10,Salazar,-,Wednesday,2,recip@salazar-family.zzz,Istanbul,Asia,TR,{"lat":41,"lon":29},Istanbul,Elitelligence,Jun 25, 2019 @ 00:00:00.000,568292,{"_id":"sold_product_568292_23627","base_price":24.99,"base_unit_price":24.99,"category":"Men's Clothing","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Elitelligence","min_price":12.49,"price":24.99,"product_id":23627,"product_name":"Slimfit jeans - grey","quantity":1,"sku":"ZO0534205342","tax_amount":0,"taxful_price":24.99,"taxless_price":24.99,"unit_discount_amount":0}, {"_id":"sold_product_568292_11149","base_price":10.99,"base_unit_price":10.99,"category":"Men's Accessories","created_on":"2016-12-14T00:00:00+00:00","discount_amount":0,"discount_percentage":0,"manufacturer":"Elitelligence","min_price":5.06,"price":10.99,"product_id":11149,"product_name":"Sunglasses - black","quantity":1,"sku":"ZO0599605996","tax_amount":0,"taxful_price":10.99,"taxless_price":10.99,"unit_discount_amount":0},Dec 14, 2016 @ 00:00:00.000, Dec 14, 2016 @ 00:00:00.000,ZO0534205342, ZO0599605996,35.98,35.98,2,2,order,recip
[00:01:04]               │   ↵
[00:01:04]               │       at Context.<anonymous> (test/reporting_api_integration/reporting_and_security/download_csv_dashboard.ts:164:33)
[00:01:04]               │       at Object.apply (/opt/local-ssd/buildkite/builds/kb-n2-4-58f8593b205c533e/elastic/kibana-7-dot-17-es-8-dot-3-forward-compatibility/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:30)
[00:01:04]               │ 
[00:01:04]               │ 
elasticmachine commented 2 years ago

Pinging @elastic/kibana-reporting-services (Team:Reporting Services)

elasticmachine commented 2 years ago

Pinging @elastic/kibana-app-services (Team:AppServicesUx)

vadimkibana commented 2 years ago

How can one reproduce this test on local dev environment?


I was trying to use --esFrom argument in functional test runner unsuccessfully; and also TEST_ES_URL + TEST_ES_DISABLE_STARTUP FTR server runner environment variables, but none of that worked for me.

spalger commented 2 years ago

Sorry @vadimkibana and @tsullivan, did some research and figured out you can just call the following in the 7.17 branch to start the functional tests with a different ES version:

TEST_ES_BRANCH=8.5.0 node scripts/functional_tests_server
# or
TEST_ES_BRANCH=8.4.0 node scripts/functional_tests_server
vadimkibana commented 2 years ago

@spalger I've tried this out with

TEST_ES_BRANCH=8.5.0 node scripts/functional_tests_server --config x-pack/test/reporting_api_integration/reporting_and_security.config.ts

node scripts/functional_test_runner --config x-pack/test/reporting_api_integration/reporting_and_security.config.ts --es-version 8.5.0-SNAPSHOT

But receive network errors like this:

image
spalger commented 2 years ago

It sounds like the reporting tests don't run locally, I'm nor sure why you'd get 503 responses, but sounds like a reporting specific thing, looks like ES and Kibana are starting correctly...

vadimkibana commented 2 years ago

I'm not sure how to replicate this test failure locally, but here are some insights of what is happening there. It looks like the difference in test snapshots is because it used to flatten the geoip.* fields into multiple fields, but now it started treating it as a single field, which contains an object:

image

Reporting Plugin receives the list of columns (fields) from the SearchSource result using the tabifyDocs function, which uses the flattenHit function, both from the Data Plugin. My guess is that the latest changes in ES make the flattenHit return a different set of column names (i.e. a single geoip field instead of all the geoip.* fields). Here is the flattenHit function:

https://github.com/elastic/kibana/blob/7.17/src/plugins/data/common/search/tabify/tabify_docs.ts#L78-L171

To find exactly we could:

  1. Setup a sample dataset, which has a geoip nested object.
  2. Run a search using some SearchSource config and pass results through the tabifyDocs and flattenHit functions.
  3. Do that for ES 7.x and ES 8.5.
  4. See what causes the difference.

I was doing something like that on Friday, but didn't run the results through the tabifyDocs function. From raw SearchSource result I couldn't see what is the difference.

It sounds like the reporting tests don't run locally...

@tsullivan Are these tests supposed to run locally?

Alternatively, maybe I'm wrong: maybe it is not flattenHit but something in Reporting plugin that causes this behavior. But to test that the best way would be to execute the functional tests on Kibana 7.17 with ES 8.5, which I cannot get running locally.

wdyt? @ppisljar @tsullivan

spalger commented 2 years ago

I've skipped these tests in the 7.17 branch, when it's running against ES v8 for now: https://github.com/elastic/kibana/commit/29f9d6d52aaf287816fc3e5e850ac0b6b6ba139e

cbowdon commented 1 year ago

Could this be causing nested fields to not be populated in generated CSVs? This is something we are experiencing since we upgraded to 7.17.6 from 7.16.2.

tsullivan commented 1 year ago

@cbowdon That is not likely, since this thread is about tests that carry over functionality correctly after upgrading from 7.17 to 8.x.

Would you please file a new issue with steps to reproduce, and tag the @elastic/kibana-app-services team?

cbowdon commented 1 year ago

@tsullivan sure, thanks for responding

tsullivan commented 1 year ago

It sounds like the reporting tests don't run locally...

I was able to run the tests locally with the following:

Once the tests are finished running, the snapshots are updated to reflect the latest behavior.

I'm not sure what else we can do here, other than update our snapshots to match what ES actually returns.

PR: https://github.com/elastic/kibana/pull/150618

tsullivan commented 1 year ago

fixed via https://github.com/elastic/kibana/pull/150618