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

failsOnMKI: Serverless Common UI - Management Data View Management creating and deleting default data view #171479

Closed
pheyos opened this issue Nov 18, 2023 · 2 comments · Fixed by #181349
Assignees
Labels
:DataDiscovery/fix-it-week failed-test A test failure on a tracked branch, potentially flaky-test impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.

Comments

@pheyos
Copy link
Member

pheyos commented Nov 18, 2023

A test suite that has been added as part of #164656 is failing during the before and after step when running on MKI:

   │1)    Serverless Common UI - Management
   │       Data View Management
   │         creating and deleting default data view
   │           "before all" hook in "creating and deleting default data view":
   │
   │      AggregateError: 
   │     Error: Bulk doc failure [operation=index]:
   │       doc: {"index-pattern":{"fieldFormatMap":"{/"hour_of_day/":{/"id/":/"number/",/"params/":{/"pattern/":/"00/"}},/"AvgTicketPrice/":{/"id/":/"number/",/"params/":{/"pattern/":/"$0,0.[00]/"}}}","fields":"[{/"name/":/"AvgTicketPrice/",/"type/":/"number/",/"esTypes/":[/"float/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"Cancelled/",/"type/":/"boolean/",/"esTypes/":[/"boolean/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"Carrier/",/"type/":/"string/",/"esTypes/":[/"keyword/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"Dest/",/"type/":/"string/",/"esTypes/":[/"keyword/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"DestAirportID/",/"type/":/"string/",/"esTypes/":[/"keyword/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"DestCityName/",/"type/":/"string/",/"esTypes/":[/"keyword/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"DestCountry/",/"type/":/"string/",/"esTypes/":[/"keyword/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"DestLocation/",/"type/":/"geo_point/",/"esTypes/":[/"geo_point/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"DestRegion/",/"type/":/"string/",/"esTypes/":[/"keyword/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"DestWeather/",/"type/":/"string/",/"esTypes/":[/"keyword/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"DistanceKilometers/",/"type/":/"number/",/"esTypes/":[/"float/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"DistanceMiles/",/"type/":/"number/",/"esTypes/":[/"float/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"FlightDelay/",/"type/":/"boolean/",/"esTypes/":[/"boolean/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"FlightDelayMin/",/"type/":/"number/",/"esTypes/":[/"integer/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"FlightDelayType/",/"type/":/"string/",/"esTypes/":[/"keyword/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"FlightNum/",/"type/":/"string/",/"esTypes/":[/"keyword/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"FlightTimeHour/",/"type/":/"string/",/"esTypes/":[/"keyword/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"FlightTimeMin/",/"type/":/"number/",/"esTypes/":[/"float/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"Origin/",/"type/":/"string/",/"esTypes/":[/"keyword/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"OriginAirportID/",/"type/":/"string/",/"esTypes/":[/"keyword/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"OriginCityName/",/"type/":/"string/",/"esTypes/":[/"keyword/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"OriginCountry/",/"type/":/"string/",/"esTypes/":[/"keyword/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"OriginLocation/",/"type/":/"geo_point/",/"esTypes/":[/"geo_point/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"OriginRegion/",/"type/":/"string/",/"esTypes/":[/"keyword/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"OriginWeather/",/"type/":/"string/",/"esTypes/":[/"keyword/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"_id/",/"type/":/"string/",/"esTypes/":[/"_id/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":false},{/"name/":/"_index/",/"type/":/"string/",/"esTypes/":[/"_index/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":false},{/"name/":/"_score/",/"type/":/"number/",/"count/":0,/"scripted/":false,/"searchable/":false,/"aggregatable/":false,/"readFromDocValues/":false},{/"name/":/"_source/",/"type/":/"_source/",/"esTypes/":[/"_source/"],/"count/":0,/"scripted/":false,/"searchable/":false,/"aggregatable/":false,/"readFromDocValues/":false},{/"name/":/"_type/",/"type/":/"string/",/"esTypes/":[/"_type/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":false},{/"name/":/"dayOfWeek/",/"type/":/"number/",/"esTypes/":[/"integer/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"timestamp/",/"type/":/"date/",/"esTypes/":[/"date/"],/"count/":0,/"scripted/":false,/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":true},{/"name/":/"hour_of_day/",/"type/":/"number/",/"count/":0,/"scripted/":true,/"script/":/"doc['timestamp'].value.hourOfDay/",/"lang/":/"painless/",/"searchable/":true,/"aggregatable/":true,/"readFromDocValues/":false}]","timeFieldName":"timestamp","title":"kibana_sample_data_flights"},"coreMigrationVersion":"8.8.0","typeMigrationVersion":"8.0.0","references":[],"type":"index-pattern","updated_at":"2019-07-31T16:35:56.070Z"}
   │       error: {"type":"security_exception","reason":"action [indices:data/write/bulk[s]] is unauthorized for user [elastic] with effective roles [superuser] on restricted indices [.kibana_analytics_1], this action is granted by the index privileges [create_doc,create,delete,index,write,all]"}
   │         at Array.map (<anonymous>)
   │         at indexDocs (index_doc_records_stream.ts:62:13)
   │         at processTicksAndRejections (node:internal/process/task_queues:95:5)
   │         at Writable.write [as _write] (index_doc_records_stream.ts:76:9)
   │       at indexDocs (index_doc_records_stream.ts:62:13)
   │       at processTicksAndRejections (node:internal/process/task_queues:95:5)
   │       at Writable.write [as _write] (index_doc_records_stream.ts:76:9)
   │ 
   │ 
   │2)    Serverless Common UI - Management
   │       Data View Management
   │         creating and deleting default data view
   │           "after all" hook in "creating and deleting default data view":
   │
   │      ResponseError: security_exception
   │    Root causes:
   │            security_exception: action [indices:data/write/delete/byquery] is unauthorized for user [elastic] with effective roles [superuser] on restricted indices [.kibana_task_manager,.kibana,.kibana_ingest,.kibana_alerting_cases,.kibana_security_solution,.kibana_analytics], this action is granted by the index privileges [delete,write,all]
   │       at SniffingTransport.request (node_modules/@elastic/transport/src/Transport.ts:535:17)
   │       at processTicksAndRejections (node:internal/process/task_queues:95:5)
   │       at Client.DeleteByQueryApi [as deleteByQuery] (node_modules/@elastic/elasticsearch/src/api/api/delete_by_query.ts:75:10)
   │       at cleanSavedObjectIndices (kibana_index.ts:121:18)
   │       at Transform.transform [as _transform] (delete_index_stream.ts:73:17)

The root cause is in both cases direct system indices access. AFAICS, this is happening when loading / unloading the archive x-pack/test_serverless/functional/es_archives/kibana_sample_data_flights_index_pattern. This kind of access is not available in MKI and the tests need to be adjusted (e.g. by loading things through kibanaServer.importExport or other APIs).

@pheyos pheyos added failed-test A test failure on a tracked branch, potentially flaky-test Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Nov 18, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

pull bot pushed a commit to abitmore/kibana that referenced this issue Nov 19, 2023
## Summary

This PR skips the `creating and deleting default data view` test suite
for MKI runs.

Details about the failure in elastic#171479
@davismcphee davismcphee self-assigned this Nov 20, 2023
@davismcphee davismcphee added loe:small Small Level of Effort impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Nov 20, 2023
@pheyos
Copy link
Member Author

pheyos commented Nov 20, 2023

The test suite has been skipped in #171480

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:DataDiscovery/fix-it-week failed-test A test failure on a tracked branch, potentially flaky-test impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants