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

[APM] e2e are failing when running them locally #61942

Closed
v1v opened this issue Mar 31, 2020 · 6 comments
Closed

[APM] e2e are failing when running them locally #61942

v1v opened this issue Mar 31, 2020 · 6 comments
Assignees
Labels
Team:APM All issues that need APM UI Team support

Comments

@v1v
Copy link
Member

v1v commented Mar 31, 2020

Kibana version:
master branch

commit d78711b3e8d2d072043f1ed250c540426c72f460 (HEAD -> master, upstream/master, origin/master, origin/HEAD)
Author: Walter Rafelsberger <walter@elastic.co>
Date:   Tue Mar 31 10:03:04 2020 +0200

Elasticsearch version:
master branch

{
name: "00a78790aa23",
cluster_name: "docker-cluster",
cluster_uuid: "bIAKGGRTTciu8gd5y2B20g",
version: {
number: "8.0.0-SNAPSHOT",
build_flavor: "default",
build_type: "docker",
build_hash: "b7af8524228891c305b8868ff7f748ec10cf724c",
build_date: "2020-03-30T09:57:48.811880Z",
build_snapshot: true,
lucene_version: "8.5.0",
minimum_wire_compatibility_version: "7.8.0",
minimum_index_compatibility_version: "7.0.0"
},
tagline: "You Know, for Search"
}

Server OS version:
macosx 10.14.3 (18D42)

Browser version:
N/A

Browser OS version:
N/A

Original install method (e.g. download page, yum, from source, etc.):
From source
node --version - v10.19.0
nvm --version - 0.34.0

Description of the problem including expected versus actual behavior:

e2e tests are failing with

image

Steps to reproduce:

Run all the below steps from scratch:

cd /tmp
git clone https://github.com/elastic/kibana --depth 1
docker ps -a
cd kibana
nvm use $(cat .node-version)

if x-pack/legacy/plugins/apm/ is still in place

cd x-pack/legacy/plugins/apm/e2e
yarn install
cd -
yarn kbn clean && yarn kbn bootstrap
nohup node ./scripts/kibana --no-base-path --dev --no-dev-config --config x-pack/legacy/plugins/apm/e2e/ci/kibana.e2e.yml > /tmp/kibana.log 2>&1 &
x-pack/legacy/plugins/apm/e2e/run-e2e.sh

Otherwise:

cd x-pack/plugins/apm/e2e
yarn install
cd -
yarn kbn clean && yarn kbn bootstrap
nohup node ./scripts/kibana --no-base-path --dev --no-dev-config --config x-pack/plugins/apm/e2e/ci/kibana.e2e.yml > /tmp/kibana.log 2>&1 &
x-pack/plugins/apm/e2e/run-e2e.sh

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="0" tests="1" failures="1">
  <testsuite name="Root Suite" timestamp="2020-03-31T09:12:26" tests="0" file="cypress/integration/apm.feature" failures="0" time="0">
  </testsuite>
  <testsuite name="APM" timestamp="2020-03-31T09:12:26" tests="1" failures="1" time="0">
    <testcase name="APM Transaction duration charts" time="0" classname="Transaction duration charts">
      <failure message="Timed out retrying: Expected to find element: &apos;:contains(opbeans-node)&apos;, but never found it." type="CypressError"><![CDATA[CypressError: Timed out retrying: Expected to find element: ':contains(opbeans-node)', but never found it.
    at cypressErr (http://localhost:5701/__cypress/runner/cypress_runner.js:138644:9)
    at throwErr (http://localhost:5701/__cypress/runner/cypress_runner.js:138577:11)
    at Object.throwErrByPath (http://localhost:5701/__cypress/runner/cypress_runner.js:138625:3)
    at retry (http://localhost:5701/__cypress/runner/cypress_runner.js:132905:19)
    at onFailFn (http://localhost:5701/__cypress/runner/cypress_runner.js:121122:16)
    at tryCatcher (http://localhost:5701/__cypress/runner/cypress_runner.js:165465:23)
    at Promise._settlePromiseFromHandler (http://localhost:5701/__cypress/runner/cypress_runner.js:163401:31)
    at Promise._settlePromise (http://localhost:5701/__cypress/runner/cypress_runner.js:163458:18)
    at Promise._settlePromise0 (http://localhost:5701/__cypress/runner/cypress_runner.js:163503:10)
    at Promise._settlePromises (http://localhost:5701/__cypress/runner/cypress_runner.js:163578:18)
    at Async../node_modules/bluebird/js/release/async.js.Async._drainQueue (http://localhost:5701/__cypress/runner/cypress_runner.js:160190:16)
    at Async../node_modules/bluebird/js/release/async.js.Async._drainQueues (http://localhost:5701/__cypress/runner/cypress_runner.js:160200:10)
    at Async.drainQueues (http://localhost:5701/__cypress/runner/cypress_runner.js:160074:14)]]></failure>
    </testcase>
  </testsuite>
</testsuites>

Describe the feature:

@dgieselaar dgieselaar self-assigned this Mar 31, 2020
@dgieselaar dgieselaar added the Team:APM All issues that need APM UI Team support label Mar 31, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@dgieselaar dgieselaar changed the title [apm-ui] e2e are failing when running them locally [APM] e2e are failing when running them locally Mar 31, 2020
@v1v
Copy link
Member Author

v1v commented Apr 3, 2020

I was able to reproduce the same error in the CI:

See build in the CI that also executed the end2end tests.

Please let me know if you need further details.

@v1v
Copy link
Member Author

v1v commented Apr 8, 2020

I just raised #62979 which could be the reason for this particular error.

@dgieselaar
Copy link
Member

@v1v it works for me locally on current master. For some reason the links to kibana.log and screenshot do not work either. Does it still not work for you on current master? If so, can you show me the logs/screenshot?

@v1v
Copy link
Member Author

v1v commented Apr 16, 2020

Regarding the details from the build, there was a log rotation, so the below ones are the ones that are available now:

See build in the CI that also executed the end2end tests.

Although the above build got a few more changes to enable the timeout to be more relax in cypress... Anyway I'll run the above changes locally too

Regarding the errors, I managed to reproduce them again from a completely new workspace and without any other processes running in the background (apm-integration-testing, docker containers , yarn or node)

$ cd /tmp
$ git clone https://github.com/elastic/kibana --depth 1
Cloning into 'kibana'...
remote: Enumerating objects: 33644, done.
remote: Counting objects: 100% (33644/33644), done.
remote: Compressing objects: 100% (27818/27818), done.
remote: Total 33644 (delta 8920), reused 19447 (delta 4575), pack-reused 0
Receiving objects: 100% (33644/33644), 338.40 MiB | 12.63 MiB/s, done.
Resolving deltas: 100% (8920/8920), done.
Checking out files: 100% (27425/27425), done.
$ docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

$ ps aux | grep yarn
vmartinez        86667   0.0  0.0  4399088    864 s001  S+    2:44pm   0:00.00 grep --color=auto yarn

$ cd kibana/ && git log -1
commit fdc962f348ed54c63e49c8f745753caadf394ad6 (grafted, HEAD -> master, origin/master, origin/HEAD)
Author: Tim Roes <tim.roes@elastic.co>
Date:   Thu Apr 16 15:22:07 2020 +0200

    Remove duplicate refresh button from vis editor menu (#63633)
    
    * Remove the refresh button from vis editor
    
$ nvm use $(cat .node-version)
Now using node v10.19.0 (npm v6.13.4)

$ cd x-pack/legacy/plugins/apm/e2e

$ yarn install
yarn install v1.21.1
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
warning Your current version of Yarn is out of date. The latest version is "1.22.4", while you're on "1.21.1".
info To upgrade, run the following command:
$ brew upgrade yarn
✨  Done in 11.76s.

$ cd -
/tmp/kibana

$ yarn kbn clean && yarn kbn bootstrap
yarn run v1.21.1

$ nohup node ./scripts/kibana --no-base-path --dev --no-dev-config --config x-pack/legacy/plugins/apm/e2e/ci/kibana.e2e.yml > /tmp/kibana.log 2>&1 &
[1] 90355

$ x-pack/legacy/plugins/apm/e2e/run-e2e.sh
To start Kibana please run the following command:
node ./scripts/kibana --no-base-path --dev --no-dev-config --config x-pack/legacy/plugins/apm/e2e/ci/kibana.e2e.yml

Temporary folder
Temporary files will be stored in: ./tmp

apm-integration-testing (logs: ./tmp/apm-it.log)
Cloning repository
Starting docker-compose

Cypress (logs: ./tmp/e2e-yarn.log)
Installing cypress dependencies 

Static mock data (logs: ./tmp/ingest-data.log)
Downloading events.json...
✔ Successfully ingested 96 of 96 events

Waiting for Kibana to start...
Note: you need to start Kibana manually. Find the instructions at the top.

✅ Setup completed successfully. Running tests...


yarn run v1.21.1
$ /private/tmp/kibana/x-pack/legacy/plugins/apm/e2e/node_modules/.bin/cypress run --config pageLoadTimeout=100000,watchForFileChanges=true

====================================================================================================

  (Run Starting)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Cypress:        4.2.0                                                                          │
  │ Browser:        Electron 80 (headless)                                                         │
  │ Node Version:   v10.19.0 (/var/folders/wf/wtvk1cxx54l2tvkx12xrt5500000gn/T/yarn--1587045263690 │
  │                 -0.6754429322413762/node)                                                      │
  │ Specs:          1 found (apm.feature)                                                          │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running:  apm.feature                                                                     (1 of 1)

  (Results)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Tests:        1                                                                                │
  │ Passing:      0                                                                                │
  │ Failing:      1                                                                                │
  │ Pending:      0                                                                                │
  │ Skipped:      0                                                                                │
  │ Screenshots:  1                                                                                │
  │ Video:        false                                                                            │
  │ Duration:     1 minute, 1 second                                                               │
  │ Spec Ran:     apm.feature                                                                      │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘


  (Screenshots)

  -  /private/tmp/kibana/x-pack/legacy/plugins/apm/e2e/cypress/screenshots/apm.featur     (1280x720)
     e/APM -- Transaction duration charts (failed).png                                              


====================================================================================================

  (Run Finished)


       Spec                                              Tests  Passing  Failing  Pending  Skipped  
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ ✖  apm.feature                              01:01        1        -        1        -        - │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
    ✖  1 of 1 failed (100%)                     01:01        1        -        1        -        -  

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


If you want to run the test interactively, run:

yarn cypress open --config pageLoadTimeout=100000,watchForFileChanges=true


 2020-04-16 14:56:07 ⌚  |2.6.3| Victors-MacBook-Pro in /tmp/kibana
± |master ✓| → echo $?
0

Have you tried to run the above commands from a completely new workspace where no kibana instances are running?

Thanks

@v1v
Copy link
Member Author

v1v commented May 13, 2020

Caused by #66326

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:APM All issues that need APM UI Team support
Projects
None yet
Development

No branches or pull requests

4 participants