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

[Graph] Fix sample data url #66394

Closed
wants to merge 1 commit into from

Conversation

sulemanof
Copy link
Contributor

Summary

Found a really strange thing in apps using angular hash routing, while testing legacy apps switched on using NP core registry. Next weird behavior was fixed for all of the cases I found in #63443, except Graph app:

  1. Go to Home sample data
  2. Go to view sample Graph data

image

  1. When your workspace is loaded, go to Graph app again via main navigation sidebar

image

  1. Open the same workspace from the listing page
  2. See that weird image you have:

image

Looks like the workspace is loaded twice.

This simple PR fixes that weird thing 😀

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@sulemanof
Copy link
Contributor Author

Closed in respect of #66358

@sulemanof sulemanof closed this May 13, 2020
@kibanamachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps


Test Failures

Kibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/reporting_management/report_delete_pagination·ts.reporting management app Delete reports "before all" hook for "Confirm single report deletion works"

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:37:17]         └-: reporting management app
[00:37:17]           └-> "before all" hook
[00:37:17]           └-: Delete reports
[00:37:17]             └-> "before all" hook
[00:37:17]             └-> "before all" hook
[00:37:17]               │ debg set roles = global_discover_read,reporting_user
[00:37:17]               │ debg creating user test_user
[00:37:17]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xl-1589375426799868105] updated user [test_user]
[00:37:17]               │ debg created user test_user
[00:37:17]               │ debg TestSubjects.exists(kibanaChrome)
[00:37:17]               │ debg Find.existsByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=2500
[00:37:17]               │ debg TestSubjects.find(kibanaChrome)
[00:37:17]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=100000
[00:37:17]               │ debg browser[INFO] http://localhost:6181/app/kibana?_t=1589380034220#/management/elasticsearch/index_lifecycle_management/policies 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:37:17]               │
[00:37:17]               │ debg browser[INFO] http://localhost:6181/bundles/app/kibana/bootstrap.js 10:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:37:20]               │ debg browser[INFO] http://localhost:6181/33108/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 380:106115 "INFO: 2020-05-13T14:27:26Z
[00:37:20]               │        Adding connection to http://localhost:6181/elasticsearch
[00:37:20]               │
[00:37:20]               │      "
[00:37:20]               │ info [empty_kibana] Loading "mappings.json"
[00:37:21]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1589375426799868105] [.kibana_1/kkU_ZLpbTti6JPEtnjOzSw] deleting index
[00:37:21]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1589375426799868105] [.kibana_2/EQpInqN2SXekBzNW1oTtug] deleting index
[00:37:21]               │ info [empty_kibana] Deleted existing index [".kibana_2",".kibana_1"]
[00:37:21]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589375426799868105] applying create index request using v1 templates []
[00:37:21]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589375426799868105] [.kibana] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:37:21]               │ERROR browser[SEVERE] http://localhost:6181/api/index_lifecycle_management/policies - Failed to load resource: the server responded with a status of 403 (Forbidden)
[00:37:21]               │ERROR browser[SEVERE] http://localhost:6181/api/saved_objects/_bulk_get - Failed to load resource: the server responded with a status of 403 (Forbidden)
[00:37:21]               │ info [empty_kibana] Created index ".kibana"
[00:37:21]               │ debg [empty_kibana] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:37:21]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xl-1589375426799868105] [.kibana/-eOrOnruR3yhBAu4-jfpyA] update_mapping [_doc]
[00:37:21]               │ debg Migrating saved objects
[00:37:21]               │ debg browser[INFO] http://localhost:6181/33108/bundles/commons.bundle.js 2:1143010 "Detected an unhandled Promise rejection.
[00:37:21]               │      Error: Forbidden"
[00:37:21]               │ERROR browser[SEVERE] http://localhost:6181/33108/bundles/commons.bundle.js 2:364683 
[00:37:21]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xl-1589375426799868105] [.kibana/-eOrOnruR3yhBAu4-jfpyA] update_mapping [_doc]
[00:37:22]               │ proc [kibana]   log   [14:27:27.867] [info][savedobjects-service] Creating index .kibana_2.
[00:37:22]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589375426799868105] applying create index request using v1 templates []
[00:37:22]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589375426799868105] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:37:22]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1589375426799868105] updating number_of_replicas to [0] for indices [.kibana_2]
[00:37:22]               │ proc [kibana]   log   [14:27:27.935] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:37:22]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589375426799868105] applying create index request using v1 templates []
[00:37:22]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589375426799868105] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:37:22]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1589375426799868105] updating number_of_replicas to [0] for indices [.kibana_1]
[00:37:22]               │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-centos-tests-xl-1589375426799868105] 62301 finished with response BulkByScrollResponse[took=18ms,timed_out=false,sliceId=null,updated=0,created=1,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:37:22]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1589375426799868105] [.kibana/-eOrOnruR3yhBAu4-jfpyA] deleting index
[00:37:22]               │ proc [kibana]   log   [14:27:28.284] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:37:22]               │ proc [kibana]   log   [14:27:28.292] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:37:22]               │ proc [kibana]   log   [14:27:28.328] [info][savedobjects-service] Finished in 462ms.
[00:37:22]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:37:22]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xl-1589375426799868105] [.kibana_2/G4FExHTGTIeFhbc11unPnA] update_mapping [_doc]
[00:37:23]               │ info [reporting/archived_reports] Loading "mappings.json"
[00:37:23]               │ info [reporting/archived_reports] Loading "data.json.gz"
[00:37:23]               │ info Taking screenshot "/dev/shm/workspace/kibana/x-pack/test/functional/screenshots/failure/reporting management app Delete reports _before all_ hook.png"
[00:37:23]               │ info Current URL is: http://localhost:6181/app/kibana#/management/elasticsearch/index_lifecycle_management/policies
[00:37:23]               │ info Saving page source to: /dev/shm/workspace/kibana/x-pack/test/functional/failure_debug/html/reporting management app Delete reports _before all_ hook.html
[00:37:23]               └- ✖ fail: "reporting management app Delete reports "before all" hook for "Confirm single report deletion works""
[00:37:23]               │

Stack Trace

{ Error: [illegal_argument_exception] unknown setting [index.prefer_v2_templates] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
    at respond (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:349:15)
    at checkRespForFailure (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:306:7)
    at HttpConnector.<anonymous> (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
    at IncomingMessage.wrapper (/dev/shm/workspace/kibana/node_modules/elasticsearch/node_modules/lodash/lodash.js:4929:19)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  status: 400,
  displayName: 'BadRequest',
  message:
   '[illegal_argument_exception] unknown setting [index.prefer_v2_templates] please check that any required plugins are installed, or check the breaking changes documentation for removed settings',
  path: '/.reporting-2020.04.19',
  query: {},
  body:
   { error:
      { root_cause: [Array],
        type: 'illegal_argument_exception',
        reason:
         'unknown setting [index.prefer_v2_templates] please check that any required plugins are installed, or check the breaking changes documentation for removed settings' },
     status: 400 },
  statusCode: 400,
  response:
   '{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"unknown setting [index.prefer_v2_templates] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"}],"type":"illegal_argument_exception","reason":"unknown setting [index.prefer_v2_templates] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"},"status":400}',
  toString: [Function],
  toJSON: [Function] }

Kibana Pipeline / kibana-xpack-agent / X-Pack API Integration Tests.x-pack/test/api_integration/apis/endpoint/policy·ts.apis Endpoint plugin Endpoint policy api GET /api/endpoint/policy_response "before all" hook for "should return one policy response for host"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 1 times on tracked branches: https://dryrun

[00:00:00]       │
[00:00:00]         └-: apis
[00:00:00]           └-> "before all" hook
[00:09:41]           └-: Endpoint plugin
[00:09:41]             └-> "before all" hook
[00:09:41]             └-> "before all" hook
[00:09:45]             └-: Endpoint policy api
[00:09:45]               └-> "before all" hook
[00:09:45]               └-: GET /api/endpoint/policy_response
[00:09:45]                 └-> "before all" hook
[00:09:45]                 └-> "before all" hook
[00:09:45]                   │ info [endpoint/policy] Loading "mappings.json"
[00:09:45]                   │ info [endpoint/policy] Loading "data.json.gz"
[00:09:45]                   └- ✖ fail: "apis Endpoint plugin Endpoint policy api GET /api/endpoint/policy_response "before all" hook for "should return one policy response for host""
[00:09:45]                   │

Stack Trace

{ Error: [illegal_argument_exception] unknown setting [index.prefer_v2_templates] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
    at respond (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:349:15)
    at checkRespForFailure (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:306:7)
    at HttpConnector.<anonymous> (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
    at IncomingMessage.wrapper (/dev/shm/workspace/kibana/node_modules/elasticsearch/node_modules/lodash/lodash.js:4929:19)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  status: 400,
  displayName: 'BadRequest',
  message:
   '[illegal_argument_exception] unknown setting [index.prefer_v2_templates] please check that any required plugins are installed, or check the breaking changes documentation for removed settings',
  path: '/metrics-endpoint.policy-default-1',
  query: {},
  body:
   { error:
      { root_cause: [Array],
        type: 'illegal_argument_exception',
        reason:
         'unknown setting [index.prefer_v2_templates] please check that any required plugins are installed, or check the breaking changes documentation for removed settings' },
     status: 400 },
  statusCode: 400,
  response:
   '{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"unknown setting [index.prefer_v2_templates] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"}],"type":"illegal_argument_exception","reason":"unknown setting [index.prefer_v2_templates] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"},"status":400}',
  toString: [Function],
  toJSON: [Function] }

Kibana Pipeline / kibana-xpack-agent / X-Pack API Integration Tests.x-pack/test/api_integration/apis/endpoint/policy·ts.apis Endpoint plugin Endpoint policy api GET /api/endpoint/policy_response "before all" hook for "should return one policy response for host"

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: apis
[00:00:00]           └-> "before all" hook
[00:10:27]           └-: Endpoint plugin
[00:10:27]             └-> "before all" hook
[00:10:27]             └-> "before all" hook
[00:10:33]             └-: Endpoint policy api
[00:10:33]               └-> "before all" hook
[00:10:33]               └-: GET /api/endpoint/policy_response
[00:10:33]                 └-> "before all" hook
[00:10:33]                 └-> "before all" hook
[00:10:33]                   │ info [endpoint/policy] Loading "mappings.json"
[00:10:33]                   │ info [endpoint/policy] Loading "data.json.gz"
[00:10:33]                   └- ✖ fail: "apis Endpoint plugin Endpoint policy api GET /api/endpoint/policy_response "before all" hook for "should return one policy response for host""
[00:10:33]                   │

Stack Trace

{ Error: [illegal_argument_exception] unknown setting [index.prefer_v2_templates] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
    at respond (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:349:15)
    at checkRespForFailure (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:306:7)
    at HttpConnector.<anonymous> (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
    at IncomingMessage.wrapper (/dev/shm/workspace/kibana/node_modules/elasticsearch/node_modules/lodash/lodash.js:4929:19)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  status: 400,
  displayName: 'BadRequest',
  message:
   '[illegal_argument_exception] unknown setting [index.prefer_v2_templates] please check that any required plugins are installed, or check the breaking changes documentation for removed settings',
  path: '/metrics-endpoint.policy-default-1',
  query: {},
  body:
   { error:
      { root_cause: [Array],
        type: 'illegal_argument_exception',
        reason:
         'unknown setting [index.prefer_v2_templates] please check that any required plugins are installed, or check the breaking changes documentation for removed settings' },
     status: 400 },
  statusCode: 400,
  response:
   '{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"unknown setting [index.prefer_v2_templates] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"}],"type":"illegal_argument_exception","reason":"unknown setting [index.prefer_v2_templates] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"},"status":400}',
  toString: [Function],
  toJSON: [Function] }

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants