elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.76k stars 8.17k forks source link

Failing test: Jest Integration Tests.src/core/server/integration_tests/ui_settings - ui settings migrations migrates siem:* configs #163273

Closed kibanamachine closed 4 months ago

kibanamachine commented 1 year ago

A test failed on a tracked branch

Jest encountered an unexpected token

Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.

By default "node_modules" folder is ignored by transformers.

Here's what you can do:
 • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
 • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
 • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
 • If you need a custom transformation specify a "transform" option in your config.
 • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.

You'll find more details and examples of these config options in the docs:
https://jestjs.io/docs/configuration
For information about custom transformations, see:
https://jestjs.io/docs/code-transformation

Details:

SyntaxError: /var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/x-pack/plugins/cases/common/ui/types.ts: Identifier 'CaseMetricsFeature' has already been declared. (39:2)

  37 |   UserActionFindRequestTypes,
  38 |   UserActionFindResponse,
> 39 |   CaseMetricsFeature,
     |   ^
  40 |   CasesMetricsResponse,
  41 |   SingleCaseMetricsResponse,
  42 | } from '../types/api';
    at instantiate (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parse-error/credentials.ts:62:21)
    at instantiate (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parse-error.ts:60:12)
    at TypeScriptParserMixin.toParseError [as raise] (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/tokenizer/index.ts:1464:19)
    at TypeScriptScopeHandler.raise [as declareName] (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/plugins/typescript/scope.ts:83:21)
    at TypeScriptParserMixin.declareName [as declareNameFromIdentifier] (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parser/lval.ts:705:16)
    at TypeScriptParserMixin.declareNameFromIdentifier [as checkIdentifier] (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parser/lval.ts:700:12)
    at TypeScriptParserMixin.checkIdentifier [as checkLVal] (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parser/lval.ts:615:12)
    at TypeScriptParserMixin.checkLVal [as finishImportSpecifier] (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parser/statement.ts:3000:10)
    at TypeScriptParserMixin.finishImportSpecifier (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parser/statement.ts:3208:17)
    at TypeScriptParserMixin.parseImportSpecifier (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/plugins/typescript/index.ts:4024:20)
    at TypeScriptParserMixin.parseImportSpecifier [as parseNamedImportSpecifiers] (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parser/statement.ts:3167:36)
    at TypeScriptParserMixin.parseNamedImportSpecifiers (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parser/statement.ts:2946:39)
    at TypeScriptParserMixin.parseImport (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/plugins/typescript/index.ts:2702:32)
    at TypeScriptParserMixin.parseImport (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parser/statement.ts:571:25)
    at TypeScriptParserMixin.parseStatementContent (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/plugins/typescript/index.ts:2857:20)
    at TypeScriptParserMixin.parseStatementContent [as parseStatementLike] (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parser/statement.ts:416:17)
    at TypeScriptParserMixin.parseStatementLike [as parseModuleItem] (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parser/statement.ts:353:17)
    at TypeScriptParserMixin.parseModuleItem [as parseBlockOrModuleBlockBody] (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parser/statement.ts:1362:16)
    at TypeScriptParserMixin.parseBlockOrModuleBlockBody [as parseBlockBody] (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parser/statement.ts:1336:10)
    at TypeScriptParserMixin.parseBlockBody [as parseProgram] (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parser/statement.ts:226:10)
    at TypeScriptParserMixin.parseProgram [as parseTopLevel] (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parser/statement.ts:208:25)
    at TypeScriptParserMixin.parseTopLevel (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/parser/index.ts:45:10)
    at TypeScriptParserMixin.parse (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/plugins/typescript/index.ts:3974:20)
    at parse (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/parser/src/index.ts:67:38)
    at parser (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/core/src/parser/index.ts:28:19)
    at parser.next (<anonymous>)
    at normalizeFile (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/core/src/transformation/normalize-file.ts:51:24)
    at normalizeFile.next (<anonymous>)
    at run (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/core/src/transformation/index.ts:38:36)
    at run.next (<anonymous>)
    at transform (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/core/src/transform.ts:29:20)
    at transform.next (<anonymous>)
    at evaluateSync (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/gensync/index.js:251:28)
    at sync (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/gensync/index.js:89:14)
    at fn (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/core/src/errors/rewrite-stack-trace.ts:97:14)
    at transformSync (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/@babel/core/src/transform.ts:66:52)
    at Object.process (/var/lib/buildkite-agent/builds/kb-n2-4-spot-a35725db299a63f3/elastic/kibana-on-merge/kibana/node_modules/babel-j
[report_failure] output truncated to 8192 characters

First failure: CI Build - main

elasticmachine commented 1 year ago

Pinging @elastic/kibana-core (Team:Core)

afharo commented 1 year ago

2 errors seen here:

  1. Duplicated type export from a file in cases (reverted and fixed)
  2. ES failed to exit, and failed to start on the following test
    │ info [o.e.b.Elasticsearch] [node-01] fatal exception while booting Elasticsearch org.elasticsearch.http.BindHttpException: Failed to bind to [::1]:9220

Both unrelated to the test. Closing

kibanamachine commented 7 months ago

New failure: CI Build - main

pgayvallet commented 7 months ago

ES exited with code 1

kibanamachine commented 4 months ago

New failure: kibana-on-merge - main

pgayvallet commented 4 months ago

Cause identified and fixed in https://github.com/elastic/kibana/pull/183918