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

Move all reporting tests into their own folder and add chromium tests #19330

Merged
merged 26 commits into from
Jun 5, 2018

Conversation

stacey-gammon
Copy link
Contributor

@stacey-gammon stacey-gammon commented May 22, 2018

This allows for us to test multiple kibana.yml configurations, including chromium versions.

Could also be considered a benefit in that reporting tests take a long time to complete, so if we decide to split out what is included in the jenkins ci vs integration tests, this will better isolate the code needed for that.

This also means we can set optimize.enabled to false for the other api tests which speed them up.

The majority of this change list is just moving code around. The only changes are that some of the tests are run now with the chromium option.

Fixes #19351

@stacey-gammon stacey-gammon added test :Sharing v7.0.0 v6.4.0 (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead labels May 22, 2018
@stacey-gammon stacey-gammon force-pushed the 2018-05-chromium-tests branch 3 times, most recently from 2c77f78 to 34fe3b3 Compare May 24, 2018 00:31
@elasticmachine
Copy link
Contributor

💔 Build Failed

@stacey-gammon stacey-gammon changed the title Move all reporting tests into their own folder Move all reporting tests into their own folder and add chromium tests May 24, 2018
@stacey-gammon
Copy link
Contributor Author

Failed on chromium api tests again:

13:06:21    │ proc  [kibana]   log   [13:06:21.189] [warning][deprecation][reporting] The title should be provided with the job generation request. Please use Kibana to regenerate your URLs. This functionality will be removed with the next major version.
13:06:21    │ proc  [kibana]   log   [13:06:21.192] [warning][deprecation][reporting] The relativeUrl should be provided with the job generation request. Please use Kibana to regenerate your URLs. This functionality will be removed with the next major version.
13:06:21    │ proc  [kibana]   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
13:06:21    │ proc  [kibana]                                  Dload  Upload   Total   Spent    Left  Speed
13:06:51    │ proc  [kibana] 
13:06:51   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:04 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:05 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:06 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:07 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:08 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:09 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:10 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:11 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:12 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:13 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:14 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:15 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:16 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:17 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:18 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:19 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:20 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:21 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:22 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:23 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:24 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:25 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:26 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:27 --:--:--     0
13:06:51   0     0    0     0    0     0      0      0 --:--:--  0:00:28 --:--:--     0
13:06:51 100   364  100   364    0     0     12      0  0:00:30  0:00:29  0:00:01    73
13:06:51 100   364  100   364    0     0     12      0  0:00:30  0:00:29  0:00:01    91
13:06:51    │ proc  [kibana] [ {
13:06:51    │ proc  [kibana]    "description": "",
13:06:51    │ proc  [kibana]    "devtoolsFrontendUrl": "/devtools/inspector.html?ws=127.0.0.1:43954/devtools/page/80142816-c3ad-45f3-a318-d81ab015e8fc",
13:06:51    │ proc  [kibana]    "id": "80142816-c3ad-45f3-a318-d81ab015e8fc",
13:06:51    │ proc  [kibana]    "title": "",
13:06:51    │ proc  [kibana]    "type": "page",
13:06:51    │ proc  [kibana]    "url": "about:blank",
13:06:51    │ proc  [kibana]    "webSocketDebuggerUrl": "ws://127.0.0.1:43954/devtools/page/80142816-c3ad-45f3-a318-d81ab015e8fc"
13:06:51    │ proc  [kibana] } ]
13:06:51    │ info  [o.e.c.m.MetaDataMappingService] [SHytBHI] [.reporting-2018.05.20/zLuTAsdhSgiRKcl-1hpYIA] update_mapping [esqueue]
13:06:54    │ proc  [kibana]   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
13:06:54    │ proc  [kibana]                                  Dload  Upload   Total   Spent    Left  Speed
13:06:54    │ proc  [kibana] 
13:06:54   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
13:06:54 100   364  100   364    0     0   448k      0 --:--:-- --:--:-- --:--:--  355k
13:06:54    │ proc  [kibana] [ {
13:06:54    │ proc  [kibana]    "description": "",
13:06:54    │ proc  [kibana]    "devtoolsFrontendUrl": "/devtools/inspector.html?ws=127.0.0.1:35009/devtools/page/2cf7bf9d-fdc0-41c5-864d-33dbaa06ecc6",
13:06:54    │ proc  [kibana]    "id": "2cf7bf9d-fdc0-41c5-864d-33dbaa06ecc6",
13:06:54    │ proc  [kibana]    "title": "",
13:06:54    │ proc  [kibana]    "type": "page",
13:06:54    │ proc  [kibana]    "url": "about:blank",
13:06:54    │ proc  [kibana]    "webSocketDebuggerUrl": "ws://127.0.0.1:35009/devtools/page/2cf7bf9d-fdc0-41c5-864d-33dbaa06ecc6"
13:06:54    │ proc  [kibana] } ]
13:07:07    │ proc  [kibana]   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
13:07:07    │ proc  [kibana]                                  Dload  Upload   Total   Spent    Left  Speed
13:07:07    │ proc  [kibana] 
13:07:07   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
13:07:07 100   364  100   364    0     0   198k      0 --:--:-- --:--:-- --:--:--  355k
13:07:07    │ proc  [kibana] [ {
13:07:07    │ proc  [kibana]    "description": "",
13:07:07    │ proc  [kibana]    "devtoolsFrontendUrl": "/devtools/inspector.html?ws=127.0.0.1:37538/devtools/page/65b34df2-412d-4a12-ae63-50c127564996",
13:07:07    │ proc  [kibana]    "id": "65b34df2-412d-4a12-ae63-50c127564996",
13:07:07    │ proc  [kibana]    "title": "",
13:07:07    │ proc  [kibana]    "type": "page",
13:07:07    │ proc  [kibana]    "url": "about:blank",
13:07:07    │ proc  [kibana]    "webSocketDebuggerUrl": "ws://127.0.0.1:37538/devtools/page/65b34df2-412d-4a12-ae63-50c127564996"
13:07:07    │ proc  [kibana] } ]
13:07:16    │ proc  [ftr]        └- ✖ fail: "chromium BWC report generation urls 6_2 multiple jobs posted"
13:07:16    │ proc  [ftr]        │        Error: expected 500 to equal 200
13:07:16    │ proc  [ftr]        │         at Assertion.assert (node_modules/expect.js/index.js:96:13)
13:07:16    │ proc  [ftr]        │         at Assertion.be.Assertion.equal (node_modules/expect.js/index.js:216:10)
13:07:16    │ proc  [ftr]        │         at Assertion.(anonymous function) [as be] (node_modules/expect.js/index.js:69:24)
13:07:16    │ proc  [ftr]        │         at Object.waitForJobToFinish (test/reporting/services/reporting_api.js:39:29)
13:07:16    │ proc  [ftr]        │         at <anonymous>
13:07:16    │ proc  [ftr]        │       
13:07:16    │ proc  [ftr]        │       
13:07:16    │ proc  [ftr]        └-> "after all" hook
13:07:16    │ proc  [ftr]      └-> "after all" hook
13:07:16    │ proc  [ftr]    └-> "after all" hook

Should have been fixed with that spawnSync curl command.

Agent Info, in case this is dependent on the jenkins agent:

NODE_LABELS linux swarm ubuntu ubuntu-16.04 virtual worker-0fb0b5dd1f46af731 x86_64
NODE_NAME worker-0fb0b5dd1f46af731

Also looks like I need to conditionally output the curl logs so it doesn't spit out if verbose logging is off.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@stacey-gammon stacey-gammon force-pushed the 2018-05-chromium-tests branch 2 times, most recently from cfef13f to af6de3d Compare May 24, 2018 16:37
@elastic elastic deleted a comment from elasticmachine May 24, 2018
@elastic elastic deleted a comment from elasticmachine May 24, 2018
@elastic elastic deleted a comment from elasticmachine May 24, 2018
@elastic elastic deleted a comment from elasticmachine May 24, 2018
@elastic elastic deleted a comment from elasticmachine May 24, 2018
@elastic elastic deleted a comment from elasticmachine May 24, 2018
@elastic elastic deleted a comment from elasticmachine May 24, 2018
@elastic elastic deleted a comment from elasticmachine May 24, 2018
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

lgtm

// See https://github.com/elastic/kibana/issues/19351 for why this is necessary. Long story short, on certain
// linux platforms (fwiw, we have only experienced this on jenkins agents) the first bootup of chromium takes
// a long time doing something with fontconfig packages loading up a cache. The cdp command will timeout
// if we don't want for this manually. Note that this may still timeout based on the value of
Copy link
Contributor

Choose a reason for hiding this comment

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

is "want" supposed to be "wait"?

@elasticmachine
Copy link
Contributor

💔 Build Failed

@stacey-gammon
Copy link
Contributor Author

strange error that looks unrelated:

20:57:25  * [new ref]         refs/pull/727/merge -> origin/pr/727/merge
20:57:25  * [new ref]         refs/pull/7271/head -> origin/pr/7271/head
20:57:25  * [new ref]         refs/pull/7272/head -> origin/pr/7272/head
20:57:25  * [new ref]         refs/pull/7272/merge -> origin/pr/7272/merge
20:57:25  * [new ref]         refs/pull/7276/head -> origin/pr/7276/head
20:57:25 
20:57:25 	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1996)
20:57:25 	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1715)
20:57:25 	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
20:57:25 	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:405)
20:57:25 	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:860)
20:57:25 	... 12 more
20:57:25 ERROR: Error fetching remote repo 'origin'
20:57:25 Setting status of 35048dd6a2e32e5d93e61d5a02b2a61ac752350b to FAILURE with url https://kibana-ci.elastic.co/job/elastic-kibana-pull-request/3934/ and message: 'Build finished. '
20:57:25 Using context: kibana-ci
20:57:25 ## :broken_heart: Build Failed

@stacey-gammon
Copy link
Contributor Author

Rebased with master to make sure tests pass on the latest, since it's been awhile

Copy link
Contributor

@tylersmalley tylersmalley left a comment

Choose a reason for hiding this comment

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

Changes LGTM - just one nitpick comment which is unnecessary.


describe('chromium', () => {
before(async () => {
await esArchiver.load('../../../../test/functional/fixtures/es_archiver/dashboard/current/kibana');
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could assign ../../../../test/functional/fixtures/es_archiver/dashboard/current to a variable and use a template literal.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@stacey-gammon stacey-gammon merged commit c639deb into elastic:master Jun 5, 2018
stacey-gammon added a commit to stacey-gammon/kibana that referenced this pull request Jun 5, 2018
…elastic#19330)

* Move all reporting tests into their own folder to allow for multiple kibana.yml configuration tests, including chromium

* Add debugging and try to skip other tests an jenkins to speed things up

* More debug output

* more logging (remove other line which failed on jenkins)

* Remove no sandbox flag, it doesn't help

* Add fix for socket hangup and clean up tests

* fix path to logstash_functional

* Extend timeout for chromium, add verbose logging, add better comment, conditionally output curl command

* fix path... again

* Ah, other functional tests still need access to reporting page object, put it back

* fix sp err

* Add debug logs for screenshot stitching for png.bitblt error

* Fix tests that don't pass logger to screenshotStitcher

* Fix logger being undefined

* Add more debug output

* png has data, too much info to spit out

* Add comment with link to issue for extra debug messages so they can be left in since so many passes

* Dont use spawnSync with curl, use http.request instead, more support for it

* Comment out chromium tests for now to avoid flakiness

* Wait... lets at least make sure the other fix worked (the http.request instead of spawnsync and curl)

* New http.request code doesn't seem to work on jenkins, timing out after 10 secs maybe

* go back to spawnsync to see if it's an issue with the rxjs code or the http.request code

* I think I figured it out...

* Comment out tests to avoid flaky png error in the screenshot stitcher

* Use a const for OSS archive path

* use path.resolve correctly.
stacey-gammon added a commit that referenced this pull request Jun 6, 2018
…#19330) (#19690)

* Move all reporting tests into their own folder to allow for multiple kibana.yml configuration tests, including chromium

* Add debugging and try to skip other tests an jenkins to speed things up

* More debug output

* more logging (remove other line which failed on jenkins)

* Remove no sandbox flag, it doesn't help

* Add fix for socket hangup and clean up tests

* fix path to logstash_functional

* Extend timeout for chromium, add verbose logging, add better comment, conditionally output curl command

* fix path... again

* Ah, other functional tests still need access to reporting page object, put it back

* fix sp err

* Add debug logs for screenshot stitching for png.bitblt error

* Fix tests that don't pass logger to screenshotStitcher

* Fix logger being undefined

* Add more debug output

* png has data, too much info to spit out

* Add comment with link to issue for extra debug messages so they can be left in since so many passes

* Dont use spawnSync with curl, use http.request instead, more support for it

* Comment out chromium tests for now to avoid flakiness

* Wait... lets at least make sure the other fix worked (the http.request instead of spawnsync and curl)

* New http.request code doesn't seem to work on jenkins, timing out after 10 secs maybe

* go back to spawnsync to see if it's an issue with the rxjs code or the http.request code

* I think I figured it out...

* Comment out tests to avoid flaky png error in the screenshot stitcher

* Use a const for OSS archive path

* use path.resolve correctly.
kindsun pushed a commit that referenced this pull request Jun 12, 2018
…#19330)

* Move all reporting tests into their own folder to allow for multiple kibana.yml configuration tests, including chromium

* Add debugging and try to skip other tests an jenkins to speed things up

* More debug output

* more logging (remove other line which failed on jenkins)

* Remove no sandbox flag, it doesn't help

* Add fix for socket hangup and clean up tests

* fix path to logstash_functional

* Extend timeout for chromium, add verbose logging, add better comment, conditionally output curl command

* fix path... again

* Ah, other functional tests still need access to reporting page object, put it back

* fix sp err

* Add debug logs for screenshot stitching for png.bitblt error

* Fix tests that don't pass logger to screenshotStitcher

* Fix logger being undefined

* Add more debug output

* png has data, too much info to spit out

* Add comment with link to issue for extra debug messages so they can be left in since so many passes

* Dont use spawnSync with curl, use http.request instead, more support for it

* Comment out chromium tests for now to avoid flakiness

* Wait... lets at least make sure the other fix worked (the http.request instead of spawnsync and curl)

* New http.request code doesn't seem to work on jenkins, timing out after 10 secs maybe

* go back to spawnsync to see if it's an issue with the rxjs code or the http.request code

* I think I figured it out...

* Comment out tests to avoid flaky png error in the screenshot stitcher

* Use a const for OSS archive path

* use path.resolve correctly.
maryia-lapata pushed a commit to maryia-lapata/kibana that referenced this pull request Jun 25, 2018
…elastic#19330)

* Move all reporting tests into their own folder to allow for multiple kibana.yml configuration tests, including chromium

* Add debugging and try to skip other tests an jenkins to speed things up

* More debug output

* more logging (remove other line which failed on jenkins)

* Remove no sandbox flag, it doesn't help

* Add fix for socket hangup and clean up tests

* fix path to logstash_functional

* Extend timeout for chromium, add verbose logging, add better comment, conditionally output curl command

* fix path... again

* Ah, other functional tests still need access to reporting page object, put it back

* fix sp err

* Add debug logs for screenshot stitching for png.bitblt error

* Fix tests that don't pass logger to screenshotStitcher

* Fix logger being undefined

* Add more debug output

* png has data, too much info to spit out

* Add comment with link to issue for extra debug messages so they can be left in since so many passes

* Dont use spawnSync with curl, use http.request instead, more support for it

* Comment out chromium tests for now to avoid flakiness

* Wait... lets at least make sure the other fix worked (the http.request instead of spawnsync and curl)

* New http.request code doesn't seem to work on jenkins, timing out after 10 secs maybe

* go back to spawnsync to see if it's an issue with the rxjs code or the http.request code

* I think I figured it out...

* Comment out tests to avoid flaky png error in the screenshot stitcher

* Use a const for OSS archive path

* use path.resolve correctly.
@stacey-gammon stacey-gammon deleted the 2018-05-chromium-tests branch June 11, 2019 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead test v6.4.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants