Skip to content

Conversation

@smith
Copy link
Contributor

@smith smith commented Mar 22, 2020

Backports the following commits to 7.x:

Remove the getCytoscapeElements function.

On the server:

* Replace `source` with `sourceData`, `destination` with `targetData`, `source.id` with `source`, and `destination.id` with `target`.
* Return a single array as an `elements` property instead of `nodes` and `connections`
* Map all of the items data to be inside of a `data` object
* Replace SERVICE_AGENT_NAME with AGENT_NAME
* Add some missing constants

On the client:

* Remove getCytoscapeElements
* Move all presentation-specific data transformation to use the original attributes in the place where they're needed
* Remove `href` since it wasn't being used
* Move BetaBadge to its own file
* Move cytoscapeDivStyle to cytoscapeOptions
* Fix storybook to work with new data formats
@smith smith added the backport This PR is a backport of another PR label Mar 22, 2020
@smith
Copy link
Contributor Author

smith commented Mar 23, 2020

retest

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/uptime/settings·ts.Uptime app with generated data uptime settings page loads the default settings

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 3 times on tracked branches: https://github.com/elastic/kibana/issues/60866

[00:00:00]       │
[00:00:00]         └-: Uptime app
[00:00:00]           └-> "before all" hook
[00:00:00]           └-: with generated data
[00:00:00]             └-> "before all" hook
[00:00:28]             └-: uptime settings page
[00:00:28]               └-> "before all" hook
[00:00:28]               └-> loads the default settings
[00:00:28]                 └-> "before each" hook: global before each
[00:00:28]                 └-> "before each" hook: delete settings
[00:00:28]                   │ debg Deleting saved object [object Object]/%s
[00:00:28]                 └-> "before each" hook: load heartbeat data
[00:00:29]                   │ info [uptime/blank] Loading "mappings.json"
[00:00:29]                   │ info [uptime/blank] Loading "data.json"
[00:00:29]                   │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584926599612042410] [heartbeat-7-generated-test] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:29]                   │ info [uptime/blank] Created index "heartbeat-7-generated-test"
[00:00:29]                   │ debg [uptime/blank] "heartbeat-7-generated-test" settings {"index":{"mapping":{"total_fields":{"limit":"10000"}},"number_of_replicas":"1","number_of_shards":"1","query":{"default_field":["message","tags","agent.ephemeral_id","agent.id","agent.name","agent.type","agent.version","as.organization.name","client.address","client.as.organization.name","client.domain","client.geo.city_name","client.geo.continent_name","client.geo.country_iso_code","client.geo.country_name","client.geo.name","client.geo.region_iso_code","client.geo.region_name","client.mac","client.user.domain","client.user.email","client.user.full_name","client.user.group.id","client.user.group.name","client.user.hash","client.user.id","client.user.name","cloud.account.id","cloud.availability_zone","cloud.instance.id","cloud.instance.name","cloud.machine.type","cloud.provider","cloud.region","container.id","container.image.name","container.image.tag","container.name","container.runtime","destination.address","destination.as.organization.name","destination.domain","destination.geo.city_name","destination.geo.continent_name","destination.geo.country_iso_code","destination.geo.country_name","destination.geo.name","destination.geo.region_iso_code","destination.geo.region_name","destination.mac","destination.user.domain","destination.user.email","destination.user.full_name","destination.user.group.id","destination.user.group.name","destination.user.hash","destination.user.id","destination.user.name","dns.answers.class","dns.answers.data","dns.answers.name","dns.answers.type","dns.header_flags","dns.id","dns.op_code","dns.question.class","dns.question.name","dns.question.registered_domain","dns.question.type","dns.response_code","dns.type","ecs.version","error.code","error.id","error.message","event.action","event.category","event.code","event.dataset","event.hash","event.id","event.kind","event.module","event.original","event.outcome","event.provider","event.timezone","event.type","file.device","file.directory","file.extension","file.gid","file.group","file.hash.md5","file.hash.sha1","file.hash.sha256","file.hash.sha512","file.inode","file.mode","file.name","file.owner","file.path","file.target_path","file.type","file.uid","geo.city_name","geo.continent_name","geo.country_iso_code","geo.country_name","geo.name","geo.region_iso_code","geo.region_name","group.id","group.name","hash.md5","hash.sha1","hash.sha256","hash.sha512","host.architecture","host.geo.city_name","host.geo.continent_name","host.geo.country_iso_code","host.geo.country_name","host.geo.name","host.geo.region_iso_code","host.geo.region_name","host.hostname","host.id","host.mac","host.name","host.os.family","host.os.full","host.os.kernel","host.os.name","host.os.platform","host.os.version","host.type","host.user.domain","host.user.email","host.user.full_name","host.user.group.id","host.user.group.name","host.user.hash","host.user.id","host.user.name","http.request.body.content","http.request.method","http.request.referrer","http.response.body.content","http.version","log.level","log.logger","log.original","network.application","network.community_id","network.direction","network.iana_number","network.name","network.protocol","network.transport","network.type","observer.geo.city_name","observer.geo.continent_name","observer.geo.country_iso_code","observer.geo.country_name","observer.geo.name","observer.geo.region_iso_code","observer.geo.region_name","observer.hostname","observer.mac","observer.os.family","observer.os.full","observer.os.kernel","observer.os.name","observer.os.platform","observer.os.version","observer.serial_number","observer.type","observer.vendor","observer.version","organization.id","organization.name","os.family","os.full","os.kernel","os.name","os.platform","os.version","process.args","process.executable","process.hash.md5","process.hash.sha1","process.hash.sha256","process.hash.sha512","process.name","process.thread.name","process.title","process.working_directory","server.address","server.as.organization.name","server.domain","server.geo.city_name","server.geo.continent_name","server.geo.country_iso_code","server.geo.country_name","server.geo.name","server.geo.region_iso_code","server.geo.region_name","server.mac","server.user.domain","server.user.email","server.user.full_name","server.user.group.id","server.user.group.name","server.user.hash","server.user.id","server.user.name","service.ephemeral_id","service.id","service.name","service.state","service.type","service.version","source.address","source.as.organization.name","source.domain","source.geo.city_name","source.geo.continent_name","source.geo.country_iso_code","source.geo.country_name","source.geo.name","source.geo.region_iso_code","source.geo.region_name","source.mac","source.user.domain","source.user.email","source.user.full_name","source.user.group.id","source.user.group.name","source.user.hash","source.user.id","source.user.name","tracing.trace.id","tracing.transaction.id","url.domain","url.fragment","url.full","url.original","url.password","url.path","url.query","url.scheme","url.username","user.domain","user.email","user.full_name","user.group.id","user.group.name","user.hash","user.id","user.name","user_agent.device.name","user_agent.name","user_agent.original","user_agent.os.family","user_agent.os.full","user_agent.os.kernel","user_agent.os.name","user_agent.os.platform","user_agent.os.version","user_agent.version","agent.hostname","error.type","timeseries.instance","cloud.project.id","cloud.image.id","host.os.build","host.os.codename","kubernetes.pod.name","kubernetes.pod.uid","kubernetes.namespace","kubernetes.node.name","kubernetes.replicaset.name","kubernetes.deployment.name","kubernetes.statefulset.name","kubernetes.container.name","kubernetes.container.image","jolokia.agent.version","jolokia.agent.id","jolokia.server.product","jolokia.server.version","jolokia.server.vendor","jolokia.url","monitor.type","monitor.name","monitor.id","monitor.status","monitor.check_group","http.response.body.hash","fields.*"]},"refresh_interval":"5s"}}
[00:00:29]                 └-> "before each" hook: navigate to clean app root
[00:00:29]                   │ debg navigating to uptime url: http://localhost:6161/app/uptime
[00:00:29]                   │ debg Navigate to: http://localhost:6161/app/uptime
[00:00:29]                   │ debg ... sleep(700) start
[00:00:29]                   │ debg browser[INFO] http://localhost:6161/app/uptime?_t=1584929409593 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:29]                   │
[00:00:29]                   │ debg browser[INFO] http://localhost:6161/bundles/app/uptime/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:30]                   │ debg ... sleep(700) end
[00:00:30]                   │ debg returned from get, calling refresh
[00:00:30]                   │ debg browser[INFO] http://localhost:6161/app/uptime?_t=1584929409593 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:30]                   │
[00:00:30]                   │ debg browser[INFO] http://localhost:6161/bundles/app/uptime/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:30]                   │ debg currentUrl = http://localhost:6161/app/uptime
[00:00:30]                   │          appUrl = http://localhost:6161/app/uptime
[00:00:30]                   │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:35]                   │ debg browser[INFO] http://localhost:6161/bundles/plugin/data/data.plugin.js 96:139970 "INFO: 2020-03-23T02:10:14Z
[00:00:35]                   │        Adding connection to http://localhost:6161/elasticsearch
[00:00:35]                   │
[00:00:35]                   │      "
[00:00:35]                   │ debg ... sleep(501) start
[00:00:36]                   │ debg ... sleep(501) end
[00:00:36]                   │ debg in navigateTo url = http://localhost:6161/app/uptime#/
[00:00:36]                   │ debg TestSubjects.exists(statusPageContainer)
[00:00:36]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:00:38]                   │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:00:39]                 │ debg TestSubjects.click(settings-page-link)
[00:00:39]                 │ debg Find.clickByCssSelector('[data-test-subj="settings-page-link"]') with timeout=5000
[00:00:39]                 │ debg Find.findByCssSelector('[data-test-subj="settings-page-link"]') with timeout=5000
[00:00:39]                 │ debg TestSubjects.find(heartbeat-indices-input)
[00:00:39]                 │ debg Find.findByCssSelector('[data-test-subj="heartbeat-indices-input"]') with timeout=5000
[00:00:39]                 │ info Taking screenshot "/dev/shm/workspace/kibana/x-pack/test/functional/screenshots/failure/Uptime app with generated data uptime settings page loads the default settings.png"
[00:00:39]                 │ info Current URL is: http://localhost:6161/app/uptime#/settings
[00:00:39]                 │ info Saving page source to: /dev/shm/workspace/kibana/x-pack/test/functional/failure_debug/html/Uptime app with generated data uptime settings page loads the default settings.html
[00:00:39]                 └- ✖ fail: "Uptime app with generated data uptime settings page loads the default settings"
[00:00:39]                 │

Stack Trace

{ Error: expected { heartbeatIndices: '' } to sort of equal { heartbeatIndices: 'heartbeat*' }
    at Assertion.assert (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.eql (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:244:8)
    at Context.it (test/functional/apps/uptime/settings.ts:31:25)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  actual: '{\n  "heartbeatIndices": ""\n}',
  expected: '{\n  "heartbeatIndices": "heartbeat*"\n}',
  showDiff: true }

History

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

@smith smith merged commit 756deb7 into elastic:7.x Mar 23, 2020
@smith smith deleted the backport/7.x/pr-60701 branch March 23, 2020 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants