Skip to content

Manage yarn install scripts#250638

Merged
jbudz merged 4 commits intoelastic:mainfrom
jbudz:yarn-disable-postinstall
Jan 28, 2026
Merged

Manage yarn install scripts#250638
jbudz merged 4 commits intoelastic:mainfrom
jbudz:yarn-disable-postinstall

Conversation

@jbudz
Copy link
Copy Markdown
Contributor

@jbudz jbudz commented Jan 27, 2026

Disables yarn install lifecycle scripts and adds a config file to specify which scripts run.

Adds:

  • ignore-scripts true to .yarnrc
  • @kbn/yarn-install-scripts CLI with:
    • run: runs allowed install scripts defined in packages/kbn-yarn-install-scripts/config.json
    • scan: lists packages with install scripts
  • Integration into yarn kbn bootstrap
  • CI check that fails if a new or updated package has an install script not defined in config.json

Usage:

$ yarn kbn bootstrap
...
success yarn dependencies installed
success Playwright browsers installed
info running allowlisted install scripts
 info Running 4 install script(s)...
 info Running install for chromedriver@143.0.4
 info Running postinstall for cypress@13.17.0
 info Running postinstall for esbuild@0.25.9
 info Running postinstall for geckodriver@6.1.0
 succ Install scripts complete
success install scripts completed

$ node scripts/yarn_install_scripts run --dry-run
 info Running 4 install script(s)...
 info [dry-run] Would run install for chromedriver@143.0.1
 info [dry-run] Would run postinstall for cypress@13.17.0
 info [dry-run] Would run postinstall for esbuild@0.25.9
 info [dry-run] Would run postinstall for geckodriver@6.1.0
 succ Install scripts complete

$ node scripts/yarn_install_scripts scan
 info ┌─────────────────────────┬──────────┬─────────┬─────────────┬─────────────────────────────────┐
      │ Package                 │ Status   │ Version │ Lifecycle   │ Script                          │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ chromedriver            │ required │ 143.0.1 │ install     │ node install.js                 │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ cypress                 │ required │ 13.17.0 │ postinstall │ node index.js --exec install    │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ esbuild                 │ required │ 0.25.9  │ postinstall │ node install.js                 │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ ...                     │ ...      │ ...     │ ...         │ ...                             │
      └─────────────────────────┴──────────┴─────────┴─────────────┴─────────────────────────────────┘
 succ Found 18 install scripts: 4 required, 14 skipped, 0 unconfigured

Part of #128025

@jbudz jbudz added Team:Operations Kibana-Operations Team release_note:skip Skip the PR/issue when compiling release notes backport:all-open Backport to all branches that could still receive a release labels Jan 27, 2026
@jbudz jbudz marked this pull request as ready for review January 28, 2026 01:29
@jbudz jbudz requested a review from a team as a code owner January 28, 2026 01:29
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@jbudz jbudz requested review from a team and azasypkin January 28, 2026 01:30
Copy link
Copy Markdown
Contributor

@Ikuni17 Ikuni17 left a comment

Choose a reason for hiding this comment

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

LGTM


const stack: string[] = [rootNodeModulesDir];

while (stack.length > 0) {
Copy link
Copy Markdown
Contributor

@Ikuni17 Ikuni17 Jan 28, 2026

Choose a reason for hiding this comment

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

Not a requirement since this is quick enough, but it would make this more concise so I'll leave it up to you.

fast-glob can be useful here to find all the package.json files. For #245334 I was using:

const pkgJsonFiles = await fg('node_modules/{*,@*/*}/package.json', { cwd: repoRoot });

This will only match:

node_modules/<package>/package.json
node_modules/@<scope>/<package>/package.json

Since you're handling nested as well, the pattern would be node_modules/**/package.json.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I like the idea if simplifying. I gave fast-glob a try but it ended up pulling in test files like tape/node_modules/resolve/test/resolver/multirepo/package.json, and filtering those out ended up bringing the complexity back up unfortunately.

I'll leave it as is for now, but not opposed to cleanup in the future

@azasypkin azasypkin removed the request for review from a team January 28, 2026 10:49
Copy link
Copy Markdown
Contributor

@azasypkin azasypkin left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for doing this!

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

@jbudz jbudz merged commit d3e316f into elastic:main Jan 28, 2026
17 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.1, 9.2, 9.3

https://github.com/elastic/kibana/actions/runs/21457488145

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 28, 2026
Disables `yarn install` lifecycle scripts and adds a config file to
specify which scripts run.

Adds:
- `ignore-scripts true` to `.yarnrc`
- `@kbn/yarn-install-scripts` CLI with:
- `run`: runs allowed install scripts defined in
`packages/kbn-yarn-install-scripts/config.json`
  - `scan`: lists packages with install scripts
- Integration into `yarn kbn bootstrap`
- CI check that fails if a new or updated package has an install script
not defined in `config.json`

Usage:
```
$ yarn kbn bootstrap
...
success yarn dependencies installed
success Playwright browsers installed
info running allowlisted install scripts
 info Running 4 install script(s)...
 info Running install for chromedriver@143.0.4
 info Running postinstall for cypress@13.17.0
 info Running postinstall for esbuild@0.25.9
 info Running postinstall for geckodriver@6.1.0
 succ Install scripts complete
success install scripts completed

$ node scripts/yarn_install_scripts run --dry-run
 info Running 4 install script(s)...
 info [dry-run] Would run install for chromedriver@143.0.1
 info [dry-run] Would run postinstall for cypress@13.17.0
 info [dry-run] Would run postinstall for esbuild@0.25.9
 info [dry-run] Would run postinstall for geckodriver@6.1.0
 succ Install scripts complete

$ node scripts/yarn_install_scripts scan
 info ┌─────────────────────────┬──────────┬─────────┬─────────────┬─────────────────────────────────┐
      │ Package                 │ Status   │ Version │ Lifecycle   │ Script                          │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ chromedriver            │ required │ 143.0.1 │ install     │ node install.js                 │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ cypress                 │ required │ 13.17.0 │ postinstall │ node index.js --exec install    │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ esbuild                 │ required │ 0.25.9  │ postinstall │ node install.js                 │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ ...                     │ ...      │ ...     │ ...         │ ...                             │
      └─────────────────────────┴──────────┴─────────┴─────────────┴─────────────────────────────────┘
 succ Found 18 install scripts: 4 required, 14 skipped, 0 unconfigured
```
Part of elastic#128025

(cherry picked from commit d3e316f)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 28, 2026
Disables `yarn install` lifecycle scripts and adds a config file to
specify which scripts run.

Adds:
- `ignore-scripts true` to `.yarnrc`
- `@kbn/yarn-install-scripts` CLI with:
- `run`: runs allowed install scripts defined in
`packages/kbn-yarn-install-scripts/config.json`
  - `scan`: lists packages with install scripts
- Integration into `yarn kbn bootstrap`
- CI check that fails if a new or updated package has an install script
not defined in `config.json`

Usage:
```
$ yarn kbn bootstrap
...
success yarn dependencies installed
success Playwright browsers installed
info running allowlisted install scripts
 info Running 4 install script(s)...
 info Running install for chromedriver@143.0.4
 info Running postinstall for cypress@13.17.0
 info Running postinstall for esbuild@0.25.9
 info Running postinstall for geckodriver@6.1.0
 succ Install scripts complete
success install scripts completed

$ node scripts/yarn_install_scripts run --dry-run
 info Running 4 install script(s)...
 info [dry-run] Would run install for chromedriver@143.0.1
 info [dry-run] Would run postinstall for cypress@13.17.0
 info [dry-run] Would run postinstall for esbuild@0.25.9
 info [dry-run] Would run postinstall for geckodriver@6.1.0
 succ Install scripts complete

$ node scripts/yarn_install_scripts scan
 info ┌─────────────────────────┬──────────┬─────────┬─────────────┬─────────────────────────────────┐
      │ Package                 │ Status   │ Version │ Lifecycle   │ Script                          │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ chromedriver            │ required │ 143.0.1 │ install     │ node install.js                 │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ cypress                 │ required │ 13.17.0 │ postinstall │ node index.js --exec install    │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ esbuild                 │ required │ 0.25.9  │ postinstall │ node install.js                 │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ ...                     │ ...      │ ...     │ ...         │ ...                             │
      └─────────────────────────┴──────────┴─────────┴─────────────┴─────────────────────────────────┘
 succ Found 18 install scripts: 4 required, 14 skipped, 0 unconfigured
```
Part of elastic#128025

(cherry picked from commit d3e316f)
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 Some backports could not be created

Status Branch Result
8.19 Backport failed because of merge conflicts
9.1 Backport failed because of merge conflicts
9.2
9.3

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 250638

Questions ?

Please refer to the Backport tool documentation

jbudz added a commit that referenced this pull request Jan 29, 2026
# Backport

This will backport the following commits from `main` to `9.3`:
- [Manage yarn install scripts
(#250638)](#250638)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT
[{"author":{"name":"Jon","email":"jon@elastic.co"},"sourceCommit":{"committedDate":"2026-01-28T22:13:49Z","message":"Manage
yarn install scripts (#250638)\n\nDisables `yarn install` lifecycle
scripts and adds a config file to\nspecify which scripts
run.\n\nAdds:\n- `ignore-scripts true` to `.yarnrc`\n-
`@kbn/yarn-install-scripts` CLI with:\n- `run`: runs allowed install
scripts defined in\n`packages/kbn-yarn-install-scripts/config.json`\n -
`scan`: lists packages with install scripts\n- Integration into `yarn
kbn bootstrap`\n- CI check that fails if a new or updated package has an
install script\nnot defined in `config.json`\n\nUsage:\n```\n$ yarn kbn
bootstrap\n...\nsuccess yarn dependencies installed\nsuccess Playwright
browsers installed\ninfo running allowlisted install scripts\n info
Running 4 install script(s)...\n info Running install for
chromedriver@143.0.4\n info Running postinstall for cypress@13.17.0\n
info Running postinstall for esbuild@0.25.9\n info Running postinstall
for geckodriver@6.1.0\n succ Install scripts complete\nsuccess install
scripts completed\n\n$ node scripts/yarn_install_scripts run --dry-run\n
info Running 4 install script(s)...\n info [dry-run] Would run install
for chromedriver@143.0.1\n info [dry-run] Would run postinstall for
cypress@13.17.0\n info [dry-run] Would run postinstall for
esbuild@0.25.9\n info [dry-run] Would run postinstall for
geckodriver@6.1.0\n succ Install scripts complete\n\n$ node
scripts/yarn_install_scripts scan\n info
┌─────────────────────────┬──────────┬─────────┬─────────────┬─────────────────────────────────┐\n
│ Package │ Status │ Version │ Lifecycle │ Script │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ chromedriver │ required │ 143.0.1 │ install │ node install.js │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ cypress │ required │ 13.17.0 │ postinstall │ node index.js --exec
install │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ esbuild │ required │ 0.25.9 │ postinstall │ node install.js │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ ... │ ... │ ... │ ... │ ... │\n
└─────────────────────────┴──────────┴─────────┴─────────────┴─────────────────────────────────┘\n
succ Found 18 install scripts: 4 required, 14 skipped, 0
unconfigured\n```\nPart of
https://github.com/elastic/kibana/issues/128025","sha":"d3e316fb87d7ced84abe0da160d08b249eb9d40b","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:all-open","v9.4.0"],"title":"Manage
yarn install
scripts","number":250638,"url":"https://github.com/elastic/kibana/pull/250638","mergeCommit":{"message":"Manage
yarn install scripts (#250638)\n\nDisables `yarn install` lifecycle
scripts and adds a config file to\nspecify which scripts
run.\n\nAdds:\n- `ignore-scripts true` to `.yarnrc`\n-
`@kbn/yarn-install-scripts` CLI with:\n- `run`: runs allowed install
scripts defined in\n`packages/kbn-yarn-install-scripts/config.json`\n -
`scan`: lists packages with install scripts\n- Integration into `yarn
kbn bootstrap`\n- CI check that fails if a new or updated package has an
install script\nnot defined in `config.json`\n\nUsage:\n```\n$ yarn kbn
bootstrap\n...\nsuccess yarn dependencies installed\nsuccess Playwright
browsers installed\ninfo running allowlisted install scripts\n info
Running 4 install script(s)...\n info Running install for
chromedriver@143.0.4\n info Running postinstall for cypress@13.17.0\n
info Running postinstall for esbuild@0.25.9\n info Running postinstall
for geckodriver@6.1.0\n succ Install scripts complete\nsuccess install
scripts completed\n\n$ node scripts/yarn_install_scripts run --dry-run\n
info Running 4 install script(s)...\n info [dry-run] Would run install
for chromedriver@143.0.1\n info [dry-run] Would run postinstall for
cypress@13.17.0\n info [dry-run] Would run postinstall for
esbuild@0.25.9\n info [dry-run] Would run postinstall for
geckodriver@6.1.0\n succ Install scripts complete\n\n$ node
scripts/yarn_install_scripts scan\n info
┌─────────────────────────┬──────────┬─────────┬─────────────┬─────────────────────────────────┐\n
│ Package │ Status │ Version │ Lifecycle │ Script │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ chromedriver │ required │ 143.0.1 │ install │ node install.js │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ cypress │ required │ 13.17.0 │ postinstall │ node index.js --exec
install │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ esbuild │ required │ 0.25.9 │ postinstall │ node install.js │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ ... │ ... │ ... │ ... │ ... │\n
└─────────────────────────┴──────────┴─────────┴─────────────┴─────────────────────────────────┘\n
succ Found 18 install scripts: 4 required, 14 skipped, 0
unconfigured\n```\nPart of
https://github.com/elastic/kibana/issues/128025","sha":"d3e316fb87d7ced84abe0da160d08b249eb9d40b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/250638","number":250638,"mergeCommit":{"message":"Manage
yarn install scripts (#250638)\n\nDisables `yarn install` lifecycle
scripts and adds a config file to\nspecify which scripts
run.\n\nAdds:\n- `ignore-scripts true` to `.yarnrc`\n-
`@kbn/yarn-install-scripts` CLI with:\n- `run`: runs allowed install
scripts defined in\n`packages/kbn-yarn-install-scripts/config.json`\n -
`scan`: lists packages with install scripts\n- Integration into `yarn
kbn bootstrap`\n- CI check that fails if a new or updated package has an
install script\nnot defined in `config.json`\n\nUsage:\n```\n$ yarn kbn
bootstrap\n...\nsuccess yarn dependencies installed\nsuccess Playwright
browsers installed\ninfo running allowlisted install scripts\n info
Running 4 install script(s)...\n info Running install for
chromedriver@143.0.4\n info Running postinstall for cypress@13.17.0\n
info Running postinstall for esbuild@0.25.9\n info Running postinstall
for geckodriver@6.1.0\n succ Install scripts complete\nsuccess install
scripts completed\n\n$ node scripts/yarn_install_scripts run --dry-run\n
info Running 4 install script(s)...\n info [dry-run] Would run install
for chromedriver@143.0.1\n info [dry-run] Would run postinstall for
cypress@13.17.0\n info [dry-run] Would run postinstall for
esbuild@0.25.9\n info [dry-run] Would run postinstall for
geckodriver@6.1.0\n succ Install scripts complete\n\n$ node
scripts/yarn_install_scripts scan\n info
┌─────────────────────────┬──────────┬─────────┬─────────────┬─────────────────────────────────┐\n
│ Package │ Status │ Version │ Lifecycle │ Script │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ chromedriver │ required │ 143.0.1 │ install │ node install.js │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ cypress │ required │ 13.17.0 │ postinstall │ node index.js --exec
install │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ esbuild │ required │ 0.25.9 │ postinstall │ node install.js │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ ... │ ... │ ... │ ... │ ... │\n
└─────────────────────────┴──────────┴─────────┴─────────────┴─────────────────────────────────┘\n
succ Found 18 install scripts: 4 required, 14 skipped, 0
unconfigured\n```\nPart of
https://github.com/elastic/kibana/issues/128025","sha":"d3e316fb87d7ced84abe0da160d08b249eb9d40b"}}]}]
BACKPORT-->

Co-authored-by: Jon <jon@elastic.co>
jbudz added a commit that referenced this pull request Jan 29, 2026
# Backport

This will backport the following commits from `main` to `9.2`:
- [Manage yarn install scripts
(#250638)](#250638)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT
[{"author":{"name":"Jon","email":"jon@elastic.co"},"sourceCommit":{"committedDate":"2026-01-28T22:13:49Z","message":"Manage
yarn install scripts (#250638)\n\nDisables `yarn install` lifecycle
scripts and adds a config file to\nspecify which scripts
run.\n\nAdds:\n- `ignore-scripts true` to `.yarnrc`\n-
`@kbn/yarn-install-scripts` CLI with:\n- `run`: runs allowed install
scripts defined in\n`packages/kbn-yarn-install-scripts/config.json`\n -
`scan`: lists packages with install scripts\n- Integration into `yarn
kbn bootstrap`\n- CI check that fails if a new or updated package has an
install script\nnot defined in `config.json`\n\nUsage:\n```\n$ yarn kbn
bootstrap\n...\nsuccess yarn dependencies installed\nsuccess Playwright
browsers installed\ninfo running allowlisted install scripts\n info
Running 4 install script(s)...\n info Running install for
chromedriver@143.0.4\n info Running postinstall for cypress@13.17.0\n
info Running postinstall for esbuild@0.25.9\n info Running postinstall
for geckodriver@6.1.0\n succ Install scripts complete\nsuccess install
scripts completed\n\n$ node scripts/yarn_install_scripts run --dry-run\n
info Running 4 install script(s)...\n info [dry-run] Would run install
for chromedriver@143.0.1\n info [dry-run] Would run postinstall for
cypress@13.17.0\n info [dry-run] Would run postinstall for
esbuild@0.25.9\n info [dry-run] Would run postinstall for
geckodriver@6.1.0\n succ Install scripts complete\n\n$ node
scripts/yarn_install_scripts scan\n info
┌─────────────────────────┬──────────┬─────────┬─────────────┬─────────────────────────────────┐\n
│ Package │ Status │ Version │ Lifecycle │ Script │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ chromedriver │ required │ 143.0.1 │ install │ node install.js │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ cypress │ required │ 13.17.0 │ postinstall │ node index.js --exec
install │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ esbuild │ required │ 0.25.9 │ postinstall │ node install.js │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ ... │ ... │ ... │ ... │ ... │\n
└─────────────────────────┴──────────┴─────────┴─────────────┴─────────────────────────────────┘\n
succ Found 18 install scripts: 4 required, 14 skipped, 0
unconfigured\n```\nPart of
https://github.com/elastic/kibana/issues/128025","sha":"d3e316fb87d7ced84abe0da160d08b249eb9d40b","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:all-open","v9.4.0"],"title":"Manage
yarn install
scripts","number":250638,"url":"https://github.com/elastic/kibana/pull/250638","mergeCommit":{"message":"Manage
yarn install scripts (#250638)\n\nDisables `yarn install` lifecycle
scripts and adds a config file to\nspecify which scripts
run.\n\nAdds:\n- `ignore-scripts true` to `.yarnrc`\n-
`@kbn/yarn-install-scripts` CLI with:\n- `run`: runs allowed install
scripts defined in\n`packages/kbn-yarn-install-scripts/config.json`\n -
`scan`: lists packages with install scripts\n- Integration into `yarn
kbn bootstrap`\n- CI check that fails if a new or updated package has an
install script\nnot defined in `config.json`\n\nUsage:\n```\n$ yarn kbn
bootstrap\n...\nsuccess yarn dependencies installed\nsuccess Playwright
browsers installed\ninfo running allowlisted install scripts\n info
Running 4 install script(s)...\n info Running install for
chromedriver@143.0.4\n info Running postinstall for cypress@13.17.0\n
info Running postinstall for esbuild@0.25.9\n info Running postinstall
for geckodriver@6.1.0\n succ Install scripts complete\nsuccess install
scripts completed\n\n$ node scripts/yarn_install_scripts run --dry-run\n
info Running 4 install script(s)...\n info [dry-run] Would run install
for chromedriver@143.0.1\n info [dry-run] Would run postinstall for
cypress@13.17.0\n info [dry-run] Would run postinstall for
esbuild@0.25.9\n info [dry-run] Would run postinstall for
geckodriver@6.1.0\n succ Install scripts complete\n\n$ node
scripts/yarn_install_scripts scan\n info
┌─────────────────────────┬──────────┬─────────┬─────────────┬─────────────────────────────────┐\n
│ Package │ Status │ Version │ Lifecycle │ Script │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ chromedriver │ required │ 143.0.1 │ install │ node install.js │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ cypress │ required │ 13.17.0 │ postinstall │ node index.js --exec
install │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ esbuild │ required │ 0.25.9 │ postinstall │ node install.js │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ ... │ ... │ ... │ ... │ ... │\n
└─────────────────────────┴──────────┴─────────┴─────────────┴─────────────────────────────────┘\n
succ Found 18 install scripts: 4 required, 14 skipped, 0
unconfigured\n```\nPart of
https://github.com/elastic/kibana/issues/128025","sha":"d3e316fb87d7ced84abe0da160d08b249eb9d40b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/250638","number":250638,"mergeCommit":{"message":"Manage
yarn install scripts (#250638)\n\nDisables `yarn install` lifecycle
scripts and adds a config file to\nspecify which scripts
run.\n\nAdds:\n- `ignore-scripts true` to `.yarnrc`\n-
`@kbn/yarn-install-scripts` CLI with:\n- `run`: runs allowed install
scripts defined in\n`packages/kbn-yarn-install-scripts/config.json`\n -
`scan`: lists packages with install scripts\n- Integration into `yarn
kbn bootstrap`\n- CI check that fails if a new or updated package has an
install script\nnot defined in `config.json`\n\nUsage:\n```\n$ yarn kbn
bootstrap\n...\nsuccess yarn dependencies installed\nsuccess Playwright
browsers installed\ninfo running allowlisted install scripts\n info
Running 4 install script(s)...\n info Running install for
chromedriver@143.0.4\n info Running postinstall for cypress@13.17.0\n
info Running postinstall for esbuild@0.25.9\n info Running postinstall
for geckodriver@6.1.0\n succ Install scripts complete\nsuccess install
scripts completed\n\n$ node scripts/yarn_install_scripts run --dry-run\n
info Running 4 install script(s)...\n info [dry-run] Would run install
for chromedriver@143.0.1\n info [dry-run] Would run postinstall for
cypress@13.17.0\n info [dry-run] Would run postinstall for
esbuild@0.25.9\n info [dry-run] Would run postinstall for
geckodriver@6.1.0\n succ Install scripts complete\n\n$ node
scripts/yarn_install_scripts scan\n info
┌─────────────────────────┬──────────┬─────────┬─────────────┬─────────────────────────────────┐\n
│ Package │ Status │ Version │ Lifecycle │ Script │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ chromedriver │ required │ 143.0.1 │ install │ node install.js │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ cypress │ required │ 13.17.0 │ postinstall │ node index.js --exec
install │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ esbuild │ required │ 0.25.9 │ postinstall │ node install.js │\n
├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤\n
│ ... │ ... │ ... │ ... │ ... │\n
└─────────────────────────┴──────────┴─────────┴─────────────┴─────────────────────────────────┘\n
succ Found 18 install scripts: 4 required, 14 skipped, 0
unconfigured\n```\nPart of
https://github.com/elastic/kibana/issues/128025","sha":"d3e316fb87d7ced84abe0da160d08b249eb9d40b"}}]}]
BACKPORT-->

Co-authored-by: Jon <jon@elastic.co>
jbudz added a commit to jbudz/kibana that referenced this pull request Jan 29, 2026
Disables `yarn install` lifecycle scripts and adds a config file to
specify which scripts run.

Adds:
- `ignore-scripts true` to `.yarnrc`
- `@kbn/yarn-install-scripts` CLI with:
- `run`: runs allowed install scripts defined in
`packages/kbn-yarn-install-scripts/config.json`
  - `scan`: lists packages with install scripts
- Integration into `yarn kbn bootstrap`
- CI check that fails if a new or updated package has an install script
not defined in `config.json`

Usage:
```
$ yarn kbn bootstrap
...
success yarn dependencies installed
success Playwright browsers installed
info running allowlisted install scripts
 info Running 4 install script(s)...
 info Running install for chromedriver@143.0.4
 info Running postinstall for cypress@13.17.0
 info Running postinstall for esbuild@0.25.9
 info Running postinstall for geckodriver@6.1.0
 succ Install scripts complete
success install scripts completed

$ node scripts/yarn_install_scripts run --dry-run
 info Running 4 install script(s)...
 info [dry-run] Would run install for chromedriver@143.0.1
 info [dry-run] Would run postinstall for cypress@13.17.0
 info [dry-run] Would run postinstall for esbuild@0.25.9
 info [dry-run] Would run postinstall for geckodriver@6.1.0
 succ Install scripts complete

$ node scripts/yarn_install_scripts scan
 info ┌─────────────────────────┬──────────┬─────────┬─────────────┬─────────────────────────────────┐
      │ Package                 │ Status   │ Version │ Lifecycle   │ Script                          │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ chromedriver            │ required │ 143.0.1 │ install     │ node install.js                 │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ cypress                 │ required │ 13.17.0 │ postinstall │ node index.js --exec install    │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ esbuild                 │ required │ 0.25.9  │ postinstall │ node install.js                 │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ ...                     │ ...      │ ...     │ ...         │ ...                             │
      └─────────────────────────┴──────────┴─────────┴─────────────┴─────────────────────────────────┘
 succ Found 18 install scripts: 4 required, 14 skipped, 0 unconfigured
```
Part of elastic#128025
jbudz added a commit to jbudz/kibana that referenced this pull request Jan 29, 2026
Disables `yarn install` lifecycle scripts and adds a config file to
specify which scripts run.

Adds:
- `ignore-scripts true` to `.yarnrc`
- `@kbn/yarn-install-scripts` CLI with:
- `run`: runs allowed install scripts defined in
`packages/kbn-yarn-install-scripts/config.json`
  - `scan`: lists packages with install scripts
- Integration into `yarn kbn bootstrap`
- CI check that fails if a new or updated package has an install script
not defined in `config.json`

Usage:
```
$ yarn kbn bootstrap
...
success yarn dependencies installed
success Playwright browsers installed
info running allowlisted install scripts
 info Running 4 install script(s)...
 info Running install for chromedriver@143.0.4
 info Running postinstall for cypress@13.17.0
 info Running postinstall for esbuild@0.25.9
 info Running postinstall for geckodriver@6.1.0
 succ Install scripts complete
success install scripts completed

$ node scripts/yarn_install_scripts run --dry-run
 info Running 4 install script(s)...
 info [dry-run] Would run install for chromedriver@143.0.1
 info [dry-run] Would run postinstall for cypress@13.17.0
 info [dry-run] Would run postinstall for esbuild@0.25.9
 info [dry-run] Would run postinstall for geckodriver@6.1.0
 succ Install scripts complete

$ node scripts/yarn_install_scripts scan
 info ┌─────────────────────────┬──────────┬─────────┬─────────────┬─────────────────────────────────┐
      │ Package                 │ Status   │ Version │ Lifecycle   │ Script                          │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ chromedriver            │ required │ 143.0.1 │ install     │ node install.js                 │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ cypress                 │ required │ 13.17.0 │ postinstall │ node index.js --exec install    │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ esbuild                 │ required │ 0.25.9  │ postinstall │ node install.js                 │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ ...                     │ ...      │ ...     │ ...         │ ...                             │
      └─────────────────────────┴──────────┴─────────┴─────────────┴─────────────────────────────────┘
 succ Found 18 install scripts: 4 required, 14 skipped, 0 unconfigured
```
Part of elastic#128025
jbudz added a commit to jbudz/kibana that referenced this pull request Jan 29, 2026
Disables `yarn install` lifecycle scripts and adds a config file to
specify which scripts run.

Adds:
- `ignore-scripts true` to `.yarnrc`
- `@kbn/yarn-install-scripts` CLI with:
- `run`: runs allowed install scripts defined in
`packages/kbn-yarn-install-scripts/config.json`
  - `scan`: lists packages with install scripts
- Integration into `yarn kbn bootstrap`
- CI check that fails if a new or updated package has an install script
not defined in `config.json`

Usage:
```
$ yarn kbn bootstrap
...
success yarn dependencies installed
success Playwright browsers installed
info running allowlisted install scripts
 info Running 4 install script(s)...
 info Running install for chromedriver@143.0.4
 info Running postinstall for cypress@13.17.0
 info Running postinstall for esbuild@0.25.9
 info Running postinstall for geckodriver@6.1.0
 succ Install scripts complete
success install scripts completed

$ node scripts/yarn_install_scripts run --dry-run
 info Running 4 install script(s)...
 info [dry-run] Would run install for chromedriver@143.0.1
 info [dry-run] Would run postinstall for cypress@13.17.0
 info [dry-run] Would run postinstall for esbuild@0.25.9
 info [dry-run] Would run postinstall for geckodriver@6.1.0
 succ Install scripts complete

$ node scripts/yarn_install_scripts scan
 info ┌─────────────────────────┬──────────┬─────────┬─────────────┬─────────────────────────────────┐
      │ Package                 │ Status   │ Version │ Lifecycle   │ Script                          │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ chromedriver            │ required │ 143.0.1 │ install     │ node install.js                 │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ cypress                 │ required │ 13.17.0 │ postinstall │ node index.js --exec install    │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ esbuild                 │ required │ 0.25.9  │ postinstall │ node install.js                 │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ ...                     │ ...      │ ...     │ ...         │ ...                             │
      └─────────────────────────┴──────────┴─────────┴─────────────┴─────────────────────────────────┘
 succ Found 18 install scripts: 4 required, 14 skipped, 0 unconfigured
```
Part of elastic#128025
hannahbrooks pushed a commit to hannahbrooks/kibana that referenced this pull request Jan 30, 2026
Disables `yarn install` lifecycle scripts and adds a config file to
specify which scripts run.

Adds:
- `ignore-scripts true` to `.yarnrc`
- `@kbn/yarn-install-scripts` CLI with:
- `run`: runs allowed install scripts defined in
`packages/kbn-yarn-install-scripts/config.json`
  - `scan`: lists packages with install scripts
- Integration into `yarn kbn bootstrap`
- CI check that fails if a new or updated package has an install script
not defined in `config.json`

Usage:
```
$ yarn kbn bootstrap
...
success yarn dependencies installed
success Playwright browsers installed
info running allowlisted install scripts
 info Running 4 install script(s)...
 info Running install for chromedriver@143.0.4
 info Running postinstall for cypress@13.17.0
 info Running postinstall for esbuild@0.25.9
 info Running postinstall for geckodriver@6.1.0
 succ Install scripts complete
success install scripts completed

$ node scripts/yarn_install_scripts run --dry-run
 info Running 4 install script(s)...
 info [dry-run] Would run install for chromedriver@143.0.1
 info [dry-run] Would run postinstall for cypress@13.17.0
 info [dry-run] Would run postinstall for esbuild@0.25.9
 info [dry-run] Would run postinstall for geckodriver@6.1.0
 succ Install scripts complete

$ node scripts/yarn_install_scripts scan
 info ┌─────────────────────────┬──────────┬─────────┬─────────────┬─────────────────────────────────┐
      │ Package                 │ Status   │ Version │ Lifecycle   │ Script                          │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ chromedriver            │ required │ 143.0.1 │ install     │ node install.js                 │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ cypress                 │ required │ 13.17.0 │ postinstall │ node index.js --exec install    │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ esbuild                 │ required │ 0.25.9  │ postinstall │ node install.js                 │
      ├─────────────────────────┼──────────┼─────────┼─────────────┼─────────────────────────────────┤
      │ ...                     │ ...      │ ...     │ ...         │ ...                             │
      └─────────────────────────┴──────────┴─────────┴─────────────┴─────────────────────────────────┘
 succ Found 18 install scripts: 4 required, 14 skipped, 0 unconfigured
```
Part of elastic#128025
jbudz added a commit that referenced this pull request Mar 9, 2026
In #250638 we moved lifecycle
scripts to our own managed CLI.

Currently we're running these scripts every time bootstrap is run. This
updates bootstrap to only run scripts when the yarn integrity has
changed, matching the previous behavior.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Bootstrap command now conditionally executes install scripts only when
necessary, improving efficiency during the setup process.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 9, 2026
…5175)

In elastic#250638 we moved lifecycle
scripts to our own managed CLI.

Currently we're running these scripts every time bootstrap is run. This
updates bootstrap to only run scripts when the yarn integrity has
changed, matching the previous behavior.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Bootstrap command now conditionally executes install scripts only when
necessary, improving efficiency during the setup process.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

(cherry picked from commit c39c2de)
DennisKo pushed a commit to DennisKo/kibana that referenced this pull request Mar 9, 2026
…5175)

In elastic#250638 we moved lifecycle
scripts to our own managed CLI.

Currently we're running these scripts every time bootstrap is run. This
updates bootstrap to only run scripts when the yarn integrity has
changed, matching the previous behavior.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Bootstrap command now conditionally executes install scripts only when
necessary, improving efficiency during the setup process.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
kibanamachine added a commit that referenced this pull request Mar 9, 2026
) (#256757)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[kbn_pm] Only install scripts when yarn integrity changes
(#255175)](#255175)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT
[{"author":{"name":"Jon","email":"jon@elastic.co"},"sourceCommit":{"committedDate":"2026-03-09T18:35:28Z","message":"[kbn_pm]
Only install scripts when yarn integrity changes (#255175)\n\nIn
#250638 we moved
lifecycle\nscripts to our own managed CLI.\n\nCurrently we're running
these scripts every time bootstrap is run. This\nupdates bootstrap to
only run scripts when the yarn integrity has\nchanged, matching the
previous behavior.\n\n\n## Summary by CodeRabbit\n\n* **Bug Fixes**\n*
Bootstrap command now conditionally executes install scripts only
when\nnecessary, improving efficiency during the setup
process.\n","sha":"c39c2ded7879074f8813592769e3499a6841f245","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:all-open","v9.4.0"],"title":"[kbn_pm]
Only install scripts when yarn integrity
changes","number":255175,"url":"https://github.com/elastic/kibana/pull/255175","mergeCommit":{"message":"[kbn_pm]
Only install scripts when yarn integrity changes (#255175)\n\nIn
#250638 we moved
lifecycle\nscripts to our own managed CLI.\n\nCurrently we're running
these scripts every time bootstrap is run. This\nupdates bootstrap to
only run scripts when the yarn integrity has\nchanged, matching the
previous behavior.\n\n\n## Summary by CodeRabbit\n\n* **Bug Fixes**\n*
Bootstrap command now conditionally executes install scripts only
when\nnecessary, improving efficiency during the setup
process.\n","sha":"c39c2ded7879074f8813592769e3499a6841f245"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/255175","number":255175,"mergeCommit":{"message":"[kbn_pm]
Only install scripts when yarn integrity changes (#255175)\n\nIn
#250638 we moved
lifecycle\nscripts to our own managed CLI.\n\nCurrently we're running
these scripts every time bootstrap is run. This\nupdates bootstrap to
only run scripts when the yarn integrity has\nchanged, matching the
previous behavior.\n\n\n## Summary by CodeRabbit\n\n* **Bug Fixes**\n*
Bootstrap command now conditionally executes install scripts only
when\nnecessary, improving efficiency during the setup
process.\n","sha":"c39c2ded7879074f8813592769e3499a6841f245"}}]}]
BACKPORT-->

Co-authored-by: Jon <jon@elastic.co>
qn895 pushed a commit to qn895/kibana that referenced this pull request Mar 11, 2026
…5175)

In elastic#250638 we moved lifecycle
scripts to our own managed CLI.

Currently we're running these scripts every time bootstrap is run. This
updates bootstrap to only run scripts when the yarn integrity has
changed, matching the previous behavior.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Bootstrap command now conditionally executes install scripts only when
necessary, improving efficiency during the setup process.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
jbudz added a commit to jbudz/kibana that referenced this pull request Mar 16, 2026
…5175)

In elastic#250638 we moved lifecycle
scripts to our own managed CLI.

Currently we're running these scripts every time bootstrap is run. This
updates bootstrap to only run scripts when the yarn integrity has
changed, matching the previous behavior.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

* **Bug Fixes**
* Bootstrap command now conditionally executes install scripts only when
necessary, improving efficiency during the setup process.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
jbudz added a commit to jbudz/kibana that referenced this pull request Mar 16, 2026
…5175)

In elastic#250638 we moved lifecycle
scripts to our own managed CLI.

Currently we're running these scripts every time bootstrap is run. This
updates bootstrap to only run scripts when the yarn integrity has
changed, matching the previous behavior.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

* **Bug Fixes**
* Bootstrap command now conditionally executes install scripts only when
necessary, improving efficiency during the setup process.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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 release_note:skip Skip the PR/issue when compiling release notes Team:Operations Kibana-Operations Team v9.2.5 v9.3.0 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants