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

[SIEM] Bring Cypress tests back to life #71871

Merged
merged 10 commits into from
Jul 16, 2020

Conversation

MadameSheema
Copy link
Member

@MadameSheema MadameSheema commented Jul 15, 2020

Summary

In this PR we are fixing the failing tests and unskips the ones that are working fine.

Pending to fix:

  • Search bar test
  • sets and reads the url state for timeline by id

because these tests needs an investment of time to understand what is happening an fix them.

@MadameSheema MadameSheema added Team:SIEM v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.9.0 labels Jul 15, 2020
@MadameSheema MadameSheema self-assigned this Jul 15, 2020
@MadameSheema MadameSheema marked this pull request as ready for review July 16, 2020 09:47
@MadameSheema MadameSheema requested review from a team as code owners July 16, 2020 09:47
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@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/dashboard_mode/dashboard_empty_screen·js.dashboard mode empty dashboard "before all" hook for "adds Lens visualization to empty dashboard"

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:16:12]         └-: dashboard mode
[00:16:12]           └-> "before all" hook
[00:20:44]           └-: empty dashboard
[00:20:44]             └-> "before all" hook
[00:20:44]             └-> "before all" hook
[00:20:44]               │ info [logstash_functional] Loading "mappings.json"
[00:20:44]               │ info [logstash_functional] Loading "data.json.gz"
[00:20:44]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:20:44]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:20:44]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:20:45]               │ info [lens/basic] Loading "mappings.json"
[00:20:45]               │ info [lens/basic] Loading "data.json.gz"
[00:20:46]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1594893371367547367] [.kibana_2/KD77UumbRJyVqu7GbmFRfA] deleting index
[00:20:46]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1594893371367547367] [.kibana_1/yNnB6tFQTR6NURLp89aH7Q] deleting index
[00:20:46]               │ info [lens/basic] Deleted existing index [".kibana_2",".kibana_1"]
[00:20:46]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1594893371367547367] [.kibana] creating index, cause [auto(bulk api)], templates [], shards [1]/[1]
[00:20:46]               │ info failed to create aliases [{ '.kibana': {} }] because ES indicated an index/alias already exists, trying again
[00:20:46]               │ info failed to create aliases [{ '.kibana': {} }] because ES indicated an index/alias already exists, trying again
[00:20:46]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1594893371367547367] [.kibana/Y5UmlkqCTOaSIqX4m1jhJQ] create_mapping
[00:20:46]               │ info Taking screenshot "/dev/shm/workspace/kibana/x-pack/test/functional/screenshots/failure/dashboard mode empty dashboard _before all_ hook.png"
[00:20:47]               │ info Current URL is: http://localhost:6181/app/dashboards#/view/b8978e80-c751-11ea-8034-8b406541fe6b?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:%272015-09-19T06:31:44.000Z%27,to:%272015-09-23T18:31:44.000Z%27))&_a=(description:%27%27,filters:!((%27$state%27:(store:appState),meta:(alias:!n,disabled:!f,formattedValue:%270%27,index:%27logstash-*%27,key:memory,negate:!f,params:(gte:0,lt:40000),type:range),range:(memory:(gte:0,lt:40000)))),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:%27%27),timeRestore:!f,title:%27Dashboard%20View%20Mode%20Test%20Dashboard%27,viewMode:view)
[00:20:47]               │ info Saving page source to: /dev/shm/workspace/kibana/x-pack/test/functional/failure_debug/html/dashboard mode empty dashboard _before all_ hook.html
[00:20:47]               └- ✖ fail: dashboard mode empty dashboard "before all" hook for "adds Lens visualization to empty dashboard"
[00:20:47]               │      Error: [invalid_alias_name_exception] Invalid alias name [.kibana], an index exists with the same name as the alias, with { index_uuid="Y5UmlkqCTOaSIqX4m1jhJQ" & index=".kibana" }
[00:20:47]               │       at respond (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:349:15)
[00:20:47]               │       at checkRespForFailure (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:306:7)
[00:20:47]               │       at HttpConnector.<anonymous> (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
[00:20:47]               │       at IncomingMessage.wrapper (/dev/shm/workspace/kibana/node_modules/lodash/lodash.js:4929:19)
[00:20:47]               │       at endReadableNT (_stream_readable.js:1145:12)
[00:20:47]               │       at process._tickCallback (internal/process/next_tick.js:63:19)
[00:20:47]               │ 
[00:20:47]               │ 

Stack Trace

{ Error: [invalid_alias_name_exception] Invalid alias name [.kibana], an index exists with the same name as the alias, with { index_uuid="Y5UmlkqCTOaSIqX4m1jhJQ" & index=".kibana" }
    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/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:
   '[invalid_alias_name_exception] Invalid alias name [.kibana], an index exists with the same name as the alias, with { index_uuid="Y5UmlkqCTOaSIqX4m1jhJQ" & index=".kibana" }',
  path: '/.kibana_1',
  query: {},
  body:
   { error:
      { root_cause: [Array],
        type: 'invalid_alias_name_exception',
        reason:
         'Invalid alias name [.kibana], an index exists with the same name as the alias',
        index_uuid: 'Y5UmlkqCTOaSIqX4m1jhJQ',
        index: '.kibana' },
     status: 400 },
  statusCode: 400,
  response:
   '{"error":{"root_cause":[{"type":"invalid_alias_name_exception","reason":"Invalid alias name [.kibana], an index exists with the same name as the alias","index_uuid":"Y5UmlkqCTOaSIqX4m1jhJQ","index":".kibana"}],"type":"invalid_alias_name_exception","reason":"Invalid alias name [.kibana], an index exists with the same name as the alias","index_uuid":"Y5UmlkqCTOaSIqX4m1jhJQ","index":".kibana"},"status":400}',
  toString: [Function],
  toJSON: [Function] }

Build metrics

✅ unchanged

History

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

Copy link
Contributor

@FrankHassanabad FrankHassanabad left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@cnasikas cnasikas left a comment

Choose a reason for hiding this comment

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

LGTM! Tested manually with loop_cypress_tests.js 5

@MadameSheema MadameSheema merged commit 401ad35 into elastic:master Jul 16, 2020
@MadameSheema MadameSheema deleted the cypress-tests-back-to-life branch July 16, 2020 19:14
MadameSheema added a commit to MadameSheema/kibana that referenced this pull request Jul 16, 2020
* fixes and unskips 'Detection rules, custom'

* fixes 'Export rules' test

* unksips 'Deleting prebuilt rules' test

* unskips Alerts timeline

* unskips 'Events viewer' tests

* unskips 'toggle column in timeline' tests

* unskips 'url timeline' test

* fixes Overview test

* skips flaky test
# Conflicts:
#	x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_custom.spec.ts
#	x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_export.spec.ts
#	x-pack/plugins/security_solution/cypress/objects/rule.ts
#	x-pack/test/security_solution_cypress/es_archives/custom_rule_with_timeline/data.json.gz
#	x-pack/test/security_solution_cypress/es_archives/custom_rule_with_timeline/mappings.json
MadameSheema added a commit to MadameSheema/kibana that referenced this pull request Jul 16, 2020
* fixes and unskips 'Detection rules, custom'

* fixes 'Export rules' test

* unksips 'Deleting prebuilt rules' test

* unskips Alerts timeline

* unskips 'Events viewer' tests

* unskips 'toggle column in timeline' tests

* unskips 'url timeline' test

* fixes Overview test

* skips flaky test
# Conflicts:
#	x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_custom.spec.ts
#	x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_export.spec.ts
#	x-pack/plugins/security_solution/cypress/objects/rule.ts
#	x-pack/test/security_solution_cypress/es_archives/custom_rule_with_timeline/data.json.gz
#	x-pack/test/security_solution_cypress/es_archives/custom_rule_with_timeline/mappings.json
MadameSheema added a commit that referenced this pull request Jul 17, 2020
* fixes and unskips 'Detection rules, custom'

* fixes 'Export rules' test

* unksips 'Deleting prebuilt rules' test

* unskips Alerts timeline

* unskips 'Events viewer' tests

* unskips 'toggle column in timeline' tests

* unskips 'url timeline' test

* fixes Overview test

* skips flaky test
# Conflicts:
#	x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_custom.spec.ts
#	x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_export.spec.ts
#	x-pack/plugins/security_solution/cypress/objects/rule.ts
#	x-pack/test/security_solution_cypress/es_archives/custom_rule_with_timeline/data.json.gz
#	x-pack/test/security_solution_cypress/es_archives/custom_rule_with_timeline/mappings.json
This was referenced Jul 17, 2020
@MindyRS MindyRS added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Sep 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

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: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants