Closed suchcodemuchwow closed 1 year ago
Pinging @elastic/kibana-reporting-services (Team:Reporting Services)
Pinging @elastic/kibana-app-services (Team:AppServicesUx)
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.
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
@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:
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...
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:
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:
To find exactly we could:
geoip
nested object.tabifyDocs
and flattenHit
functions.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
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
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.
@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?
@tsullivan sure, thanks for responding
It sounds like the reporting tests don't run locally...
I was able to run the tests locally with the following:
TEST_ES_BRANCH=8.7.0 node scripts/functional_tests_server.js --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 --grep='Reporting APIs CSV' --updateSnapshots --es-version 8.7.0
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.
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 😇