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

chore(NA): moving @kbn/securitysolution-es-utils to babel transpiler #109426

Conversation

mistic
Copy link
Member

@mistic mistic commented Aug 20, 2021

One step forward on #69706

That PR moves the @kbn/securitysolution-es-utils from using tsc compiler to babel transpiler to produce the js outputs.

@mistic mistic added chore Team:Operations Team label for Operations Team v8.0.0 release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed v7.15.0 v7.16.0 v7.14.1 labels Aug 20, 2021
@mistic mistic requested a review from jbudz August 20, 2021 11:46
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@mistic mistic requested a review from FrankHassanabad August 20, 2021 12:13
@mistic
Copy link
Member Author

mistic commented Aug 20, 2021

@elasticmachine merge upstream

Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>
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,

  • Looked over this PR and compared it to similar ones and the directory structures to see if anything was overlooked

@mistic
Copy link
Member Author

mistic commented Aug 22, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / X-Pack Usage Collection Functional Tests.x-pack/test/usage_collection/test_suites/application_usage.Application Usage keys in the schema match the registered application IDs

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: Application Usage
[00:00:00]           └-> "before all" hook for "keys in the schema match the registered application IDs"
[00:00:00]           └-> keys in the schema match the registered application IDs
[00:00:00]             └-> "before each" hook: global before each for "keys in the schema match the registered application IDs"
[00:00:00]             │ debg navigating to home url: http://localhost:61221/app/home#/
[00:00:00]             │ debg navigate to: http://localhost:61221/app/home#/
[00:00:00]             │ debg browser[INFO] http://localhost:61221/login?next=%2Fapp%2Fhome%3F_t%3D1629676550474#/ 281 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:00]             │
[00:00:00]             │ debg browser[INFO] http://localhost:61221/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:00]             │ debg ... sleep(700) start
[00:00:00]             │ debg ... sleep(700) end
[00:00:00]             │ debg returned from get, calling refresh
[00:00:01]             │ debg browser[INFO] http://localhost:61221/login?next=%2Fapp%2Fhome%3F_t%3D1629676550474#/ 281 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:01]             │
[00:00:01]             │ debg browser[INFO] http://localhost:61221/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:01]             │ debg currentUrl = http://localhost:61221/login?next=%2Fapp%2Fhome%3F_t%3D1629676550474#/
[00:00:01]             │          appUrl = http://localhost:61221/app/home#/
[00:00:01]             │ debg TestSubjects.find(kibanaChrome)
[00:00:01]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:03]             │ debg Found login page
[00:00:03]             │ debg TestSubjects.setValue(loginUsername, test_user)
[00:00:03]             │ debg TestSubjects.click(loginUsername)
[00:00:03]             │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:00:03]             │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:00:03]             │ERROR browser[SEVERE] http://localhost:61221/api/licensing/info - Failed to load resource: the server responded with a status of 401 (Unauthorized)
[00:00:04]             │ debg TestSubjects.setValue(loginPassword, changeme)
[00:00:04]             │ debg TestSubjects.click(loginPassword)
[00:00:04]             │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:00:04]             │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:00:04]             │ debg TestSubjects.click(loginSubmit)
[00:00:04]             │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:00:04]             │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:00:04]             │ debg Find.waitForDeletedByCssSelector('.kibanaWelcomeLogo') with timeout=10000
[00:00:04]             │ proc [kibana]   log   [23:55:54.744] [info][plugins][routes][security] Logging in with provider "basic" (basic)
[00:00:04]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:04]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"] nav:not(.ng-hide)') with timeout=60000
[00:00:07]             │ debg browser[INFO] http://localhost:61221/app/home?_t=1629676550474#/ 281 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:07]             │
[00:00:07]             │ debg browser[INFO] http://localhost:61221/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:07]             │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_001/HzRL9Nt3TZWzmokJGmXpjw] update_mapping [_doc]
[00:00:08]             │ debg browser[INFO] http://localhost:61221/app/home?_t=1629676558129#/ 281 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:08]             │
[00:00:08]             │ debg browser[INFO] http://localhost:61221/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:08]             │ debg Finished login process currentUrl = http://localhost:61221/app/home#/
[00:00:08]             │ debg ... sleep(501) start
[00:00:08]             │ debg ... sleep(501) end
[00:00:08]             │ debg in navigateTo url = http://localhost:61221/app/home#/
[00:00:08]             │ info Taking screenshot "/dev/shm/workspace/parallel/22/kibana/x-pack/test/functional/screenshots/failure/Application Usage keys in the schema match the registered application IDs.png"
[00:00:09]             │ info Current URL is: http://localhost:61221/app/home#/
[00:00:09]             │ info Saving page source to: /dev/shm/workspace/parallel/22/kibana/x-pack/test/functional/failure_debug/html/Application Usage keys in the schema match the registered application IDs.html
[00:00:09]             └- ✖ fail: Application Usage keys in the schema match the registered application IDs
[00:00:09]             │      TypeError: Application Usage's schema is not up-to-date with the actual registered apps. Please update it at src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts.
[00:00:09]             │ Cannot read property 'sort' of null
[00:00:09]             │       at Context.<anonymous> (test/usage_collection/test_suites/application_usage/index.ts:22:74)
[00:00:09]             │       at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:00:09]             │       at Object.apply (/dev/shm/workspace/parallel/22/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)
[00:00:09]             │ 
[00:00:09]             │ 

Stack Trace

TypeError: Application Usage's schema is not up-to-date with the actual registered apps. Please update it at src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts.
Cannot read property 'sort' of null
    at Context.<anonymous> (test/usage_collection/test_suites/application_usage/index.ts:22:74)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at Object.apply (/dev/shm/workspace/parallel/22/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)

Metrics [docs]

✅ unchanged

History

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

@mistic mistic merged commit 3128c99 into elastic:master Aug 23, 2021
mistic added a commit to mistic/kibana that referenced this pull request Aug 23, 2021
…lastic#109426)

* chore(NA): moving @kbn/securitysolution-es-utils to babel transpiler

* chore(NA): update packages/kbn-securitysolution-es-utils/.babelrc

Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>

* chore(NA): correct deps

* chore(NA): finetunning package

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>
# Conflicts:
#	packages/kbn-securitysolution-es-utils/BUILD.bazel
#	packages/kbn-securitysolution-es-utils/tsconfig.json
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Aug 23, 2021
…lastic#109426)

* chore(NA): moving @kbn/securitysolution-es-utils to babel transpiler

* chore(NA): update packages/kbn-securitysolution-es-utils/.babelrc

Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>

* chore(NA): correct deps

* chore(NA): finetunning package

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Aug 23, 2021
…lastic#109426)

* chore(NA): moving @kbn/securitysolution-es-utils to babel transpiler

* chore(NA): update packages/kbn-securitysolution-es-utils/.babelrc

Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>

* chore(NA): correct deps

* chore(NA): finetunning package

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>
@kibanamachine
Copy link
Contributor

💔 Backport failed

Status Branch Result
7.15
7.x
7.14 Commit could not be cherrypicked due to conflicts

Successful backport PRs will be merged automatically after passing CI.

To backport manually run:
node scripts/backport --pr 109426

mistic added a commit that referenced this pull request Aug 23, 2021
…109426) (#109671)

* chore(NA): moving @kbn/securitysolution-es-utils to babel transpiler

* chore(NA): update packages/kbn-securitysolution-es-utils/.babelrc

Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>

* chore(NA): correct deps

* chore(NA): finetunning package

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>
# Conflicts:
#	packages/kbn-securitysolution-es-utils/BUILD.bazel
#	packages/kbn-securitysolution-es-utils/tsconfig.json
kibanamachine added a commit that referenced this pull request Aug 23, 2021
…109426) (#109673)

* chore(NA): moving @kbn/securitysolution-es-utils to babel transpiler

* chore(NA): update packages/kbn-securitysolution-es-utils/.babelrc

Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>

* chore(NA): correct deps

* chore(NA): finetunning package

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>
kibanamachine added a commit that referenced this pull request Aug 23, 2021
…109426) (#109674)

* chore(NA): moving @kbn/securitysolution-es-utils to babel transpiler

* chore(NA): update packages/kbn-securitysolution-es-utils/.babelrc

Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>

* chore(NA): correct deps

* chore(NA): finetunning package

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed chore release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.14.1 v7.15.0 v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants