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

Setup Node.js environment before instrumenting Kibana with APM. #155063

Merged
merged 2 commits into from
Apr 19, 2023

Conversation

azasypkin
Copy link
Member

@azasypkin azasypkin commented Apr 17, 2023

Summary

It looks like setup_node_env doesn't require any packages that would need to be instrumented by the APM, and hence it should be safe to require it before the APM script. Here are the 3rd-party packages that are required via setup_node_env scripts (excluding anything that's imported inside of these package, of course):

  • require-in-the-middle
  • lodash/_isIterateeCall
  • symbol-observable
  • source-map-support
  • core-js/stable
  • @kbn/babel-register (only in dev, and it was already imported before APM script)

@azasypkin azasypkin added chore release_note:skip Skip the PR/issue when compiling release notes labels Apr 17, 2023
@@ -6,7 +6,6 @@
* Side Public License, v 1.
*/

require('@kbn/babel-register').install();
Copy link
Member Author

Choose a reason for hiding this comment

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

note: require('@kbn/babel-register').install() is already done inside of setup_node_env.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 432 435 +3

Total ESLint disabled count

id before after diff
securitySolution 512 515 +3

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

@azasypkin azasypkin marked this pull request as ready for review April 18, 2023 07:32
@azasypkin azasypkin requested review from a team April 18, 2023 07:32
@azasypkin azasypkin self-assigned this Apr 18, 2023
Copy link
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

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

LGTM

@azasypkin azasypkin added the backport:all-open Backport to all branches that could still receive a release label Apr 19, 2023
@azasypkin azasypkin merged commit eb90e40 into elastic:main Apr 19, 2023
@azasypkin azasypkin deleted the issue-xxx-harden-before-apm branch April 19, 2023 16:33
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 19, 2023
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
7.17 Backport failed because of merge conflicts
8.7

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 155063

Questions ?

Please refer to the Backport tool documentation

@azasypkin
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
7.17

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

azasypkin added a commit to azasypkin/kibana that referenced this pull request Apr 20, 2023
…tic#155063)

(cherry picked from commit eb90e40)

# Conflicts:
#	src/cli/dev.js
#	src/cli/tsconfig.json
kibanamachine added a commit that referenced this pull request Apr 20, 2023
…#155063) (#155300)

# Backport

This will backport the following commits from `main` to `8.7`:
- [Setup Node.js environment before instrumenting Kibana with APM.
(#155063)](#155063)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Aleh
Zasypkin","email":"aleh.zasypkin@elastic.co"},"sourceCommit":{"committedDate":"2023-04-19T16:33:11Z","message":"Setup
Node.js environment before instrumenting Kibana with APM.
(#155063)","sha":"eb90e40da5f48fa8554b495ecd9b046f5f5978e3","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","release_note:skip","backport:all-open","v8.8.0"],"number":155063,"url":"https://github.com/elastic/kibana/pull/155063","mergeCommit":{"message":"Setup
Node.js environment before instrumenting Kibana with APM.
(#155063)","sha":"eb90e40da5f48fa8554b495ecd9b046f5f5978e3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155063","number":155063,"mergeCommit":{"message":"Setup
Node.js environment before instrumenting Kibana with APM.
(#155063)","sha":"eb90e40da5f48fa8554b495ecd9b046f5f5978e3"}}]}]
BACKPORT-->

Co-authored-by: Aleh Zasypkin <aleh.zasypkin@elastic.co>
azasypkin added a commit that referenced this pull request Apr 20, 2023
#155063) (#155378)

# Backport

This will backport the following commits from `main` to `7.17`:
- [Setup Node.js environment before instrumenting Kibana with APM.
(#155063)](#155063)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Aleh
Zasypkin","email":"aleh.zasypkin@elastic.co"},"sourceCommit":{"committedDate":"2023-04-19T16:33:11Z","message":"Setup
Node.js environment before instrumenting Kibana with APM.
(#155063)","sha":"eb90e40da5f48fa8554b495ecd9b046f5f5978e3","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","release_note:skip","backport:all-open","v8.8.0"],"number":155063,"url":"https://github.com/elastic/kibana/pull/155063","mergeCommit":{"message":"Setup
Node.js environment before instrumenting Kibana with APM.
(#155063)","sha":"eb90e40da5f48fa8554b495ecd9b046f5f5978e3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155063","number":155063,"mergeCommit":{"message":"Setup
Node.js environment before instrumenting Kibana with APM.
(#155063)","sha":"eb90e40da5f48fa8554b495ecd9b046f5f5978e3"}},{"url":"https://github.com/elastic/kibana/pull/155300","number":155300,"branch":"8.7","state":"OPEN"}]}]
BACKPORT-->
rylnd added a commit that referenced this pull request Apr 21, 2023
* 8.7: (93 commits)
  [8.7] [Controls] Use EUI Selectable for Field search (#151231) (#155454)
  [8.7] [Synthetics] Fix  performance breakdown link from error details page (#155393) (#155427)
  [8.7] [DOCS] Remove or move book-scoped attributes (#155210) (#155426)
  [8.7] [Synthetics] add default email recovery message (#154862) (#155418)
  [8.7] [Uptime] Add both both ip filters for view host in uptime location for host and monitor (#155382) (#155399)
  [8.7] Setup Node.js environment before instrumenting Kibana with APM. (#155063) (#155300)
  [8.7] [Discover] Address react warnings for legacy table (#154579) (#155345)
  [8.7] [Fleet] Fix logs useless rerender (#155305) (#155310)
  [8.7] [kbn-failed-test-reporter-cli] truncate report message to fix github api call failure (#155141) (#155286)
  [8.7][APM] Fleet migration support for bundled APM package (#153159)  (#155281)
  [8.7] [Enterprise Search] Fix Connector scheduling show week information correctly (#155191) (#155227)
  [8.7] [Synthetics] Fix pending count in case of location filtering (#155200) (#155225)
  [8.7] [Controls] Add Expensive Queries Fallback (#155082) (#155189)
  [8.7] [data view field editor] Runtime field code editor - move state out of controller (#155107) (#155150)
  [8.7] [FullStory] Update snippet (#153570) (#155138)
  [8.7] [Security Solution][Exceptions] - Fix exception operator logic when mapping conflict (#155071) (#155094)
  [DOCS] Adds 8.7.1 release notes (#154844)
  [8.7] Sync bundled packages with Package Storage (#155042)
  [APM] plugin description (#154811)
  Update api.asciidoc (#155021)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:all-open Backport to all branches that could still receive a release chore release_note:skip Skip the PR/issue when compiling release notes v7.17.10 v8.7.1 v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants