Repository: wolfi-dev/os
Pull request #52724: Adding VersionStream for opensearch-3
Author: login: octo-sts[bot]
Labels: name: automated pr
name: bincapz/pass
description: bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages.
name: service:version-stream
name: ai/skip-comment
description: Stop AI from commenting on PR
Created: 2025-05-07T14:42:46Z | Merged: 2025-05-14T21:33:33Z



Diff:
diff --git a/opensearch-3.yaml b/opensearch-3.yaml
new file mode 100644
index 000000000000..ee33f4e9f015
--- /dev/null
+++ b/opensearch-3.yaml
@@ -0,0 +1,271 @@
+# This melange yaml is complex.  The context is opensearch releases the main package and many plugins, some in the same repo
+# and some in different repos.  They all share the same version number so rather than having a separate melange yaml for each
+# package, we package them all in one build so they can be released together.  For plugins to run they need to be built with the
+# same version they are installed into.
+package:
+  name: opensearch-3
+  version: "3.0.0"
+  epoch: 0
+  description: Open source distributed and RESTful search engine.
+  copyright:
+    - license: Apache-2.0
+  dependencies:
+    runtime:
+      - bash # some helper scripts use bash
+      - busybox # some helper scripts use busybox
+      - openjdk-21-jre
+
+vars:
+  plugin_version_qualifier: "0" # external plugins use the same version as the main package with a qualifier
+
+environment:
+  contents:
+    packages:
+      - bash
+      - busybox
+      - ca-certificates-bundle
+      - curl
+      - gradle
+      - openjdk-21-default-jdk
+      - patch
+      - unzip
+  environment:
+    JAVA_HOME: /usr/lib/jvm/java-21-openjdk
+    LANG: "en_US.UTF-8"
+
+data:
+  - name: internal-plugins
+    items:
+      # plugin_name: cve patch list
+      analysis-icu: ""
+      analysis-kuromoji: ""
+      analysis-nori: ""
+      analysis-phonetic: ""
+      analysis-smartcn: ""
+      analysis-stempel: ""
+      analysis-ukrainian: ""
+      crypto-kms: ""
+      discovery-azure-classic: ""
+      discovery-ec2: ""
+      discovery-gce: ""
+      identity-shiro: ""
+      ingest-attachment: ""
+      mapper-annotated-text: ""
+      mapper-murmur3: ""
+      mapper-size: ""
+      repository-azure: ""
+      repository-gcs: ""
+      repository-s3: ""
+      store-smb: ""
+      telemetry-otel: ""
+
+  - name: external-plugins
+    items:
+      # plugin_name: cve patch list
+      alerting: ""
+      anomaly-detection: ""
+      asynchronous-search: ""
+      cross-cluster-replication: ""
+      custom-codecs: ""
+      geospatial: ""
+      index-management: ""
+      job-scheduler: ""
+      k-nn: ""
+      ml-commons: ""
+      neural-search: ""
+      notifications: ""
+      observability: ""
+      performance-analyzer: ""
+      reporting: ""
+      security: ""
+      security-analytics: ""
+      sql: ""
+
+pipeline:
+  - uses: git-checkout
+    with:
+      repository: https://github.com/opensearch-project/OpenSearch
+      tag: ${{package.version}}
+      expected-commit: dc4efa821904cc2d7ea7ef61c0f577d3fc0d8be9
+
+  - runs: |
+      echo "org.gradle.daemon=false" >> gradle.properties
+      gradle localDistro --parallel -Dbuild.snapshot="false" -Dbuild.version_qualifier=""
+      mkdir -p ${{targets.destdir}}/usr/share/opensearch/logs
+
+      install -dm777 ${{targets.destdir}}/usr/share/opensearch/
+      mv build/distribution/local/opensearch-${{package.version}}/agent/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/bin/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/lib/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/config/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/modules/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/plugins/ ${{targets.destdir}}/usr/share/opensearch
+
+      mv ./distribution/docker/src/docker/config/opensearch.yml ./distribution/docker/src/docker/config/log4j2.properties ${{targets.destdir}}/usr/share/opensearch/config
+
+  - runs: |
+      # Use a modified entrypoint script as the official one duplicates env vars and system properties used by the JVM on startup
+      # This means we avoid errors like: ERROR: setting [discovery.seed_hosts] already set, saw [opensearch-cluster-master-headless] and [opensearch-cluster-master-headless]
+      mv opensearch-docker-entrypoint.sh  ${{targets.destdir}}/usr/share/opensearch/bin/
+
+  - runs: |
+      # Set permissions to read/write the config dir
+      chmod -R 755 ${{targets.destdir}}/usr/share/opensearch/
+
+      mkdir -p ${{targets.destdir}}/usr/bin
+      for i in ${{targets.destdir}}/usr/share/opensearch/bin/*; do
+        name=$(basename $i)
+        ln -sf /usr/share/opensearch/bin/$name ${{targets.destdir}}/usr/bin/$name
+      done
+
+      chmod -R 666 ${{targets.destdir}}/usr/share/opensearch/config/opensearch.yml
+
+      # Manually set this to docker: https://github.com/opensearch-project/OpenSearch/blob/5f8193021215cd6979fde66474ec8d74d32ac91a/distribution/docker/src/docker/Dockerfile#LL49C90-L49C129
+      sed -i -e 's/OPENSEARCH_DISTRIBUTION_TYPE=tar/OPENSEARCH_DISTRIBUTION_TYPE=docker/'  ${{targets.destdir}}/usr/share/opensearch/bin/opensearch-env
+
+  - runs: |
+      cd plugins
+      gradle assemble -Dbuild.snapshot="false" -Dbuild.version_qualifier="" --stacktrace
+
+      # useful for finding generated zip file we use to extract into the final apk
+      find . -name "*.zip"
+
+  - runs: |
+      # Remove files so they don't conflict with subpackages
+      echo "Removing files that conflict with subpackages"
+      rm -rf /home/build/settings.gradle
+
+  - uses: strip
+
+subpackages:
+  - range: internal-plugins
+    name: ${{package.name}}-${{range.key}}
+    pipeline:
+      - runs: |
+          mkdir -p ${{targets.contextdir}}/usr/share/opensearch/plugins/opensearch-${{range.key}}
+          unzip "./plugins/${{range.key}}/build/distributions/${{range.key}}-${{package.version}}.zip" -d "${{targets.contextdir}}/usr/share/opensearch/plugins/opensearch-${{range.key}}"
+
+  - range: external-plugins
+    name: ${{package.name}}-${{range.key}}
+    pipeline:
+      # Delete other plugins. Opensearch can only build one at a time, otherwise we run into conflicting dependencies version issues with yarn.
+      - runs: |
+          rm -r plugins/* || true
+      - uses: git-checkout
+        with:
+          repository: https://github.com/opensearch-project/${{range.key}}.git
+          tag: ${{package.version}}.${{vars.plugin_version_qualifier}}
+          destination: ./plugins/${{range.key}}
+      - runs: |
+          cd ./plugins/${{range.key}}
+
+          # apply any CVE patches
+          if [ -n "${{range.value}}" ]; then
+              patch -p1 < "../../${{range.value}}"
+          fi
+
+          # notifications source live in a subfolder
+          if [ "${{range.key}}" = "notifications" ]; then
+            cd ./notifications
+          fi
+
+          # skip check task, using -x doesn't append to an existing list
+          # job scheduler requires a test cluster to connect to so skip verification checks
+          if [ "${{range.key}}" = "job-scheduler" ]; then
+            sed -i '/startParameter.excludedTaskNames=\[/ s/]/, "check"]/g' settings.gradle
+          fi
+
+          echo "org.gradle.daemon=false" >> gradle.properties
+          ./gradlew clean assemble -Dbuild.snapshot="false" -Dbuild.version_qualifier="" -Dopensearch.version="${{package.version}}" -x check -x integTest -x javadoc -PfailOnJavadocWarning=false --stacktrace
+
+          # useful for finding generated zip file we use to extract into the final apk
+          find . -name "*.zip"
+
+          # Extract the value of rootProject.name, this is because the key is not always the same as the plugin name
+          # note: not all plugins have a settings.gradle file
+          plugin_name=$(grep "^rootProject.name" settings.gradle 2>/dev/null | awk -F" = " '{print $2}' | tr -d "'" | tr -d '"')
+
+          # Check if plugin_name is empty and assign default if it is
+          if [ -z "$plugin_name" ]; then
+              plugin_name=${{range.key}}
+          fi
+
+          echo "Plugin name: $plugin_name"
+
+          # Remove any existing "opensearch-" prefix before adding it to ensure it's not duplicated
+          plugin_name=$(echo $plugin_name | sed 's/^opensearch-//')
+
+          # Ensure the plugin_name has the "opensearch-" prefix
+          plugin_name="opensearch-$plugin_name"
+
+          echo "Final plugin name: $plugin_name"
+
+          mkdir -p "${{targets.contextdir}}/usr/share/opensearch/plugins"
+
+          # Define the base path for the unzip destination
+          destination_base="${{targets.contextdir}}/usr/share/opensearch"
+
+          # Determine the source directory based on the plugin key
+          case "${{range.key}}" in
+              "alerting")
+                  zip_dir="./alerting"
+                  ;;
+              "ml-commons"|"sql")
+                  zip_dir="./plugin"
+                  ;;
+              "notifications")
+                  zip_dir="./notifications"
+                  install -Dm644 notifications/src/main/config/notifications.yml "${destination_base}/config/${plugin_name}/notifications.yml"
+
+                  # Special handling for notifications core
+                  unzip "./core/build/distributions/${plugin_name}-core-${{package.version}}.${{vars.plugin_version_qualifier}}.zip" -d "${destination_base}/plugins/${plugin_name}-core"
+                  install -Dm644 core/src/main/config/notifications-core.yml "${destination_base}/config/${plugin_name}-core/notifications-core.yml"
+                  ;;
+              "observability")
+                  zip_dir="."
+                  install -Dm644 src/main/config/observability.yml "${destination_base}/config/${plugin_name}/observability.yml"
+                  ;;
+              "performance-analyzer")
+                  zip_dir="."
+                  mkdir -p "${destination_base}/config/${plugin_name}/"
+                  install -Dm644 config/* "${destination_base}/config/${plugin_name}/"
+                  ;;
+              "reporting")
+                  zip_dir="."
+                  install -Dm644 src/main/config/reports-scheduler.yml "${destination_base}/config/${plugin_name}/reports-scheduler.yml"
+                  ;;
+              "security")
+                  zip_dir="."
+                  mkdir -p "${destination_base}/config/${plugin_name}/"
+                  install -Dm644 config/* "${destination_base}/config/${plugin_name}/"
+                  ;;
+              *)
+                  zip_dir="."
+                  ;;
+          esac
+
+          # Unzip the main plugin distribution
+          unzip "${zip_dir}/build/distributions/${plugin_name}-${{package.version}}.${{vars.plugin_version_qualifier}}.zip" -d "${destination_base}/plugins/${plugin_name}"
+      - uses: strip
+
+update:
+  enabled: true
+  ignore-regex-patterns:
+    - -beta
+    - -alpha
+  github:
+    identifier: opensearch-project/OpenSearch
+    tag-filter-prefix: "3."
+
+test:
+  environment:
+    contents:
+      packages:
+        - openjdk-21-default-jvm
+        - bash
+  pipeline:
+    - runs: |
+        export JAVA_HOME=/usr/lib/jvm/default-jvm
+        opensearch --version
+        opensearch-env-from-file --version
+        opensearch-env-from-file --help
diff --git a/opensearch-3/analyzer-commons-io-gradle-build.patch b/opensearch-3/analyzer-commons-io-gradle-build.patch
new file mode 100644
index 000000000000..2ce243c4c137
--- /dev/null
+++ b/opensearch-3/analyzer-commons-io-gradle-build.patch
@@ -0,0 +1,15 @@
+diff --git a/build.gradle b/build.gradle
+index 4433815..1c98868 100644
+--- a/build.gradle
++++ b/build.gradle
+@@ -495,6 +495,10 @@ task buildRca() {
+     }
+ 
+     doLast {
++        exec {
++            workingDir("$rcaProjectDir")
++            commandLine 'git', 'apply', '../../analyzer-commons-io.patch'
++        }
+         exec {
+             workingDir("$rcaProjectDir")
+             if (buildVersionQualifier == null || buildVersionQualifier == '' || buildVersionQualifier == 'null') {
diff --git a/opensearch-3/opensearch-docker-entrypoint.sh b/opensearch-3/opensearch-docker-entrypoint.sh
new file mode 100755
index 000000000000..75c34b2e9f85
--- /dev/null
+++ b/opensearch-3/opensearch-docker-entrypoint.sh
@@ -0,0 +1,122 @@
+#!/bin/bash
+
+# Use a modified entrypoint script as the official one duplicates env vars and system properties used by the JVM on startup
+# This means we avoid errors like: ERROR: setting [discovery.seed_hosts] already set, saw [opensearch-cluster-master-headless] and [opensearch-cluster-master-headless]
+# This is based on the upstream script from https://raw.githubusercontent.com/opensearch-project/opensearch-build/2.11.1/docker/release/config/opensearch/opensearch-docker-entrypoint.sh
+
+# Copyright OpenSearch Contributors
+# SPDX-License-Identifier: Apache-2.0
+
+# This script specify the entrypoint startup actions for opensearch
+# It will start both opensearch and performance analyzer plugin cli
+# If either process failed, the entire docker container will be removed
+# in favor of a newly started container
+
+# Export OpenSearch Home
+export OPENSEARCH_HOME=/usr/share/opensearch
+export OPENSEARCH_PATH_CONF=$OPENSEARCH_HOME/config
+
+# The virtual file /proc/self/cgroup should list the current cgroup
+# membership. For each hierarchy, you can follow the cgroup path from
+# this file to the cgroup filesystem (usually /sys/fs/cgroup/) and
+# introspect the statistics for the cgroup for the given
+# hierarchy. Alas, Docker breaks this by mounting the container
+# statistics at the root while leaving the cgroup paths as the actual
+# paths. Therefore, OpenSearch provides a mechanism to override
+# reading the cgroup path from /proc/self/cgroup and instead uses the
+# cgroup path defined the JVM system property
+# opensearch.cgroups.hierarchy.override. Therefore, we set this value here so
+# that cgroup statistics are available for the container this process
+# will run in.
+export OPENSEARCH_JAVA_OPTS="-Dopensearch.cgroups.hierarchy.override=/ $OPENSEARCH_JAVA_OPTS"
+
+# Security Plugin
+function setupSecurityPlugin {
+    SECURITY_PLUGIN="opensearch-security"
+
+    if [ -d "$OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN" ]; then
+        if [ "$DISABLE_INSTALL_DEMO_CONFIG" = "true" ]; then
+            echo "Disabling execution of install_demo_configuration.sh for OpenSearch Security Plugin"
+        else
+            echo "Enabling execution of install_demo_configuration.sh for OpenSearch Security Plugin"
+            bash $OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN/tools/install_demo_configuration.sh -y -i -s
+        fi
+
+        if [ "$DISABLE_SECURITY_PLUGIN" = "true" ]; then
+            echo "Disabling OpenSearch Security Plugin"
+            opensearch_opt="-Eplugins.security.disabled=true"
+            opensearch_opts+=("${opensearch_opt}")
+        else
+            echo "Enabling OpenSearch Security Plugin"
+        fi
+    else
+        echo "OpenSearch Security Plugin does not exist, disable by default"
+    fi
+}
+
+# Performance Analyzer Plugin
+function setupPerformanceAnalyzerPlugin {
+    PERFORMANCE_ANALYZER_PLUGIN="opensearch-performance-analyzer"
+    if [ -d "$OPENSEARCH_HOME/plugins/$PERFORMANCE_ANALYZER_PLUGIN" ]; then
+        if [ "$DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI" = "true" ]; then
+            echo "Disabling execution of $OPENSEARCH_HOME/bin/$PERFORMANCE_ANALYZER_PLUGIN/performance-analyzer-agent-cli for OpenSearch Performance Analyzer Plugin"
+        else
+            echo "Enabling execution of OPENSEARCH_HOME/bin/$PERFORMANCE_ANALYZER_PLUGIN/performance-analyzer-agent-cli for OpenSearch Performance Analyzer Plugin"
+            $OPENSEARCH_HOME/bin/opensearch-performance-analyzer/performance-analyzer-agent-cli > $OPENSEARCH_HOME/logs/PerformanceAnalyzer.log 2>&1 & disown
+        fi
+    else
+        echo "OpenSearch Performance Analyzer Plugin does not exist, disable by default"
+    fi
+}
+
+# Start up the opensearch and performance analyzer agent processes.
+# When either of them halts, this script exits, or we receive a SIGTERM or SIGINT signal then we want to kill both these processes.
+function runOpensearch {
+    # Files created by OpenSearch should always be group writable too
+    umask 0002
+
+    if [[ "$(id -u)" == "0" ]]; then
+        echo "OpenSearch cannot run as root. Please start your container as another user."
+        exit 1
+    fi
+
+    # Parse Docker env vars to customize OpenSearch
+    #
+    # e.g. Setting the env var cluster.name=testcluster
+    # will cause OpenSearch to be invoked with -Ecluster.name=testcluster
+    # DISABLE THIS FOR WOLFI
+    opensearch_opts=()
+    #while IFS='=' read -r envvar_key envvar_value
+    #do
+    #    # OpenSearch settings need to have at least two dot separated lowercase
+    #    # words, e.g. `cluster.name`, except for `processors` which we handle
+    #    # specially
+    #    if [[ "$envvar_key" =~ ^[a-z0-9_]+\.[a-z0-9_]+ || "$envvar_key" == "processors" ]]; then
+    #        if [[ ! -z $envvar_value ]]; then
+    #        opensearch_opt="-E${envvar_key}=${envvar_value}"
+    #        opensearch_opts+=("${opensearch_opt}")
+    #        fi
+    #    fi
+    #done < <(env)
+
+    setupSecurityPlugin
+    setupPerformanceAnalyzerPlugin
+
+    # Start opensearch
+    "$@" "${opensearch_opts[@]}"
+
+}
+
+# Prepend "opensearch" command if no argument was provided or if the first
+# argument looks like a flag (i.e. starts with a dash).
+if [ $# -eq 0 ] || [ "${1:0:1}" = '-' ]; then
+    set -- opensearch "$@"
+fi
+
+if [ "$1" = "opensearch" ]; then
+    # If the first argument is opensearch, then run the setup script.
+    runOpensearch "$@"
+else
+    # Otherwise, just exec the command.
+    exec "$@"
+fi
\ No newline at end of file


Reviews:
user: login: jamonation
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-08T17:07:08Z
user: login: jamonation
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-08T17:41:59Z
user: login: jamonation
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-08T19:03:03Z
user: login: jamonation
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-09T13:07:22Z
user: login: jamonation
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-10T11:56:32Z
user: login: jamonation
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-10T17:01:26Z
user: login: jamonation
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-13T17:11:18Z
user: login: IdlePhysicist
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-14T21:33:31Z

Review comments:
diff_hunk: @@ -0,0 +1,271 @@
+# This melange yaml is complex.  The context is opensearch releases the main package and many plugins, some in the same repo
+# and some in different repos.  They all share the same version number so rather than having a separate melange yaml for each
+# package, we package them all in one build so they can be released together.  For plugins to run they need to be built with the
+# same version they are installed into.
+package:
+  name: opensearch-3
+  version: "3.0.0"
+  epoch: 0
+  description: Open source distributed and RESTful search engine.
+  copyright:
+    - license: Apache-2.0
+  dependencies:
+    runtime:
+      - bash # some helper scripts use bash
+      - busybox # some helper scripts use busybox
+      - openjdk-21-jre
+
+vars:
+  plugin_version_qualifier: "0" # external plugins use the same version as the main package with a qualifier
+
+environment:
+  contents:
+    packages:
+      - bash
+      - busybox
+      - ca-certificates-bundle
+      - curl
+      - gradle
+      - openjdk-21-default-jdk
+      - patch
+      - unzip
+  environment:
+    JAVA_HOME: /usr/lib/jvm/java-21-openjdk
+    LANG: "en_US.UTF-8"
+
+data:
+  - name: internal-plugins
+    items:
+      # plugin_name: cve patch list
+      analysis-icu: ""
+      analysis-kuromoji: ""
+      analysis-nori: ""
+      analysis-phonetic: ""
+      analysis-smartcn: ""
+      analysis-stempel: ""
+      analysis-ukrainian: ""
+      crypto-kms: ""
+      discovery-azure-classic: ""
+      discovery-ec2: ""
+      discovery-gce: ""
+      identity-shiro: ""
+      ingest-attachment: ""
+      mapper-annotated-text: ""
+      mapper-murmur3: ""
+      mapper-size: ""
+      repository-azure: ""
+      repository-gcs: ""
+      repository-s3: ""
+      store-smb: ""
+      telemetry-otel: ""
+      transport-nio: ""
path: opensearch-3.yaml
user: login: jamonation
body: ```suggestion
```

Seems to get further in the build without this
created_at: 2025-05-08T17:07:07Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,270 @@
+# This melange yaml is complex.  The context is opensearch releases the main package and many plugins, some in the same repo
+# and some in different repos.  They all share the same version number so rather than having a separate melange yaml for each
+# package, we package them all in one build so they can be released together.  For plugins to run they need to be built with the
+# same version they are installed into.
+package:
+  name: opensearch-3
+  version: "3.0.0"
+  epoch: 0
+  description: Open source distributed and RESTful search engine.
+  copyright:
+    - license: Apache-2.0
+  dependencies:
+    runtime:
+      - bash # some helper scripts use bash
+      - busybox # some helper scripts use busybox
+      - openjdk-21-jre
+
+vars:
+  plugin_version_qualifier: "0" # external plugins use the same version as the main package with a qualifier
+
+environment:
+  contents:
+    packages:
+      - bash
+      - busybox
+      - ca-certificates-bundle
+      - curl
+      - gradle
+      - openjdk-21-default-jdk
+      - patch
+      - unzip
+  environment:
+    JAVA_HOME: /usr/lib/jvm/java-21-openjdk
+    LANG: "en_US.UTF-8"
+
+data:
+  - name: internal-plugins
+    items:
+      # plugin_name: cve patch list
+      analysis-icu: ""
+      analysis-kuromoji: ""
+      analysis-nori: ""
+      analysis-phonetic: ""
+      analysis-smartcn: ""
+      analysis-stempel: ""
+      analysis-ukrainian: ""
+      crypto-kms: ""
+      discovery-azure-classic: ""
+      discovery-ec2: ""
+      discovery-gce: ""
+      identity-shiro: ""
+      ingest-attachment: ""
+      mapper-annotated-text: ""
+      mapper-murmur3: ""
+      mapper-size: ""
+      repository-azure: ""
+      repository-gcs: ""
+      repository-s3: ""
+      store-smb: ""
+      telemetry-otel: ""
+
+  - name: external-plugins
+    items:
+      # plugin_name: cve patch list
+      alerting: ""
+      anomaly-detection: ""
+      asynchronous-search: ""
+      cross-cluster-replication: ""
+      custom-codecs: ""
+      geospatial: ""
+      index-management: ""
+      job-scheduler: ""
+      k-nn: ""
+      ml-commons: ""
+      neural-search: ""
+      notifications: ""
+      observability: ""
+      performance-analyzer: ""
+      reporting: ""
+      security: ""
+      security-analytics: ""
+      sql: "sql-commons-io.patch"
path: opensearch-3.yaml
user: login: jamonation
body: ```suggestion
      sql: ""
```
created_at: 2025-05-08T17:15:16Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,270 @@
+# This melange yaml is complex.  The context is opensearch releases the main package and many plugins, some in the same repo
+# and some in different repos.  They all share the same version number so rather than having a separate melange yaml for each
+# package, we package them all in one build so they can be released together.  For plugins to run they need to be built with the
+# same version they are installed into.
+package:
+  name: opensearch-3
+  version: "3.0.0"
+  epoch: 0
+  description: Open source distributed and RESTful search engine.
+  copyright:
+    - license: Apache-2.0
+  dependencies:
+    runtime:
+      - bash # some helper scripts use bash
+      - busybox # some helper scripts use busybox
+      - openjdk-21-jre
+
+vars:
+  plugin_version_qualifier: "0" # external plugins use the same version as the main package with a qualifier
+
+environment:
+  contents:
+    packages:
+      - bash
+      - busybox
+      - ca-certificates-bundle
+      - curl
+      - gradle
+      - openjdk-21-default-jdk
+      - patch
+      - unzip
+  environment:
+    JAVA_HOME: /usr/lib/jvm/java-21-openjdk
+    LANG: "en_US.UTF-8"
+
+data:
+  - name: internal-plugins
+    items:
+      # plugin_name: cve patch list
+      analysis-icu: ""
+      analysis-kuromoji: ""
+      analysis-nori: ""
+      analysis-phonetic: ""
+      analysis-smartcn: ""
+      analysis-stempel: ""
+      analysis-ukrainian: ""
+      crypto-kms: ""
+      discovery-azure-classic: ""
+      discovery-ec2: ""
+      discovery-gce: ""
+      identity-shiro: ""
+      ingest-attachment: ""
+      mapper-annotated-text: ""
+      mapper-murmur3: ""
+      mapper-size: ""
+      repository-azure: ""
+      repository-gcs: ""
+      repository-s3: ""
+      store-smb: ""
+      telemetry-otel: ""
+
+  - name: external-plugins
+    items:
+      # plugin_name: cve patch list
+      alerting: ""
+      anomaly-detection: ""
+      asynchronous-search: ""
+      cross-cluster-replication: ""
+      custom-codecs: ""
+      geospatial: ""
+      index-management: ""
+      job-scheduler: ""
+      k-nn: ""
+      ml-commons: ""
+      neural-search: ""
+      notifications: ""
+      observability: ""
+      performance-analyzer: ""
+      reporting: ""
+      security: ""
+      security-analytics: ""
+      sql: "sql-commons-io.patch"
path: opensearch-3.yaml
user: login: jamonation
body: fixes the failed patch error - will need to remove the .patch file from `opensearch-3` directory if this works
created_at: 2025-05-08T17:41:37Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,270 @@
+# This melange yaml is complex.  The context is opensearch releases the main package and many plugins, some in the same repo
+# and some in different repos.  They all share the same version number so rather than having a separate melange yaml for each
+# package, we package them all in one build so they can be released together.  For plugins to run they need to be built with the
+# same version they are installed into.
+package:
+  name: opensearch-3
+  version: "3.0.0"
+  epoch: 0
+  description: Open source distributed and RESTful search engine.
+  copyright:
+    - license: Apache-2.0
+  dependencies:
+    runtime:
+      - bash # some helper scripts use bash
+      - busybox # some helper scripts use busybox
+      - openjdk-21-jre
+
+vars:
+  plugin_version_qualifier: "0" # external plugins use the same version as the main package with a qualifier
+
+environment:
+  contents:
+    packages:
+      - bash
+      - busybox
+      - ca-certificates-bundle
+      - curl
+      - gradle
+      - openjdk-21-default-jdk
+      - patch
+      - unzip
+  environment:
+    JAVA_HOME: /usr/lib/jvm/java-21-openjdk
+    LANG: "en_US.UTF-8"
+
+data:
+  - name: internal-plugins
+    items:
+      # plugin_name: cve patch list
+      analysis-icu: ""
+      analysis-kuromoji: ""
+      analysis-nori: ""
+      analysis-phonetic: ""
+      analysis-smartcn: ""
+      analysis-stempel: ""
+      analysis-ukrainian: ""
+      crypto-kms: ""
+      discovery-azure-classic: ""
+      discovery-ec2: ""
+      discovery-gce: ""
+      identity-shiro: ""
+      ingest-attachment: ""
+      mapper-annotated-text: ""
+      mapper-murmur3: ""
+      mapper-size: ""
+      repository-azure: ""
+      repository-gcs: ""
+      repository-s3: ""
+      store-smb: ""
+      telemetry-otel: ""
+
+  - name: external-plugins
+    items:
+      # plugin_name: cve patch list
+      alerting: ""
+      anomaly-detection: ""
+      asynchronous-search: ""
+      cross-cluster-replication: ""
+      custom-codecs: ""
+      geospatial: ""
+      index-management: ""
+      job-scheduler: ""
+      k-nn: ""
+      ml-commons: ""
+      neural-search: ""
+      notifications: ""
+      observability: ""
+      performance-analyzer: ""
+      reporting: ""
+      security: ""
+      security-analytics: ""
+      sql: ""
+
+pipeline:
+  - uses: git-checkout
+    with:
+      repository: https://github.com/opensearch-project/OpenSearch
+      tag: ${{package.version}}
+      expected-commit: dc4efa821904cc2d7ea7ef61c0f577d3fc0d8be9
+
+  - runs: |
+      echo "org.gradle.daemon=false" >> gradle.properties
+      gradle localDistro --parallel -Dbuild.snapshot="false" -Dbuild.version_qualifier=""
+      mkdir -p ${{targets.destdir}}/usr/share/opensearch/logs
+
+      install -dm777 ${{targets.destdir}}/usr/share/opensearch/
+      mv build/distribution/local/opensearch-${{package.version}}/bin/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/lib/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/config/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/modules/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/plugins/ ${{targets.destdir}}/usr/share/opensearch
+
+      mv ./distribution/docker/src/docker/config/opensearch.yml ./distribution/docker/src/docker/config/log4j2.properties ${{targets.destdir}}/usr/share/opensearch/config
+
+  - runs: |
+      # Use a modified entrypoint script as the official one duplicates env vars and system properties used by the JVM on startup
+      # This means we avoid errors like: ERROR: setting [discovery.seed_hosts] already set, saw [opensearch-cluster-master-headless] and [opensearch-cluster-master-headless]
+      mv opensearch-docker-entrypoint.sh  ${{targets.destdir}}/usr/share/opensearch/bin/
+
+  - runs: |
+      # Set permissions to read/write the config dir
+      chmod -R 755 ${{targets.destdir}}/usr/share/opensearch/
+
+      mkdir -p ${{targets.destdir}}/usr/bin
+      for i in ${{targets.destdir}}/usr/share/opensearch/bin/*; do
+        name=$(basename $i)
+        ln -sf /usr/share/opensearch/bin/$name ${{targets.destdir}}/usr/bin/$name
+      done
+
+      chmod -R 666 ${{targets.destdir}}/usr/share/opensearch/config/opensearch.yml
+
+      # Manually set this to docker: https://github.com/opensearch-project/OpenSearch/blob/5f8193021215cd6979fde66474ec8d74d32ac91a/distribution/docker/src/docker/Dockerfile#LL49C90-L49C129
+      sed -i -e 's/OPENSEARCH_DISTRIBUTION_TYPE=tar/OPENSEARCH_DISTRIBUTION_TYPE=docker/'  ${{targets.destdir}}/usr/share/opensearch/bin/opensearch-env
+
+  - runs: |
+      cd plugins
+      gradle assemble -Dbuild.snapshot="false" -Dbuild.version_qualifier="" --stacktrace
+
+      # useful for finding generated zip file we use to extract into the final apk
+      find . -name "*.zip"
+
+  - runs: |
+      # Remove files so they don't conflict with subpackages
+      echo "Removing files that conflict with subpackages"
+      rm -rf /home/build/settings.gradle
+
+  - uses: strip
+
+subpackages:
+  - range: internal-plugins
+    name: ${{package.name}}-${{range.key}}
+    pipeline:
+      - runs: |
+          mkdir -p ${{targets.contextdir}}/usr/share/opensearch/plugins/opensearch-${{range.key}}
+          unzip "./plugins/${{range.key}}/build/distributions/${{range.key}}-${{package.version}}.zip" -d "${{targets.contextdir}}/usr/share/opensearch/plugins/opensearch-${{range.key}}"
+
+  - range: external-plugins
+    name: ${{package.name}}-${{range.key}}
+    pipeline:
+      # Delete other plugins. Opensearch can only build one at a time, otherwise we run into conflicting dependencies version issues with yarn.
+      - runs: |
+          rm -r plugins/* || true
+      - uses: git-checkout
+        with:
+          repository: https://github.com/opensearch-project/${{range.key}}.git
+          tag: ${{package.version}}.${{vars.plugin_version_qualifier}}
+          destination: ./plugins/${{range.key}}
+      - runs: |
+          cd ./plugins/${{range.key}}
+
+          # apply any CVE patches
+          if [ -n "${{range.value}}" ]; then
+              patch -p1 < "../../${{range.value}}"
+          fi
+
+          # notifications source live in a subfolder
+          if [ "${{range.key}}" = "notifications" ]; then
+            cd ./notifications
+          fi
+
+          # skip check task, using -x doesn't append to an existing list
+          # job scheduler requires a test cluster to connect to so skip verification checks
+          if [ "${{range.key}}" = "job-scheduler" ]; then
+            sed -i '/startParameter.excludedTaskNames=\[/ s/]/, "check"]/g' settings.gradle
+          fi
+
+          echo "org.gradle.daemon=false" >> gradle.properties
+          ./gradlew clean assemble -Dbuild.snapshot="false" -Dbuild.version_qualifier="" -Dopensearch.version="${{package.version}}" -x check -x integTest -x javadoc -PfailOnJavadocWarning=false --stacktrace
+
+          # useful for finding generated zip file we use to extract into the final apk
+          find . -name "*.zip"
+
+          # Extract the value of rootProject.name, this is because the key is not always the same as the plugin name
+          # note: not all plugins have a settings.gradle file
+          plugin_name=$(grep "^rootProject.name" settings.gradle 2>/dev/null | awk -F" = " '{print $2}' | tr -d "'" | tr -d '"')
+
+          # Check if plugin_name is empty and assign default if it is
+          if [ -z "$plugin_name" ]; then
+              plugin_name=${{range.key}}
+          fi
+
+          echo "Plugin name: $plugin_name"
+
+          # Remove any existing "opensearch-" prefix before adding it to ensure it's not duplicated
+          plugin_name=$(echo $plugin_name | sed 's/^opensearch-//')
+
+          # Ensure the plugin_name has the "opensearch-" prefix
+          plugin_name="opensearch-$plugin_name"
+
+          echo "Final plugin name: $plugin_name"
+
+          mkdir -p "${{targets.contextdir}}/usr/share/opensearch/plugins"
+
+          # Define the base path for the unzip destination
+          destination_base="${{targets.contextdir}}/usr/share/opensearch"
+
+          # Determine the source directory based on the plugin key
+          case "${{range.key}}" in
+              "alerting")
+                  zip_dir="./alerting"
+                  ;;
+              "ml-commons"|"sql")
+                  zip_dir="./plugin"
+                  ;;
+              "notifications")
+                  zip_dir="./notifications"
+                  install -Dm644 notifications/src/main/config/notifications.yml "${destination_base}/config/${plugin_name}/notifications.yml"
+
+                  # Special handling for notifications core
+                  unzip "./core/build/distributions/${plugin_name}-core-${{package.version}}.${{vars.plugin_version_qualifier}}.zip" -d "${destination_base}/plugins/${plugin_name}-core"
+                  install -Dm644 core/src/main/config/notifications-core.yml "${destination_base}/config/${plugin_name}-core/notifications-core.yml"
+                  ;;
+              "observability")
+                  zip_dir="."
+                  install -Dm644 src/main/config/observability.yml "${destination_base}/config/${plugin_name}/observability.yml"
+                  ;;
+              "performance-analyzer")
+                  zip_dir="."
+                  mkdir -p "${destination_base}/config/${plugin_name}/"
+                  install -Dm644 config/* "${destination_base}/config/${plugin_name}/"
+                  ;;
+              "reporting")
+                  zip_dir="."
+                  install -Dm644 src/main/config/reports-scheduler.yml "${destination_base}/config/${plugin_name}/reports-scheduler.yml"
+                  ;;
+              "security")
+                  zip_dir="."
+                  mkdir -p "${destination_base}/config/${plugin_name}/"
+                  install -Dm644 config/* "${destination_base}/config/${plugin_name}/"
+                  ;;
+              *)
+                  zip_dir="."
+                  ;;
+          esac
+
+          # Unzip the main plugin distribution
+          unzip "${zip_dir}/build/distributions/${plugin_name}-${{package.version}}.${{vars.plugin_version_qualifier}}.zip" -d "${destination_base}/plugins/${plugin_name}"
+      - uses: strip
+
+update:
+  enabled: true
+  ignore-regex-patterns:
+    - -beta
+    - -alpha
+  github:
+    identifier: opensearch-project/OpenSearch
+    tag-filter-prefix: "3."
+
+test:
+  environment:
+    contents:
+      packages:
+        - openjdk-17-default-jvm
path: opensearch-3.yaml
user: login: jamonation
body: ```suggestion
        - openjdk-21-default-jvm
```
created_at: 2025-05-08T19:03:03Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,270 @@
+# This melange yaml is complex.  The context is opensearch releases the main package and many plugins, some in the same repo
+# and some in different repos.  They all share the same version number so rather than having a separate melange yaml for each
+# package, we package them all in one build so they can be released together.  For plugins to run they need to be built with the
+# same version they are installed into.
+package:
+  name: opensearch-3
+  version: "3.0.0"
+  epoch: 0
+  description: Open source distributed and RESTful search engine.
+  copyright:
+    - license: Apache-2.0
+  dependencies:
+    runtime:
+      - bash # some helper scripts use bash
+      - busybox # some helper scripts use busybox
+      - openjdk-21-jre
+
+vars:
+  plugin_version_qualifier: "0" # external plugins use the same version as the main package with a qualifier
+
+environment:
+  contents:
+    packages:
+      - bash
+      - busybox
+      - ca-certificates-bundle
+      - curl
+      - gradle
+      - openjdk-21-default-jdk
+      - patch
+      - unzip
+  environment:
+    JAVA_HOME: /usr/lib/jvm/java-21-openjdk
+    LANG: "en_US.UTF-8"
+
+data:
+  - name: internal-plugins
+    items:
+      # plugin_name: cve patch list
+      analysis-icu: ""
+      analysis-kuromoji: ""
+      analysis-nori: ""
+      analysis-phonetic: ""
+      analysis-smartcn: ""
+      analysis-stempel: ""
+      analysis-ukrainian: ""
+      crypto-kms: ""
+      discovery-azure-classic: ""
+      discovery-ec2: ""
+      discovery-gce: ""
+      identity-shiro: ""
+      ingest-attachment: ""
+      mapper-annotated-text: ""
+      mapper-murmur3: ""
+      mapper-size: ""
+      repository-azure: ""
+      repository-gcs: ""
+      repository-s3: ""
+      store-smb: ""
+      telemetry-otel: ""
+
+  - name: external-plugins
+    items:
+      # plugin_name: cve patch list
+      alerting: ""
+      anomaly-detection: ""
+      asynchronous-search: ""
+      cross-cluster-replication: ""
+      custom-codecs: ""
+      geospatial: ""
+      index-management: ""
+      job-scheduler: ""
+      k-nn: ""
+      ml-commons: ""
+      neural-search: ""
+      notifications: ""
+      observability: ""
+      performance-analyzer: ""
+      reporting: ""
+      security: ""
+      security-analytics: ""
+      sql: ""
+
+pipeline:
+  - uses: git-checkout
+    with:
+      repository: https://github.com/opensearch-project/OpenSearch
+      tag: ${{package.version}}
+      expected-commit: dc4efa821904cc2d7ea7ef61c0f577d3fc0d8be9
+
+  - runs: |
+      echo "org.gradle.daemon=false" >> gradle.properties
+      gradle localDistro --parallel -Dbuild.snapshot="false" -Dbuild.version_qualifier=""
+      mkdir -p ${{targets.destdir}}/usr/share/opensearch/logs
+
+      install -dm777 ${{targets.destdir}}/usr/share/opensearch/
+      mv build/distribution/local/opensearch-${{package.version}}/bin/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/lib/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/config/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/modules/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/plugins/ ${{targets.destdir}}/usr/share/opensearch
path: opensearch-3.yaml
user: login: jamonation
body: ```suggestion
      mv build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/bin/ ${{targets.destdir}}/usr/share/opensearch
      mv build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/lib/ ${{targets.destdir}}/usr/share/opensearch
      mv build/distribution/archives/linux-*-tar/build/install//opensearch-${{package.version}}/config/ ${{targets.destdir}}/usr/share/opensearch
     mv build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/modules/ ${{targets.destdir}}/usr/share/opensearch
     mv build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/plugins/ ${{targets.destdir}}/usr/share/opensearch
```
created_at: 2025-05-09T13:07:22Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,271 @@
+# This melange yaml is complex.  The context is opensearch releases the main package and many plugins, some in the same repo
+# and some in different repos.  They all share the same version number so rather than having a separate melange yaml for each
+# package, we package them all in one build so they can be released together.  For plugins to run they need to be built with the
+# same version they are installed into.
+package:
+  name: opensearch-3
+  version: "3.0.0"
+  epoch: 1
+  description: Open source distributed and RESTful search engine.
+  copyright:
+    - license: Apache-2.0
+  dependencies:
+    runtime:
+      - bash # some helper scripts use bash
+      - busybox # some helper scripts use busybox
+      - openjdk-21-jre
+
+vars:
+  plugin_version_qualifier: "0" # external plugins use the same version as the main package with a qualifier
+
+environment:
+  contents:
+    packages:
+      - bash
+      - busybox
+      - ca-certificates-bundle
+      - curl
+      - gradle
+      - openjdk-21-default-jdk
+      - patch
+      - unzip
+  environment:
+    JAVA_HOME: /usr/lib/jvm/java-21-openjdk
+    LANG: "en_US.UTF-8"
+
+data:
+  - name: internal-plugins
+    items:
+      # plugin_name: cve patch list
+      analysis-icu: ""
+      analysis-kuromoji: ""
+      analysis-nori: ""
+      analysis-phonetic: ""
+      analysis-smartcn: ""
+      analysis-stempel: ""
+      analysis-ukrainian: ""
+      crypto-kms: ""
+      discovery-azure-classic: ""
+      discovery-ec2: ""
+      discovery-gce: ""
+      identity-shiro: ""
+      ingest-attachment: ""
+      mapper-annotated-text: ""
+      mapper-murmur3: ""
+      mapper-size: ""
+      repository-azure: ""
+      repository-gcs: ""
+      repository-s3: ""
+      store-smb: ""
+      telemetry-otel: ""
+
+  - name: external-plugins
+    items:
+      # plugin_name: cve patch list
+      alerting: ""
+      anomaly-detection: ""
+      asynchronous-search: ""
+      cross-cluster-replication: ""
+      custom-codecs: ""
+      geospatial: ""
+      index-management: ""
+      job-scheduler: ""
+      k-nn: ""
+      ml-commons: ""
+      neural-search: ""
+      notifications: ""
+      observability: ""
+      performance-analyzer: ""
+      reporting: ""
+      security: ""
+      security-analytics: ""
+      sql: ""
+
+pipeline:
+  - uses: git-checkout
+    with:
+      repository: https://github.com/opensearch-project/OpenSearch
+      tag: ${{package.version}}
+      expected-commit: dc4efa821904cc2d7ea7ef61c0f577d3fc0d8be9
+
+  - runs: |
+      echo "org.gradle.daemon=false" >> gradle.properties
+      gradle localDistro --parallel -Dbuild.snapshot="false" -Dbuild.version_qualifier=""
+      mkdir -p ${{targets.destdir}}/usr/share/opensearch/logs
+
+      install -dm777 ${{targets.destdir}}/usr/share/opensearch/
+      mv /home/build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/bin ${{targets.destdir}}/usr/share/opensearch
+      mv /home/build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/lib ${{targets.destdir}}/usr/share/opensearch
+      mv /home/build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/config ${{targets.destdir}}/usr/share/opensearch
+      mv /home/build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/modules ${{targets.destdir}}/usr/share/opensearch
+      mv /home/build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/plugins ${{targets.destdir}}/usr/share/opensearch
+      mv /home/build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/agent ${{targets.destdir}}/usr/share/opensearch
path: opensearch-3.yaml
user: login: jamonation
body: ```suggestion
      mv build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/bin ${{targets.destdir}}/usr/share/opensearch
      mv build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/lib ${{targets.destdir}}/usr/share/opensearch
      mv build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/config ${{targets.destdir}}/usr/share/opensearch
      mv build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/modules ${{targets.destdir}}/usr/share/opensearch
      mv build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/plugins ${{targets.destdir}}/usr/share/opensearch
      mv build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/agent ${{targets.destdir}}/usr/share/opensearch
```

Absolute dir works locally, and relative doesn't, maybe CI is opposite?
created_at: 2025-05-10T11:56:32Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,271 @@
+# This melange yaml is complex.  The context is opensearch releases the main package and many plugins, some in the same repo
+# and some in different repos.  They all share the same version number so rather than having a separate melange yaml for each
+# package, we package them all in one build so they can be released together.  For plugins to run they need to be built with the
+# same version they are installed into.
+package:
+  name: opensearch-3
+  version: "3.0.0"
+  epoch: 1
+  description: Open source distributed and RESTful search engine.
+  copyright:
+    - license: Apache-2.0
+  dependencies:
+    runtime:
+      - bash # some helper scripts use bash
+      - busybox # some helper scripts use busybox
+      - openjdk-21-jre
+
+vars:
+  plugin_version_qualifier: "0" # external plugins use the same version as the main package with a qualifier
+
+environment:
+  contents:
+    packages:
+      - bash
+      - busybox
+      - ca-certificates-bundle
+      - curl
+      - gradle
+      - openjdk-21-default-jdk
+      - patch
+      - unzip
+  environment:
+    JAVA_HOME: /usr/lib/jvm/java-21-openjdk
+    LANG: "en_US.UTF-8"
+
+data:
+  - name: internal-plugins
+    items:
+      # plugin_name: cve patch list
+      analysis-icu: ""
+      analysis-kuromoji: ""
+      analysis-nori: ""
+      analysis-phonetic: ""
+      analysis-smartcn: ""
+      analysis-stempel: ""
+      analysis-ukrainian: ""
+      crypto-kms: ""
+      discovery-azure-classic: ""
+      discovery-ec2: ""
+      discovery-gce: ""
+      identity-shiro: ""
+      ingest-attachment: ""
+      mapper-annotated-text: ""
+      mapper-murmur3: ""
+      mapper-size: ""
+      repository-azure: ""
+      repository-gcs: ""
+      repository-s3: ""
+      store-smb: ""
+      telemetry-otel: ""
+
+  - name: external-plugins
+    items:
+      # plugin_name: cve patch list
+      alerting: ""
+      anomaly-detection: ""
+      asynchronous-search: ""
+      cross-cluster-replication: ""
+      custom-codecs: ""
+      geospatial: ""
+      index-management: ""
+      job-scheduler: ""
+      k-nn: ""
+      ml-commons: ""
+      neural-search: ""
+      notifications: ""
+      observability: ""
+      performance-analyzer: ""
+      reporting: ""
+      security: ""
+      security-analytics: ""
+      sql: ""
+
+pipeline:
+  - uses: git-checkout
+    with:
+      repository: https://github.com/opensearch-project/OpenSearch
+      tag: ${{package.version}}
+      expected-commit: dc4efa821904cc2d7ea7ef61c0f577d3fc0d8be9
+
+  - runs: |
+      echo "org.gradle.daemon=false" >> gradle.properties
+      gradle localDistro --parallel -Dbuild.snapshot="false" -Dbuild.version_qualifier=""
+      mkdir -p ${{targets.destdir}}/usr/share/opensearch/logs
+
+      install -dm777 ${{targets.destdir}}/usr/share/opensearch/
+      mv build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/bin ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/lib ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/config ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/modules ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/plugins ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/agent ${{targets.destdir}}/usr/share/opensearch
path: opensearch-3.yaml
user: login: jamonation
body: ```suggestion
      mv /home/build/build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/bin ${{targets.destdir}}/usr/share/opensearch
      mv /home/build/build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/lib ${{targets.destdir}}/usr/share/opensearch
      mv /home/build/build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/config ${{targets.destdir}}/usr/share/opensearch
      mv /home/build/build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/modules ${{targets.destdir}}/usr/share/opensearch
      mv /home/build/build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/plugins ${{targets.destdir}}/usr/share/opensearch
      mv /home/build/build/distribution/archives/linux-*-tar/build/install/opensearch-${{package.version}}/agent ${{targets.destdir}}/usr/share/opensearch
```
created_at: 2025-05-10T17:01:26Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,270 @@
+# This melange yaml is complex.  The context is opensearch releases the main package and many plugins, some in the same repo
+# and some in different repos.  They all share the same version number so rather than having a separate melange yaml for each
+# package, we package them all in one build so they can be released together.  For plugins to run they need to be built with the
+# same version they are installed into.
+package:
+  name: opensearch-3
+  version: "3.0.0"
+  epoch: 0
+  description: Open source distributed and RESTful search engine.
+  copyright:
+    - license: Apache-2.0
+  dependencies:
+    runtime:
+      - bash # some helper scripts use bash
+      - busybox # some helper scripts use busybox
+      - openjdk-21-jre
+
+vars:
+  plugin_version_qualifier: "0" # external plugins use the same version as the main package with a qualifier
+
+environment:
+  contents:
+    packages:
+      - bash
+      - busybox
+      - ca-certificates-bundle
+      - curl
+      - gradle
+      - openjdk-21-default-jdk
+      - patch
+      - unzip
+  environment:
+    JAVA_HOME: /usr/lib/jvm/java-21-openjdk
+    LANG: "en_US.UTF-8"
+
+data:
+  - name: internal-plugins
+    items:
+      # plugin_name: cve patch list
+      analysis-icu: ""
+      analysis-kuromoji: ""
+      analysis-nori: ""
+      analysis-phonetic: ""
+      analysis-smartcn: ""
+      analysis-stempel: ""
+      analysis-ukrainian: ""
+      crypto-kms: ""
+      discovery-azure-classic: ""
+      discovery-ec2: ""
+      discovery-gce: ""
+      identity-shiro: ""
+      ingest-attachment: ""
+      mapper-annotated-text: ""
+      mapper-murmur3: ""
+      mapper-size: ""
+      repository-azure: ""
+      repository-gcs: ""
+      repository-s3: ""
+      store-smb: ""
+      telemetry-otel: ""
+
+  - name: external-plugins
+    items:
+      # plugin_name: cve patch list
+      alerting: ""
+      anomaly-detection: ""
+      asynchronous-search: ""
+      cross-cluster-replication: ""
+      custom-codecs: ""
+      geospatial: ""
+      index-management: ""
+      job-scheduler: ""
+      k-nn: ""
+      ml-commons: ""
+      neural-search: ""
+      notifications: ""
+      observability: ""
+      performance-analyzer: ""
+      reporting: ""
+      security: ""
+      security-analytics: ""
+      sql: ""
+
+pipeline:
+  - uses: git-checkout
+    with:
+      repository: https://github.com/opensearch-project/OpenSearch
+      tag: ${{package.version}}
+      expected-commit: dc4efa821904cc2d7ea7ef61c0f577d3fc0d8be9
+
+  - runs: |
+      echo "org.gradle.daemon=false" >> gradle.properties
+      gradle localDistro --parallel -Dbuild.snapshot="false" -Dbuild.version_qualifier=""
+      mkdir -p ${{targets.destdir}}/usr/share/opensearch/logs
+
+      install -dm777 ${{targets.destdir}}/usr/share/opensearch/
+      mv build/distribution/local/opensearch-${{package.version}}/bin/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/lib/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/config/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/modules/ ${{targets.destdir}}/usr/share/opensearch
+      mv build/distribution/local/opensearch-${{package.version}}/plugins/ ${{targets.destdir}}/usr/share/opensearch
path: opensearch-3.yaml
user: login: jamonation
body: ```suggestion
      mv build/distribution/local/opensearch-${{package.version}}/plugins/ ${{targets.destdir}}/usr/share/opensearch
      mv build/distribution/local/opensearch-${{package.version}}/agent/ ${{targets.destdir}}/usr/share/opensearch
```

I think this solves the `Error opening zip file or JAR manifest missing : agent/opensearch-agent.jar` test failure.
created_at: 2025-05-13T17:11:18Z
author_association: MEMBER

PR comments:
user: login: octo-sts[bot]
created_at: 2025-05-07T14:49:25Z
body: <!-- bot:ai-build-failure -->


## 🌐 Build Failed: Environment

> At least Java 21 is required to build opensearch gradle tools

### Build Details

| Category | Details |
|----------|---------|
| **Build System** | gradle |
| **Failure Point** | Build file '/home/build/buildSrc/build.gradle' line: 78 |
### Root Cause Analysis 🔍

The build is using OpenJDK 17 (openjdk-17=17.0.15-r1), but the OpenSearch build requires at least Java 21. The build fails during the initial Gradle evaluation phase when checking Java version constraints.

---
*Was this comment helpful? Please use 👍 or 👎 reactions on this comment.*

author_association: CONTRIBUTOR
user: login: jamonation
created_at: 2025-05-09T12:49:47Z
body: Need to solve for the missing jdk symlink:
```
wolfi-vm:/usr/share/opensearch# /usr/bin/opensearch
could not find java in bundled jdk at /usr/share/opensearch/jdk/bin/java
```

With:
```
wolfi-vm:/usr/share/opensearch# ln -sf /usr/lib/jvm/java-21-openjdk /usr/share/opensearch/jdk
```

And then the missing agent jar:
```
wolfi-vm:/usr/share/opensearch# /usr/bin/opensearch
Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
output:
Error occurred during initialization of VM
agent library failed Agent_OnLoad: instrument
error:
Error opening zip file or JAR manifest missing : agent/opensearch-agent.jar
	at org.opensearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:125)
	at org.opensearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:87)
	at org.opensearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:70)
	at org.opensearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:150)
	at org.opensearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:108)
```
author_association: MEMBER
user: login: jamonation
created_at: 2025-05-09T13:05:39Z
body: ```
~ # ls /home/build/build/distribution/local/opensearch-3.0.0
LICENSE.txt  NOTICE.txt   README.md    agent        jdk          logs
```

cf.
```
~ # ls /home/build/distribution/archives/linux-arm64-tar/build/install/opensearch-3.0.0/
LICENSE.txt  README.md    bin          jdk          logs         plugins
NOTICE.txt   agent        config       lib          modules
```
author_association: MEMBER