[es_snapshots/build] Skip native launcher#258428
Conversation
|
Pinging @elastic/kibana-operations (Team:Operations) |
📝 WalkthroughWalkthroughThis 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment Tip You can get early access to new features in CodeRabbit.Enable the |
There was a problem hiding this comment.
🧹 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
-xflags; 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
📒 Files selected for processing (1)
.buildkite/scripts/steps/es_snapshots/build.sh
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. |
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 -->
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