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

Remove circular dependecy between apm and infra #89739

Merged
merged 2 commits into from
Feb 1, 2021

Conversation

smith
Copy link
Contributor

@smith smith commented Jan 29, 2021

  • Move getTraceUrl in the APM plugin to getApmTraceUrl in the observability plugin and use that instead in infra.
  • Remove unused APM plugin dependency in infra.
  • Use pathname instead of hash in infra to apm link to avoid unnecessary redirect.

References #81003, #80508.

* Move `getTraceUrl` in the APM plugin to `getApmTraceUrl` in the observability plugin and use that instead in infra.
* Remove unused APM plugin depenency in infra.
* Use `pathname` instead of `hash` in infra to apm link to avoid unnecessary redirect.
@smith smith added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.12.0 labels Jan 29, 2021
@smith smith requested review from a team as code owners January 29, 2021 16:13
@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Jan 29, 2021
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@Zacqary Zacqary left a comment

Choose a reason for hiding this comment

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

LGTM

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / X-Pack Accessibility Tests.x-pack/test/accessibility/apps/uptime·ts.uptime overview alert popover controls

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:01:16]         └-: uptime
[00:01:16]           └-> "before all" hook
[00:01:16]           └-> "before all" hook
[00:01:16]             │ info [uptime/blank] Loading "mappings.json"
[00:01:16]             │ info [uptime/blank] Loading "data.json"
[00:01:16]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1612202228464869706] [heartbeat-8-generated-test] creating index, cause [api], templates [], shards [1]/[1]
[00:01:16]             │ info [uptime/blank] Created index "heartbeat-8-generated-test"
[00:01:16]             │ debg [uptime/blank] "heartbeat-8-generated-test" settings undefined
[00:01:17]           └-> overview page
[00:01:17]             └-> "before each" hook: global before each
[00:01:17]             └-> "before each" hook
[00:01:17]               │ debg TestSubjects.exists(uptimeSettingsToOverviewLink)
[00:01:17]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="uptimeSettingsToOverviewLink"]') with timeout=0
[00:01:17]               │ debg --- retry.tryForTime error: [data-test-subj="uptimeSettingsToOverviewLink"] is not displayed
[00:01:18]               │ debg navigating to uptime url: http://localhost:6111/app/uptime
[00:01:18]               │ debg navigate to: http://localhost:6111/app/uptime
[00:01:18]               │ debg browser[INFO] http://localhost:6111/app/uptime?_t=1612204292191 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:01:18]               │
[00:01:18]               │ debg browser[INFO] http://localhost:6111/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:01:18]               │ debg ... sleep(700) start
[00:01:19]               │ debg ... sleep(700) end
[00:01:19]               │ debg returned from get, calling refresh
[00:01:19]               │ debg browser[INFO] http://localhost:6111/app/uptime?_t=1612204292191 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:01:19]               │
[00:01:19]               │ debg browser[INFO] http://localhost:6111/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:01:19]               │ debg currentUrl = http://localhost:6111/app/uptime
[00:01:19]               │          appUrl = http://localhost:6111/app/uptime
[00:01:19]               │ debg TestSubjects.find(kibanaChrome)
[00:01:19]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:01:20]               │ debg ... sleep(501) start
[00:01:20]               │ debg ... sleep(501) end
[00:01:20]               │ debg in navigateTo url = http://localhost:6111/app/uptime
[00:01:20]               │ debg TestSubjects.exists(statusPageContainer)
[00:01:20]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:01:23]               │ERROR browser[SEVERE] http://localhost:6111/40025/bundles/plugin/uptime/uptime.chunk.1.js 2:18780 "API /api/uptime/monitor/list is not returning expected response, Invalid value \"undefined\" supplied to \"summaries.state.summaryPings.tls.server.x509.issuer.distinguished_name\",Invalid value \"undefined\" supplied to \"summaries.state.summaryPings.tls.server.x509.subject.distinguished_name\",Invalid value \"undefined\" supplied to \"summaries.state.summaryPings.tls.server.x509.serial_number\",Invalid value \"undefined\" supplied to \"summaries.state.summaryPings.tls.server.x509.public_key_algorithm\",Invalid value \"undefined\" supplied to \"summaries.state.summaryPings.tls.server.x509.signature_algorithm\",Invalid value \"undefined\" supplied to \"summaries.state.summaryPings.tls.server.x509.not_after\",Invalid value \"undefined\" supplied to \"summaries.state.summaryPings.tls.server.x509.not_before\" for response" Object
[00:01:23]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:01:23]               │ debg isGlobalLoadingIndicatorVisible
[00:01:23]               │ debg TestSubjects.exists(globalLoadingIndicator)
[00:01:23]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:01:25]               │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:01:25]               │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:01:25]               │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:01:25]               │ debg TestSubjects.exists(uptimeOverviewPage)
[00:01:25]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="uptimeOverviewPage"]') with timeout=2000
[00:01:26]             └- ✓ pass  (709ms) "uptime overview page"
[00:01:26]           └-> overview page with expanded monitor detail
[00:01:26]             └-> "before each" hook: global before each
[00:01:26]             └-> "before each" hook
[00:01:26]               │ debg TestSubjects.exists(uptimeSettingsToOverviewLink)
[00:01:26]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="uptimeSettingsToOverviewLink"]') with timeout=0
[00:01:26]               │ debg TestSubjects.click(uptimeSettingsToOverviewLink)
[00:01:26]               │ debg Find.clickByCssSelector('[data-test-subj="uptimeSettingsToOverviewLink"]') with timeout=10000
[00:01:26]               │ debg Find.findByCssSelector('[data-test-subj="uptimeSettingsToOverviewLink"]') with timeout=10000
[00:01:26]               │ debg isGlobalLoadingIndicatorVisible
[00:01:26]               │ debg TestSubjects.exists(globalLoadingIndicator)
[00:01:26]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:01:28]               │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:01:28]               │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:01:28]               │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:01:28]               │ debg TestSubjects.exists(uptimeOverviewPage)
[00:01:28]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="uptimeOverviewPage"]') with timeout=2000
[00:01:28]             │ debg TestSubjects.click(xpack.uptime.monitorList.a11yTestMonitor.expandMonitorDetail)
[00:01:28]             │ debg Find.clickByCssSelector('[data-test-subj="xpack.uptime.monitorList.a11yTestMonitor.expandMonitorDetail"]') with timeout=10000
[00:01:28]             │ debg Find.findByCssSelector('[data-test-subj="xpack.uptime.monitorList.a11yTestMonitor.expandMonitorDetail"]') with timeout=10000
[00:01:29]             │ debg TestSubjects.click(xpack.uptime.monitorList.actionsPopover.a11yTestMonitor)
[00:01:29]             │ debg Find.clickByCssSelector('[data-test-subj="xpack.uptime.monitorList.actionsPopover.a11yTestMonitor"]') with timeout=10000
[00:01:29]             │ debg Find.findByCssSelector('[data-test-subj="xpack.uptime.monitorList.actionsPopover.a11yTestMonitor"]') with timeout=10000
[00:01:29]             └- ✓ pass  (1.0s) "uptime overview page with expanded monitor detail"
[00:01:29]           └-> overview alert popover controls
[00:01:29]             └-> "before each" hook: global before each
[00:01:29]             └-> "before each" hook
[00:01:29]               │ debg TestSubjects.exists(uptimeSettingsToOverviewLink)
[00:01:29]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="uptimeSettingsToOverviewLink"]') with timeout=0
[00:01:30]               │ debg TestSubjects.click(uptimeSettingsToOverviewLink)
[00:01:30]               │ debg Find.clickByCssSelector('[data-test-subj="uptimeSettingsToOverviewLink"]') with timeout=10000
[00:01:30]               │ debg Find.findByCssSelector('[data-test-subj="uptimeSettingsToOverviewLink"]') with timeout=10000
[00:01:30]               │ debg isGlobalLoadingIndicatorVisible
[00:01:30]               │ debg TestSubjects.exists(globalLoadingIndicator)
[00:01:30]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:01:31]               │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:01:32]               │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:01:32]               │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:01:32]               │ debg TestSubjects.exists(uptimeOverviewPage)
[00:01:32]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="uptimeOverviewPage"]') with timeout=2000
[00:01:32]             │ debg TestSubjects.click(xpack.uptime.alertsPopover.toggleButton)
[00:01:32]             │ debg Find.clickByCssSelector('[data-test-subj="xpack.uptime.alertsPopover.toggleButton"]') with timeout=10000
[00:01:32]             │ debg Find.findByCssSelector('[data-test-subj="xpack.uptime.alertsPopover.toggleButton"]') with timeout=10000
[00:01:32]             │ info Taking screenshot "/dev/shm/workspace/parallel/1/kibana/x-pack/test/functional/screenshots/failure/uptime overview alert popover controls.png"
[00:01:33]             │ info Current URL is: http://localhost:6111/app/uptime
[00:01:33]             │ info Saving page source to: /dev/shm/workspace/parallel/1/kibana/x-pack/test/functional/failure_debug/html/uptime overview alert popover controls.html
[00:01:33]             └- ✖ fail: uptime overview alert popover controls
[00:01:33]             │      Error: a11y report:
[00:01:33]             │ 
[00:01:33]             │ VIOLATION
[00:01:33]             │   [aria-hidden-focus]: Ensures aria-hidden elements do not contain focusable elements
[00:01:33]             │     Help: https://dequeuniversity.com/rules/axe/4.0/aria-hidden-focus?application=axeAPI
[00:01:33]             │     Elements:
[00:01:33]             │       - #kibana-body
[00:01:33]             │       - div[data-focus-guard="true"][data-aria-hidden="true"][aria-hidden="true"]:nth-child(1)
[00:01:33]             │       - div[data-focus-guard="true"][data-aria-hidden="true"][aria-hidden="true"]:nth-child(2)
[00:01:33]             │       - div[data-focus-guard="true"][data-aria-hidden="true"][aria-hidden="true"]:nth-child(4)
[00:01:33]             │       at Accessibility.testAxeReport (/dev/shm/workspace/parallel/1/kibana/test/accessibility/services/a11y/a11y.ts:76:15)
[00:01:33]             │       at Accessibility.testAppSnapshot (/dev/shm/workspace/parallel/1/kibana/test/accessibility/services/a11y/a11y.ts:49:18)
[00:01:33]             │       at runMicrotasks (<anonymous>)
[00:01:33]             │       at processTicksAndRejections (internal/process/task_queues.js:93:5)
[00:01:33]             │       at Context.<anonymous> (test/accessibility/apps/uptime.ts:61:7)
[00:01:33]             │       at Object.apply (/dev/shm/workspace/parallel/1/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)
[00:01:33]             │ 
[00:01:33]             │ 

Stack Trace

Error: a11y report:

VIOLATION
  [aria-hidden-focus]: Ensures aria-hidden elements do not contain focusable elements
    Help: https://dequeuniversity.com/rules/axe/4.0/aria-hidden-focus?application=axeAPI
    Elements:
      - #kibana-body
      - div[data-focus-guard="true"][data-aria-hidden="true"][aria-hidden="true"]:nth-child(1)
      - div[data-focus-guard="true"][data-aria-hidden="true"][aria-hidden="true"]:nth-child(2)
      - div[data-focus-guard="true"][data-aria-hidden="true"][aria-hidden="true"]:nth-child(4)
    at Accessibility.testAxeReport (/dev/shm/workspace/parallel/1/kibana/test/accessibility/services/a11y/a11y.ts:76:15)
    at Accessibility.testAppSnapshot (/dev/shm/workspace/parallel/1/kibana/test/accessibility/services/a11y/a11y.ts:49:18)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at Context.<anonymous> (test/accessibility/apps/uptime.ts:61:7)
    at Object.apply (/dev/shm/workspace/parallel/1/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1739 1738 -1
observability 108 109 +1
total -0

Async chunks

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

id before after diff
infra 2.2MB 2.2MB -30.0B

Page load bundle

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

id before after diff
apm 23.2KB 22.9KB -264.0B
infra 172.3KB 172.1KB -230.0B
observability 36.3KB 36.8KB +578.0B
total +84.0B

History

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

@smith smith merged commit 5884dae into elastic:master Feb 1, 2021
@smith smith deleted the nls/infra-apm-dep branch February 1, 2021 20:09
smith added a commit to smith/kibana that referenced this pull request Feb 1, 2021
* Move `getTraceUrl` in the APM plugin to `getApmTraceUrl` in the observability plugin and use that instead in infra.
* Remove unused APM plugin depenency in infra.
* Use `pathname` instead of `hash` in infra to apm link to avoid unnecessary redirect.
smith added a commit that referenced this pull request Feb 2, 2021
* Move `getTraceUrl` in the APM plugin to `getApmTraceUrl` in the observability plugin and use that instead in infra.
* Remove unused APM plugin depenency in infra.
* Use `pathname` instead of `hash` in infra to apm link to avoid unnecessary redirect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants