Skip to content

[kbn_pm] Only install scripts when yarn integrity changes#255175

Merged
jbudz merged 2 commits intoelastic:mainfrom
jbudz:bootstrap-scripts
Mar 9, 2026
Merged

[kbn_pm] Only install scripts when yarn integrity changes#255175
jbudz merged 2 commits intoelastic:mainfrom
jbudz:bootstrap-scripts

Conversation

@jbudz
Copy link
Copy Markdown
Contributor

@jbudz jbudz commented Feb 26, 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.

Summary by CodeRabbit

  • Bug Fixes
    • Bootstrap command now conditionally executes install scripts only when necessary, improving efficiency during the setup process.

@jbudz jbudz requested a review from a team as a code owner February 26, 2026 19:50
@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 Feb 26, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: ea1a4c82-5c47-4049-a336-ec5345bab940

📥 Commits

Reviewing files that changed from the base of the PR and between 82c3537 and 772c700.

📒 Files selected for processing (1)
  • src/dev/kbn_pm/src/commands/bootstrap/bootstrap_command.mjs

📝 Walkthrough

Walkthrough

The bootstrap command's install step is now conditionally executed based on the shouldInstall flag. Previously, the install scripts always executed during bootstrap. The install step now only runs when shouldInstall is true, preserving timing instrumentation via conditional ternary logic.

Changes

Cohort / File(s) Summary
Bootstrap Install Step
src/dev/kbn_pm/src/commands/bootstrap/bootstrap_command.mjs
Wrapped "run install scripts" step in conditional ternary operator to execute only when shouldInstall is true, maintaining timing instrumentation while skipping unnecessary installations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: conditionally executing install scripts only when yarn integrity changes, which matches the core modification in the bootstrap command.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 2d5460c0-8f5e-4b97-959b-ba35a0cb4560

📥 Commits

Reviewing files that changed from the base of the PR and between 82c3537 and 772c700.

📒 Files selected for processing (1)
  • src/dev/kbn_pm/src/commands/bootstrap/bootstrap_command.mjs

📝 Walkthrough

Walkthrough

The bootstrap command's install-scripts step is now conditionally executed based on a shouldInstall flag, rather than always running. When the condition is not met, an undefined entry is placed in the Promise.all array instead.

Changes

Cohort / File(s) Summary
Bootstrap Command
src/dev/kbn_pm/src/commands/bootstrap/bootstrap_command.mjs
Conditionalized install-scripts step execution within Promise.all to only run when shouldInstall is true; otherwise entry is left undefined.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: conditionalizing the install-scripts step to only run when yarn integrity changes, which aligns with the PR's objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] x-pack/solutions/security/test/cloud_security_posture_functional/config.ts / Cloud Security Posture Security Alerts Page - Graph visualization expanded flyout - show alert details

Metrics [docs]

✅ unchanged

@jbudz jbudz merged commit c39c2de into elastic:main Mar 9, 2026
18 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.2, 9.3

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

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)
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 Some backports could not be created

Status Branch Result
8.19 Backport failed because of merge conflicts
9.2 Backport failed because of merge conflicts
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 255175

Questions ?

Please refer to the Backport tool documentation

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 -->
jbudz added a commit that referenced this pull request Mar 16, 2026
) (#257987)

Backports #255175.  

Note that timing is skipped on main, while here will continue to report.
This is consistent other checks in this file on this branch.
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.3.2 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants