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

set NODE_ENV=production for bin/* #139649

Merged
merged 5 commits into from
Aug 30, 2022
Merged

set NODE_ENV=production for bin/* #139649

merged 5 commits into from
Aug 30, 2022

Conversation

jbudz
Copy link
Member

@jbudz jbudz commented Aug 29, 2022

Currently not all of our bin CLIs run with NODE_ENV=production. Some node_modules parse this environment variable to determine whether to load development files, e.g. profiling tools. We're now removing development files from builds and these CLIs are running into import failures.

This makes sure all our bin files are setting NODE_ENV to production, and adds tests to check for import failures.

Fixes #139547

@jbudz jbudz added Team:Operations Team label for Operations Team release_note:skip Skip the PR/issue when compiling release notes skip-ci labels Aug 29, 2022
@jbudz
Copy link
Member Author

jbudz commented Aug 29, 2022

@jbudz jbudz removed the skip-ci label Aug 29, 2022
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

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

@jbudz jbudz marked this pull request as ready for review August 29, 2022 18:44
@jbudz jbudz requested a review from a team as a code owner August 29, 2022 18:44
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM

@jbudz jbudz merged commit 04d1ffe into main Aug 30, 2022
@jbudz jbudz deleted the bin/set-node-env-production branch August 30, 2022 14:01
@kibanamachine kibanamachine added v8.5.0 backport:skip This commit does not require backporting labels Aug 30, 2022
Mpdreamz pushed a commit to Mpdreamz/kibana that referenced this pull request Sep 6, 2022
* Set NODE_ENV=production for bin/*

* add tests

* Revert "Set NODE_ENV=production for bin/*"

This reverts commit 8012ed6.

* Revert "Revert "Set NODE_ENV=production for bin/*""

This reverts commit 2fd499c.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error cannot find module error running kibana-setup
5 participants