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

[Reporting] Use fork of Puppeteer #87415

Merged
merged 1 commit into from
Jan 6, 2021

Conversation

tylersmalley
Copy link
Contributor

@tylersmalley tylersmalley commented Jan 6, 2021

Applies a patch to resolve a known issue where specifying a Chrome executable is ignored on ARM.

elastic/puppeteer@2ebf748

Fixes #87242

@tylersmalley tylersmalley added blocker (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead Team:AppServices Team:Operations Team label for Operations Team v7.11.0 v7.12.0 v8.0.0 labels Jan 6, 2021
@tylersmalley tylersmalley requested a review from tsullivan January 6, 2021 00:30
Applies a patch to resolve a known issue where specifying a Chrome
executable is ignored on ARM.

elastic/puppeteer@2ebf748#diff-d09eb6dc12121ed413d2820db7fa8ba1dff9260a2ad2486a6220c861a8e5e673

Signed-off-by: Tyler Smalley <[email protected]>
@tylersmalley
Copy link
Contributor Author

@tylersmalley
Copy link
Contributor Author

  log   [01:27:40.118] [info][PNG][execute][kjkqs5d36dcnbdd7eadnqw4c][plugins][reporting] handled 141 page requests
  log   [01:27:57.192] [info][PNG][execute][kjkqs5d36dcnbdd7eadnqw4c][plugins][reporting] timeRange: Dec 29, 2020 @ 17:27:41.546 to Jan 5, 2021 @ 17:27:41.547
  log   [01:27:57.196] [info][PNG][execute][kjkqs5d36dcnbdd7eadnqw4c][plugins][reporting] taking screenshots
  log   [01:27:59.660] [info][PNG][execute][kjkqs5d36dcnbdd7eadnqw4c][plugins][reporting] screenshots taken: 1
  log   [01:27:59.665] [info][esqueue][plugins][queue-worker][reporting] kjkqrvlf6dcnbdd7ea2qqkw8 - Job execution completed successfully
  log   [01:27:59.827] [info][esqueue][plugins][queue-worker][reporting] kjkqrvlf6dcnbdd7ea2qqkw8 - Job data saved successfully: /.reporting-2021-01-03/_doc/kjkqs5d36dcnbdd7eadnqw4c

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Chrome X-Pack UI Plugin Functional Tests.x-pack/test/plugin_functional/test_suites/resolver.Resolver test app when the user is interacting with the node with ID: secondChild when the user hovers over the primary button when the user has clicked the primary button (which selects the node.) should render as expected

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches

[00:00:00]       │
[00:00:00]         └-: Resolver test app
[00:00:00]           └-> "before all" hook
[00:00:00]           └-> "before all" hook
[00:00:00]             │ debg navigating to resolverTest url: http://localhost:6121/app/resolverTest
[00:00:00]             │ debg navigate to: http://localhost:6121/app/resolverTest
[00:00:00]             │ debg browser[INFO] http://localhost:6121/login?next=%2Fapp%2FresolverTest%3F_t%3D1609897638811 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:00]             │
[00:00:00]             │ debg browser[INFO] http://localhost:6121/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:00]             │ debg ... sleep(700) start
[00:00:00]             │ debg ... sleep(700) end
[00:00:00]             │ debg returned from get, calling refresh
[00:00:01]             │ debg currentUrl = http://localhost:6121/login?next=%2Fapp%2FresolverTest%3F_t%3D1609897638811
[00:00:01]             │          appUrl = http://localhost:6121/app/resolverTest
[00:00:01]             │ debg TestSubjects.find(kibanaChrome)
[00:00:01]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:01]             │ debg browser[INFO] http://localhost:6121/login?next=%2Fapp%2FresolverTest%3F_t%3D1609897638811 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:01]             │
[00:00:01]             │ debg browser[INFO] http://localhost:6121/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:03]             │ debg Found login page
[00:00:03]             │ debg TestSubjects.setValue(loginUsername, test_user)
[00:00:03]             │ debg TestSubjects.click(loginUsername)
[00:00:03]             │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:00:03]             │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:00:03]             │ debg TestSubjects.setValue(loginPassword, changeme)
[00:00:03]             │ debg TestSubjects.click(loginPassword)
[00:00:03]             │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:00:03]             │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:00:03]             │ debg TestSubjects.click(loginSubmit)
[00:00:03]             │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:00:03]             │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:00:03]             │ debg Find.waitForDeletedByCssSelector('.kibanaWelcomeLogo') with timeout=10000
[00:00:03]             │ proc [kibana]   log   [01:47:22.373] [info][plugins][routes][security] Logging in with provider "basic" (basic)
[00:00:04]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:04]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"] nav:not(.ng-hide)') with timeout=60000
[00:00:06]             │ debg browser[INFO] http://localhost:6121/app/resolverTest?_t=1609897638811 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:06]             │
[00:00:06]             │ debg browser[INFO] http://localhost:6121/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:07]             │ debg browser[INFO] http://localhost:6121/app/resolverTest?_t=1609897645600 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:07]             │
[00:00:07]             │ debg browser[INFO] http://localhost:6121/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:07]             │ debg Finished login process currentUrl = http://localhost:6121/app/resolverTest
[00:00:07]             │ debg ... sleep(501) start
[00:00:08]             │ debg ... sleep(501) end
[00:00:08]             │ debg in navigateTo url = http://localhost:6121/app/resolverTest
[00:00:08]             │ debg TestSubjects.exists(statusPageContainer)
[00:00:08]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:00:11]             │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:00:11]             │ debg ======browser======== setWindowSize 3840 2400
[00:00:11]             │ debg ======browser======== actual initial screenshot size width=1200, height=800
[00:00:12]             │ debg ======browser======== actual second screenshot size width= 600, height=400
[00:00:12]             │ debg ======browser======== calculated values xBorder= 0, yBorder=0, xScaling=1, yScaling=1
[00:00:12]             │ debg ======browser======== setting browser size to 3840 x 2400
[00:00:13]             │ debg ======browser======== final screenshot size width=3840, height=2400
[00:00:13]           └-> renders at least one node
[00:00:13]             └-> "before each" hook: global before each
[00:00:13]             │ debg TestSubjects.exists(resolver:node)
[00:00:13]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="resolver:node"]') with timeout=120000
[00:00:13]             └- ✓ pass  (71ms) "Resolver test app renders at least one node"
[00:00:13]           └-> renders a node list
[00:00:13]             └-> "before each" hook: global before each
[00:00:13]             │ debg TestSubjects.exists(resolver:node-list)
[00:00:13]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="resolver:node-list"]') with timeout=120000
[00:00:13]             └- ✓ pass  (31ms) "Resolver test app renders a node list"
[00:00:13]           └-> renders at least one edge line
[00:00:13]             └-> "before each" hook: global before each
[00:00:13]             │ debg TestSubjects.exists(resolver:graph:edgeline)
[00:00:13]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="resolver:graph:edgeline"]') with timeout=120000
[00:00:13]             └- ✓ pass  (69ms) "Resolver test app renders at least one edge line"
[00:00:13]           └-> renders graph controls
[00:00:13]             └-> "before each" hook: global before each
[00:00:13]             │ debg TestSubjects.exists(resolver:graph-controls)
[00:00:13]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="resolver:graph-controls"]') with timeout=120000
[00:00:13]             └- ✓ pass  (26ms) "Resolver test app renders graph controls"
[00:00:13]           └-: when the user is interacting with the node with ID: origin
[00:00:13]             └-> "before all" hook
[00:00:39]           └-: when the user is interacting with the node with ID: secondChild
[00:00:39]             └-> "before all" hook
[00:00:39]             └-> should render as expected
[00:00:39]               └-> "before each" hook: global before each
[00:00:39]               └-> "before each" hook
[00:00:39]               │ debg Find.findByCssSelector('[data-test-resolver-node-id="secondChild"]') with timeout=10000
[00:00:39]               │ debg compareAgainstBaseline
[00:00:39]               │ info Taking screenshot "/dev/shm/workspace/parallel/2/kibana/x-pack/test/plugin_functional/screenshots/session/second_child.png"
[00:00:40]               │ debg comparePngs: /dev/shm/workspace/parallel/2/kibana/x-pack/test/plugin_functional/screenshots/session/second_child.png vs /dev/shm/workspace/parallel/2/kibana/x-pack/test/plugin_functional/screenshots/baseline/second_child.png
[00:00:40]               │ debg calculating diff pixels...
[00:00:40]               │ debg percent different: 0.04666666666666667
[00:00:40]               └- ✓ pass  (1.3s) "Resolver test app when the user is interacting with the node with ID: secondChild should render as expected"
[00:00:40]             └-: when the user hovers over the primary button
[00:00:40]               └-> "before all" hook
[00:00:40]               └-> should render as expected
[00:00:40]                 └-> "before each" hook: global before each
[00:00:40]                 └-> "before each" hook
[00:00:40]                 └-> "before each" hook
[00:00:40]                   │ debg Find.findByCssSelector('[data-test-resolver-node-id="secondChild"]') with timeout=10000
[00:00:40]                 │ debg Find.findByCssSelector('[data-test-resolver-node-id="secondChild"]') with timeout=10000
[00:00:40]                 │ debg compareAgainstBaseline
[00:00:40]                 │ info Taking screenshot "/dev/shm/workspace/parallel/2/kibana/x-pack/test/plugin_functional/screenshots/session/second_child_with_primary_button_hovered.png"
[00:00:42]                 │ debg comparePngs: /dev/shm/workspace/parallel/2/kibana/x-pack/test/plugin_functional/screenshots/session/second_child_with_primary_button_hovered.png vs /dev/shm/workspace/parallel/2/kibana/x-pack/test/plugin_functional/screenshots/baseline/second_child_with_primary_button_hovered.png
[00:00:42]                 │ debg calculating diff pixels...
[00:00:42]                 │ debg percent different: 0.05201388888888889
[00:00:42]                 └- ✓ pass  (1.3s) "Resolver test app when the user is interacting with the node with ID: secondChild when the user hovers over the primary button should render as expected"
[00:00:42]               └-: when the user has clicked the primary button (which selects the node.)
[00:00:42]                 └-> "before all" hook
[00:00:42]                 └-> should render as expected
[00:00:42]                   └-> "before each" hook: global before each
[00:00:42]                   └-> "before each" hook
[00:00:42]                   └-> "before each" hook
[00:00:42]                     │ debg Find.findByCssSelector('[data-test-resolver-node-id="secondChild"]') with timeout=10000
[00:00:42]                   └-> "before each" hook
[00:00:43]                   │ debg Find.findByCssSelector('[data-test-resolver-node-id="secondChild"]') with timeout=10000
[00:00:43]                   │ debg compareAgainstBaseline
[00:00:43]                   │ info Taking screenshot "/dev/shm/workspace/parallel/2/kibana/x-pack/test/plugin_functional/screenshots/session/second_child_selected_with_primary_button_hovered.png"
[00:00:44]                   │ debg comparePngs: /dev/shm/workspace/parallel/2/kibana/x-pack/test/plugin_functional/screenshots/session/second_child_selected_with_primary_button_hovered.png vs /dev/shm/workspace/parallel/2/kibana/x-pack/test/plugin_functional/screenshots/baseline/second_child_selected_with_primary_button_hovered.png
[00:00:44]                   │ debg calculating diff pixels...
[00:00:44]                   │ debg percent different: 0.09599537037037037
[00:00:44]                   │ info Taking screenshot "/dev/shm/workspace/parallel/2/kibana/x-pack/test/plugin_functional/screenshots/failure/Resolver test app when the user is interacting with the node with ID_ secondChild when the user hovers over the primary button when the user has clicked the primary button _which selects the node_ should render as expected.png"
[00:00:45]                   │ info Current URL is: http://localhost:6121/app/resolverTest?resolver-test=(panelParameters%3A(nodeID%3AsecondChild)%2CpanelView%3AnodeDetail)
[00:00:45]                   │ info Saving page source to: /dev/shm/workspace/parallel/2/kibana/x-pack/test/plugin_functional/failure_debug/html/Resolver test app when the user is interacting with the node with ID_ secondChild when the user hovers over the primary button when the user has clicked the primary button _which selects the node_ should render as expected.html
[00:00:45]                   └- ✖ fail: Resolver test app when the user is interacting with the node with ID: secondChild when the user hovers over the primary button when the user has clicked the primary button (which selects the node.) should render as expected
[00:00:45]                   │      Error: expected 0.09599537037037037 to be below 0.09
[00:00:45]                   │       at Assertion.assert (/dev/shm/workspace/parallel/2/kibana/packages/kbn-expect/expect.js:100:11)
[00:00:45]                   │       at Assertion.lessThan.Assertion.below (/dev/shm/workspace/parallel/2/kibana/packages/kbn-expect/expect.js:336:8)
[00:00:45]                   │       at Function.lessThan (/dev/shm/workspace/parallel/2/kibana/packages/kbn-expect/expect.js:531:15)
[00:00:45]                   │       at Context.<anonymous> (test/plugin_functional/test_suites/resolver/index.ts:119:23)
[00:00:45]                   │       at Object.apply (/dev/shm/workspace/parallel/2/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16)
[00:00:45]                   │ 
[00:00:45]                   │ 

Stack Trace

Error: expected 0.09599537037037037 to be below 0.09
    at Assertion.assert (/dev/shm/workspace/parallel/2/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.lessThan.Assertion.below (/dev/shm/workspace/parallel/2/kibana/packages/kbn-expect/expect.js:336:8)
    at Function.lessThan (/dev/shm/workspace/parallel/2/kibana/packages/kbn-expect/expect.js:531:15)
    at Context.<anonymous> (test/plugin_functional/test_suites/resolver/index.ts:119:23)
    at Object.apply (/dev/shm/workspace/parallel/2/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16)

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
enterpriseSearch 1.8MB 1.8MB +30.0B

Distributable file count

id before after diff
default 47260 48023 +763

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
upgradeAssistant 60.0KB 60.0KB +30.0B

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@tylersmalley tylersmalley marked this pull request as ready for review January 6, 2021 05:04
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@elasticmachine
Copy link
Contributor

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

@tylersmalley tylersmalley added the release_note:skip Skip the PR/issue when compiling release notes label Jan 6, 2021
Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

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

LGTM

I made a local build of a patched 7.11, and in Ubuntu arm64 I saw Chromium successfully launch

@tylersmalley tylersmalley merged commit 1238d55 into elastic:master Jan 6, 2021
tylersmalley pushed a commit to tylersmalley/kibana that referenced this pull request Jan 6, 2021
Applies a patch to resolve a known issue where specifying a Chrome
executable is ignored on ARM.

elastic/puppeteer@2ebf748#diff-d09eb6dc12121ed413d2820db7fa8ba1dff9260a2ad2486a6220c861a8e5e673

Signed-off-by: Tyler Smalley <[email protected]>
tylersmalley pushed a commit to tylersmalley/kibana that referenced this pull request Jan 6, 2021
Applies a patch to resolve a known issue where specifying a Chrome
executable is ignored on ARM.

elastic/puppeteer@2ebf748#diff-d09eb6dc12121ed413d2820db7fa8ba1dff9260a2ad2486a6220c861a8e5e673

Signed-off-by: Tyler Smalley <[email protected]>
tylersmalley pushed a commit that referenced this pull request Jan 6, 2021
Applies a patch to resolve a known issue where specifying a Chrome
executable is ignored on ARM.

elastic/puppeteer@2ebf748#diff-d09eb6dc12121ed413d2820db7fa8ba1dff9260a2ad2486a6220c861a8e5e673

Signed-off-by: Tyler Smalley <[email protected]>
tylersmalley pushed a commit that referenced this pull request Jan 6, 2021
Applies a patch to resolve a known issue where specifying a Chrome
executable is ignored on ARM.

elastic/puppeteer@2ebf748#diff-d09eb6dc12121ed413d2820db7fa8ba1dff9260a2ad2486a6220c861a8e5e673

Signed-off-by: Tyler Smalley <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.11.0 v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reporting causes a fatal Kibana error if chromium is not installed on aarch64
4 participants