Skip to content

[es_snapshots/build] Skip native launcher#258428

Merged
delanni merged 2 commits intoelastic:mainfrom
jbudz:fix-es-snapshot-build
Mar 19, 2026
Merged

[es_snapshots/build] Skip native launcher#258428
delanni merged 2 commits intoelastic:mainfrom
jbudz:fix-es-snapshot-build

Conversation

@jbudz
Copy link
Copy Markdown
Contributor

@jbudz jbudz commented Mar 18, 2026

Skips the optional elasticsearch native launcher build step introduced in elastic/elasticsearch#143712. We're running this build using docker-in-docker and required host filesystem paths are not available.

As a follow up, we can look into splitting the docker build (the DinD portion) out from of the native build.

Fixes https://buildkite.com/elastic/kibana-elasticsearch-snapshot-build/builds/7896
Test build https://buildkite.com/elastic/kibana-elasticsearch-snapshot-build/builds/7899

Summary by CodeRabbit

  • Chores
    • Optimized build process for distribution and cloud image packages by streamlining compilation steps.

@jbudz jbudz added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:Operations Kibana-Operations Team labels Mar 18, 2026
@jbudz jbudz marked this pull request as ready for review March 18, 2026 19:39
@jbudz jbudz requested a review from a team as a code owner March 18, 2026 19:39
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 18, 2026

📝 Walkthrough

Walkthrough

This change modifies a Buildkite build script to exclude two native image build tasks (nativeImageLinuxX64 and nativeImageLinuxAarch64) from two Gradle assemble invocations in the Elasticsearch snapshot build process.

Changes

Cohort / File(s) Summary
Build Configuration
.buildkite/scripts/steps/es_snapshots/build.sh
Adds --exclude flags to skip nativeImageLinuxX64 and nativeImageLinuxAarch64 tasks in both the Elasticsearch distribution archive build and Kibana cloud image export build steps.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • tylersmalley
  • delanni
🚥 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 '[es_snapshots/build] Skip native launcher' is specific and directly related to the main change: skipping native image builds in the Elasticsearch snapshots build process.
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
📝 Coding Plan
  • Generate coding plan for human review comments

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

Tip

You can get early access to new features in CodeRabbit.

Enable the early_access setting to enable early access features such as new models, tools, and more.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.buildkite/scripts/steps/es_snapshots/build.sh (1)

79-80: Consider deduplicating the native-launcher exclusion args.

Both Gradle invocations now repeat the same two -x flags; extracting them once will reduce drift risk later.

♻️ Optional cleanup
 export PATH="$JAVA_HOME/bin:$PATH"
 export DOCKER_BUILDKIT=1
+
+NATIVE_LAUNCHER_EXCLUDES=(
+  -x :distribution:tools:server-launcher:nativeImageLinuxX64
+  -x :distribution:tools:server-launcher:nativeImageLinuxAarch64
+)
 
 # The Elasticsearch Dockerfile needs to be built with root privileges, but Docker on our servers is running using a non-root user
 # So, let's use docker-in-docker to temporarily create a privileged docker daemon to run `docker build` on
@@
 ./gradlew \
   :distribution:archives:darwin-aarch64-tar:assemble \
   :distribution:archives:darwin-tar:assemble \
   :distribution:docker:docker-export:assemble \
   :distribution:archives:linux-aarch64-tar:assemble \
   :distribution:archives:linux-tar:assemble \
   :distribution:archives:windows-zip:assemble \
-  -x :distribution:tools:server-launcher:nativeImageLinuxX64 \
-  -x :distribution:tools:server-launcher:nativeImageLinuxAarch64 \
+  "${NATIVE_LAUNCHER_EXCLUDES[@]}" \
   --parallel
@@
 ./gradlew :distribution:docker:cloud-ess-docker-export:assemble \
-  -x :distribution:tools:server-launcher:nativeImageLinuxX64 \
-  -x :distribution:tools:server-launcher:nativeImageLinuxAarch64 && {
+  "${NATIVE_LAUNCHER_EXCLUDES[@]}" && {

Also applies to: 94-96

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.buildkite/scripts/steps/es_snapshots/build.sh around lines 79 - 80, The two
Gradle invocations repeat the same exclusion flags (-x
:distribution:tools:server-launcher:nativeImageLinuxX64 and -x
:distribution:tools:server-launcher:nativeImageLinuxAarch64); extract these two
flags into a single shell variable (e.g., NATIVE_LAUNCHER_EXCLUDES) and reuse
that variable in both Gradle calls so the exclusions are defined once and
shared, updating the invocations that currently include those -x flags to
reference the new variable.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.buildkite/scripts/steps/es_snapshots/build.sh:
- Around line 79-80: The two Gradle invocations repeat the same exclusion flags
(-x :distribution:tools:server-launcher:nativeImageLinuxX64 and -x
:distribution:tools:server-launcher:nativeImageLinuxAarch64); extract these two
flags into a single shell variable (e.g., NATIVE_LAUNCHER_EXCLUDES) and reuse
that variable in both Gradle calls so the exclusions are defined once and
shared, updating the invocations that currently include those -x flags to
reference the new variable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 54976281-3553-4f6a-b076-08d3355a6e7e

📥 Commits

Reviewing files that changed from the base of the PR and between efa2d14 and f6a7875.

📒 Files selected for processing (1)
  • .buildkite/scripts/steps/es_snapshots/build.sh

@mark-vieira
Copy link
Copy Markdown

As a follow up, we can look into splitting the docker build (the DinD portion) out from of the native build.

Sorry for any disruption here @jbudz. Those docker tasks are "optional" and should be automatically skipped if we don't detect docker on the system, or if we don't support the given architecture. For now we support falling back to the normal Java launcher and don't intend on removing that support anytime soon.

@delanni delanni merged commit c7dc134 into elastic:main Mar 19, 2026
21 checks passed
jeramysoucy pushed a commit to jeramysoucy/kibana that referenced this pull request Mar 26, 2026
Skips the optional elasticsearch native launcher build step introduced
in elastic/elasticsearch#143712. We're running
this build using docker-in-docker and required host filesystem paths are
not available.

As a follow up, we can look into splitting the docker build (the DinD
portion) out from of the native build.

Fixes
https://buildkite.com/elastic/kibana-elasticsearch-snapshot-build/builds/7896
Test build
https://buildkite.com/elastic/kibana-elasticsearch-snapshot-build/builds/7899

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

## Summary by CodeRabbit

* **Chores**
* Optimized build process for distribution and cloud image packages by
streamlining compilation steps.

<!-- 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:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Operations Kibana-Operations Team v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants