From 5053f62018587935dac6dba044f95a09a70ec18b Mon Sep 17 00:00:00 2001 From: XuechunHou Date: Thu, 8 Jan 2026 21:32:06 +0000 Subject: [PATCH 01/10] updated uap plugin entrypoint name --- Dockerfile.windows | 4 ++-- builds/ops_agent_plugin.sh | 2 +- integration_test/agents/agents.go | 2 +- integration_test/agents/testdata/start-uap-plugin-server.ps1 | 2 +- pkg/plugin/build.ps1 | 2 +- pkg/plugin/build.sh | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile.windows b/Dockerfile.windows index bbbe0c8ba8..b7684c8c70 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -352,8 +352,8 @@ COPY . /work ARG WINDOWS_VERSION ARG BUILD_DISTRO=windows-$WINDOWS_VERSION RUN Get-Content VERSION | Where-Object length | ForEach-Object { Invoke-Expression "`$env:$_" }; ` - go build -o bin/plugin.exe -ldflags \"-X github.com/GoogleCloudPlatform/ops-agent/internal/version.BuildDistro=$env:BUILD_DISTRO -X github.com/GoogleCloudPlatform/ops-agent/internal/version.Version=$env:PKG_VERSION\" ./cmd/ops_agent_uap_plugin; ` - Copy-Item -Path bin/plugin.exe -Destination /work/out/bin/; ` + go build -o bin/ops-agent.exe -ldflags \"-X github.com/GoogleCloudPlatform/ops-agent/internal/version.BuildDistro=$env:BUILD_DISTRO -X github.com/GoogleCloudPlatform/ops-agent/internal/version.Version=$env:PKG_VERSION\" ./cmd/ops_agent_uap_plugin; ` + Copy-Item -Path bin/ops_agent.exe -Destination /work/out/bin/; ` $env:PKG_VERSION | Out-File -FilePath /work/out/bin/OPS_AGENT_VERSION -Encoding UTF8; ############################################################################### diff --git a/builds/ops_agent_plugin.sh b/builds/ops_agent_plugin.sh index 9e6ac33a06..d191621c9a 100755 --- a/builds/ops_agent_plugin.sh +++ b/builds/ops_agent_plugin.sh @@ -17,5 +17,5 @@ set -x -e DESTDIR=$1 source VERSION && echo $PKG_VERSION > "$DESTDIR/OPS_AGENT_VERSION" mkdir -p "$DESTDIR/opt/google-cloud-ops-agent" -go build -buildvcs=false -ldflags "-s -w" -o "$DESTDIR/opt/google-cloud-ops-agent/plugin" \ +go build -buildvcs=false -ldflags "-s -w" -o "$DESTDIR/opt/google-cloud-ops-agent/ops_agent" \ github.com/GoogleCloudPlatform/ops-agent/cmd/ops_agent_uap_plugin \ No newline at end of file diff --git a/integration_test/agents/agents.go b/integration_test/agents/agents.go index ee4a04beb8..a1e56af51c 100644 --- a/integration_test/agents/agents.go +++ b/integration_test/agents/agents.go @@ -867,7 +867,7 @@ func StartOpsAgentPluginServer(ctx context.Context, logger *log.Logger, vm *gce. return nil } - if _, err := gce.RunRemotely(ctx, logger, vm, fmt.Sprintf("sudo nohup ~/plugin --address=localhost:%s --errorlogfile=errorlog.txt --protocol=tcp > ~/uap_plugin_out.log 2>&1 &", port)); err != nil { + if _, err := gce.RunRemotely(ctx, logger, vm, fmt.Sprintf("sudo nohup ~/ops_agent --address=localhost:%s --errorlogfile=errorlog.txt --protocol=tcp > ~/uap_plugin_out.log 2>&1 &", port)); err != nil { return fmt.Errorf("StartOpsAgentPluginServer() failed to start the ops agent plugin: %v", err) } return nil diff --git a/integration_test/agents/testdata/start-uap-plugin-server.ps1 b/integration_test/agents/testdata/start-uap-plugin-server.ps1 index 48f093fdec..a591d5e648 100644 --- a/integration_test/agents/testdata/start-uap-plugin-server.ps1 +++ b/integration_test/agents/testdata/start-uap-plugin-server.ps1 @@ -1,7 +1,7 @@ $ErrorActionPreference = 'Stop' $taskName = "UAPWindowsPlugin" if (-not(Get-ScheduledTask -TaskName $taskName -ErrorAction SilentlyContinue)) { - $action = New-ScheduledTaskAction -Execute "C:\plugin.exe" -Argument "-address localhost:1234 -errorlogfile errorlog.txt -protocol tcp" -WorkingDirectory "C:\" + $action = New-ScheduledTaskAction -Execute "C:\ops_agent.exe" -Argument "-address localhost:1234 -errorlogfile errorlog.txt -protocol tcp" -WorkingDirectory "C:\" $trigger = New-ScheduledTaskTrigger -Once -At (Get-Date) $principal = New-ScheduledTaskPrincipal -UserId "NT AUTHORITY\SYSTEM" -LogonType ServiceAccount -RunLevel Highest Register-ScheduledTask -TaskName $taskName -Action $action -Principal $principal diff --git a/pkg/plugin/build.ps1 b/pkg/plugin/build.ps1 index 10ea153691..3903ecc96e 100644 --- a/pkg/plugin/build.ps1 +++ b/pkg/plugin/build.ps1 @@ -60,7 +60,7 @@ $FilesToInclude = @( "opentelemetry-java-contrib-jmx-metrics.jar", "google-cloud-metrics-agent_windows_${GoArch}.exe", "google-cloud-ops-agent-wrapper.exe" - "plugin.exe" + "ops_agent.exe" "THIRD_PARTY_LICENSES" "OPS_AGENT_VERSION" ) diff --git a/pkg/plugin/build.sh b/pkg/plugin/build.sh index cfc3985141..bcffb8be2e 100755 --- a/pkg/plugin/build.sh +++ b/pkg/plugin/build.sh @@ -31,7 +31,7 @@ mkdir -p ${PLUGIN_DIR}/THIRD_PARTY_LICENSES touch ${PLUGIN_DIR}/THIRD_PARTY_LICENSES/license.txt cp /work/google_cloud_ops_agent_engine ${PLUGIN_DIR}/libexec/google_cloud_ops_agent_engine -cp $WS/opt/google-cloud-ops-agent/plugin ${PLUGIN_DIR}/plugin +cp $WS/opt/google-cloud-ops-agent/ops_agent ${PLUGIN_DIR}/ops_agent cp $WS/opt/google-cloud-ops-agent/libexec/google_cloud_ops_agent_wrapper ${PLUGIN_DIR}/libexec/google_cloud_ops_agent_wrapper cp $WS/opt/google-cloud-ops-agent/subagents/opentelemetry-collector/otelopscol ${PLUGIN_DIR}/subagents/opentelemetry-collector/otelopscol From c5d8dac1cdbe2a4cfabcfc2923d1bbf1f9bba2f5 Mon Sep 17 00:00:00 2001 From: XuechunHou Date: Fri, 30 Jan 2026 16:39:08 +0000 Subject: [PATCH 02/10] pulled the latest fluentbit and fixed the docker build for sles16 --- Dockerfile | 114 +++++++++++++++++- builds/fluent_bit.sh | 2 +- dockerfiles/compile.go | 16 ++- .../config/build/presubmit/sles15_aarch64.gcl | 2 +- .../config/build/presubmit/sles15_x86_64.gcl | 2 +- .../ops_agent/presubmit/sles15_aarch64.gcl | 2 +- .../ops_agent/presubmit/sles15_x86_64.gcl | 2 +- .../presubmit/sles15_aarch64.gcl | 2 +- .../presubmit/sles15_x86_64.gcl | 2 +- pkg/rpm/build.sh | 5 + project.yaml | 16 +++ submodules/fluent-bit | 2 +- 12 files changed, 153 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index ca7b4be646..23b84f7bd1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -795,7 +795,7 @@ COPY . /work # Run the build script once to build the ops agent engine to a cache RUN mkdir -p /tmp/cache_run/golang && cp -r . /tmp/cache_run/golang WORKDIR /tmp/cache_run/golang -RUN ./pkg/rpm/build.sh &> /dev/null || true +RUN SLE_VERSION=12 ./pkg/rpm/build.sh &> /dev/null || true WORKDIR /work COPY ./confgenerator/default-config.yaml /work/cache/etc/google-cloud-ops-agent/config.yaml @@ -803,7 +803,7 @@ COPY --from=sles12-build-otel /work/cache /work/cache COPY --from=sles12-build-fluent-bit /work/cache /work/cache COPY --from=sles12-build-systemd /work/cache /work/cache COPY --from=sles12-build-wrapper /work/cache /work/cache -RUN ./pkg/rpm/build.sh +RUN SLE_VERSION=12 ./pkg/rpm/build.sh COPY cmd/ops_agent_uap_plugin cmd/ops_agent_uap_plugin COPY ./builds/ops_agent_plugin.sh . @@ -900,7 +900,7 @@ COPY . /work # Run the build script once to build the ops agent engine to a cache RUN mkdir -p /tmp/cache_run/golang && cp -r . /tmp/cache_run/golang WORKDIR /tmp/cache_run/golang -RUN ./pkg/rpm/build.sh &> /dev/null || true +RUN SLE_VERSION=15 ./pkg/rpm/build.sh &> /dev/null || true WORKDIR /work COPY ./confgenerator/default-config.yaml /work/cache/etc/google-cloud-ops-agent/config.yaml @@ -908,7 +908,7 @@ COPY --from=sles15-build-otel /work/cache /work/cache COPY --from=sles15-build-fluent-bit /work/cache /work/cache COPY --from=sles15-build-systemd /work/cache /work/cache COPY --from=sles15-build-wrapper /work/cache /work/cache -RUN ./pkg/rpm/build.sh +RUN SLE_VERSION=15 ./pkg/rpm/build.sh COPY cmd/ops_agent_uap_plugin cmd/ops_agent_uap_plugin COPY ./builds/ops_agent_plugin.sh . @@ -921,6 +921,111 @@ COPY --from=sles15-build /tmp/google-cloud-ops-agent.tgz /google-cloud-ops-agent COPY --from=sles15-build /google-cloud-ops-agent*.rpm / COPY --from=sles15-build /google-cloud-ops-agent-plugin*.tar.gz / +# ====================================== +# Build Ops Agent for sles-16 +# ====================================== + +FROM opensuse/leap:16.0 AS sles16-build-base +ARG OPENJDK_MAJOR_VERSION + +RUN set -x; zypper -n refresh && \ + zypper -n update && \ + zypper -n install git systemd autoconf automake flex libtool libcurl-devel libopenssl-devel libyajl-devel gcc gcc-c++ zlib-devel rpm-build expect cmake systemd-devel systemd-rpm-macros unzip zip 'bison>3' +# Allow fluent-bit to find systemd +RUN ln -fs /usr/lib/systemd /lib/systemd +COPY --from=openjdk-install /usr/local/java-${OPENJDK_MAJOR_VERSION}-openjdk/ /usr/local/java-${OPENJDK_MAJOR_VERSION}-openjdk +ENV JAVA_HOME /usr/local/java-${OPENJDK_MAJOR_VERSION}-openjdk/ +COPY --from=cmake-install-recent /cmake.sh /cmake.sh +RUN set -x; bash /cmake.sh --skip-license --prefix=/usr/local + + +SHELL ["/bin/bash", "-c"] + +# Install golang +ARG TARGETARCH +ARG GO_VERSION +ADD https://go.dev/dl/go${GO_VERSION}.linux-${TARGETARCH}.tar.gz /tmp/go${GO_VERSION}.tar.gz +RUN set -xe; \ + tar -xf /tmp/go${GO_VERSION}.tar.gz -C /usr/local +ENV PATH="${PATH}:/usr/local/go/bin" + + +FROM sles16-build-base AS sles16-build-otel +WORKDIR /work +# Download golang deps +COPY ./submodules/opentelemetry-operations-collector/go.mod ./submodules/opentelemetry-operations-collector/go.sum submodules/opentelemetry-operations-collector/ +RUN cd submodules/opentelemetry-operations-collector && go mod download + +COPY ./submodules/opentelemetry-java-contrib submodules/opentelemetry-java-contrib +# Install gradle. The first invocation of gradlew does this +RUN cd submodules/opentelemetry-java-contrib && ./gradlew --no-daemon -Djdk.lang.Process.launchMechanism=vfork tasks +COPY ./submodules/opentelemetry-operations-collector submodules/opentelemetry-operations-collector +COPY ./builds/otel.sh . +RUN \ + unset OTEL_TRACES_EXPORTER && \ + unset OTEL_EXPORTER_OTLP_TRACES_ENDPOINT && \ + unset OTEL_EXPORTER_OTLP_TRACES_PROTOCOL && \ + ./otel.sh /work/cache/ + +FROM sles16-build-base AS sles16-build-fluent-bit +WORKDIR /work +COPY ./submodules/fluent-bit submodules/fluent-bit +COPY ./builds/fluent_bit.sh . +RUN ./fluent_bit.sh /work/cache/ + + +FROM sles16-build-base AS sles16-build-systemd +WORKDIR /work +COPY ./systemd systemd +COPY ./builds/systemd.sh . +RUN ./systemd.sh /work/cache/ + + +FROM sles16-build-base AS sles16-build-golang-base +WORKDIR /work +COPY go.mod go.sum ./ +# Fetch dependencies +RUN go mod download +COPY confgenerator confgenerator +COPY apps apps +COPY internal internal + + +FROM sles16-build-golang-base AS sles16-build-wrapper +WORKDIR /work +COPY cmd/agent_wrapper cmd/agent_wrapper +COPY ./builds/agent_wrapper.sh . +RUN ./agent_wrapper.sh /work/cache/ + + +FROM sles16-build-golang-base AS sles16-build +WORKDIR /work +COPY . /work + +# Run the build script once to build the ops agent engine to a cache +RUN mkdir -p /tmp/cache_run/golang && cp -r . /tmp/cache_run/golang +WORKDIR /tmp/cache_run/golang +RUN SLE_VERSION=16 ./pkg/rpm/build.sh &> /dev/null || true +WORKDIR /work + +COPY ./confgenerator/default-config.yaml /work/cache/etc/google-cloud-ops-agent/config.yaml +COPY --from=sles16-build-otel /work/cache /work/cache +COPY --from=sles16-build-fluent-bit /work/cache /work/cache +COPY --from=sles16-build-systemd /work/cache /work/cache +COPY --from=sles16-build-wrapper /work/cache /work/cache +RUN SLE_VERSION=16 ./pkg/rpm/build.sh + +COPY cmd/ops_agent_uap_plugin cmd/ops_agent_uap_plugin +COPY ./builds/ops_agent_plugin.sh . +RUN ./ops_agent_plugin.sh /work/cache/ +RUN ./pkg/plugin/build.sh /work/cache sles16 + + +FROM scratch AS sles16 +COPY --from=sles16-build /tmp/google-cloud-ops-agent.tgz /google-cloud-ops-agent-sles-16.tgz +COPY --from=sles16-build /google-cloud-ops-agent*.rpm / +COPY --from=sles16-build /google-cloud-ops-agent-plugin*.tar.gz / + # ====================================== # Build Ops Agent for ubuntu-jammy # ====================================== @@ -1330,6 +1435,7 @@ COPY --from=bullseye /* / COPY --from=trixie /* / COPY --from=sles12 /* / COPY --from=sles15 /* / +COPY --from=sles16 /* / COPY --from=jammy /* / COPY --from=noble /* / COPY --from=plucky /* / diff --git a/builds/fluent_bit.sh b/builds/fluent_bit.sh index 56263357cc..2d83b811dc 100755 --- a/builds/fluent_bit.sh +++ b/builds/fluent_bit.sh @@ -32,7 +32,7 @@ cmake .. -DCMAKE_INSTALL_PREFIX=$fluent_bit_dir \ -DFLB_IN_SYSTEMD=On \ -DFLB_MSGPACK_TO_JSON_INIT_BUFFER_SIZE=1.5 -DFLB_MSGPACK_TO_JSON_REALLOC_BUFFER_SIZE=.10 \ -DFLB_CONFIG_YAML=OFF -make -j8 +make VERBOSE=1 make DESTDIR="$DESTDIR" install # We don't want fluent-bit's service or configuration, but there are no cmake diff --git a/dockerfiles/compile.go b/dockerfiles/compile.go index 092929fd2e..69b26c3255 100644 --- a/dockerfiles/compile.go +++ b/dockerfiles/compile.go @@ -182,7 +182,7 @@ RUN set -x; \ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 1 \ --slave /usr/bin/g++ g++ /usr/bin/g++-8 && \ update-alternatives --set gcc /usr/bin/gcc-8` + installJava + installCMake, - package_build: "RUN ./pkg/rpm/build.sh", + package_build: "RUN SLE_VERSION=12 ./pkg/rpm/build.sh", tar_distro_name: "sles-12", package_extension: "rpm", }, @@ -194,10 +194,22 @@ RUN set -x; \ zypper -n install git systemd autoconf automake flex libtool libcurl-devel libopenssl-devel libyajl-devel gcc gcc-c++ zlib-devel rpm-build expect cmake systemd-devel systemd-rpm-macros unzip zip 'bison>3' # Allow fluent-bit to find systemd RUN ln -fs /usr/lib/systemd /lib/systemd` + installJava + installCMake, - package_build: "RUN ./pkg/rpm/build.sh", + package_build: "RUN SLE_VERSION=15 ./pkg/rpm/build.sh", tar_distro_name: "sles-15", package_extension: "rpm", }, + { + from_image: "opensuse/leap:16.0", + target_name: "sles16", + install_packages: `RUN set -x; zypper -n refresh && \ + zypper -n update && \ + zypper -n install git systemd autoconf automake flex libtool libcurl-devel libopenssl-devel libyajl-devel gcc gcc-c++ zlib-devel rpm-build expect cmake systemd-devel systemd-rpm-macros unzip zip 'bison>3' +# Allow fluent-bit to find systemd +RUN ln -fs /usr/lib/systemd /lib/systemd` + installJava + installCMake, + package_build: "RUN SLE_VERSION=16 ./pkg/rpm/build.sh", + tar_distro_name: "sles-16", + package_extension: "rpm", + }, { from_image: "ubuntu:jammy", target_name: "jammy", diff --git a/kokoro/config/build/presubmit/sles15_aarch64.gcl b/kokoro/config/build/presubmit/sles15_aarch64.gcl index 1041e8e918..4a5a002f78 100644 --- a/kokoro/config/build/presubmit/sles15_aarch64.gcl +++ b/kokoro/config/build/presubmit/sles15_aarch64.gcl @@ -3,7 +3,7 @@ import '../common.gcl' as common config build = common.build { params { environment { - DISTRO = 'sles15' + DISTRO = 'sles16' PKGFORMAT = 'rpm' } } diff --git a/kokoro/config/build/presubmit/sles15_x86_64.gcl b/kokoro/config/build/presubmit/sles15_x86_64.gcl index 1041e8e918..4a5a002f78 100644 --- a/kokoro/config/build/presubmit/sles15_x86_64.gcl +++ b/kokoro/config/build/presubmit/sles15_x86_64.gcl @@ -3,7 +3,7 @@ import '../common.gcl' as common config build = common.build { params { environment { - DISTRO = 'sles15' + DISTRO = 'sles16' PKGFORMAT = 'rpm' } } diff --git a/kokoro/config/test/ops_agent/presubmit/sles15_aarch64.gcl b/kokoro/config/test/ops_agent/presubmit/sles15_aarch64.gcl index 1279b4897e..ecac3b9349 100644 --- a/kokoro/config/test/ops_agent/presubmit/sles15_aarch64.gcl +++ b/kokoro/config/test/ops_agent/presubmit/sles15_aarch64.gcl @@ -3,7 +3,7 @@ import 'common.gcl' as common config build = common.ops_agent_test { params { environment { - TARGET = 'sles15' + TARGET = 'sles16' ARCH = 'aarch64' } } diff --git a/kokoro/config/test/ops_agent/presubmit/sles15_x86_64.gcl b/kokoro/config/test/ops_agent/presubmit/sles15_x86_64.gcl index 0508fe0124..98b80a3b57 100644 --- a/kokoro/config/test/ops_agent/presubmit/sles15_x86_64.gcl +++ b/kokoro/config/test/ops_agent/presubmit/sles15_x86_64.gcl @@ -3,7 +3,7 @@ import 'common.gcl' as common config build = common.ops_agent_test { params { environment { - TARGET = 'sles15' + TARGET = 'sles16' ARCH = 'x86_64' } } diff --git a/kokoro/config/test/third_party_apps/presubmit/sles15_aarch64.gcl b/kokoro/config/test/third_party_apps/presubmit/sles15_aarch64.gcl index 65024bfea8..7789bf4aef 100644 --- a/kokoro/config/test/third_party_apps/presubmit/sles15_aarch64.gcl +++ b/kokoro/config/test/third_party_apps/presubmit/sles15_aarch64.gcl @@ -3,7 +3,7 @@ import 'common.gcl' as common config build = common.third_party_apps_test { params { environment { - TARGET = 'sles15' + TARGET = 'sles16' ARCH = 'aarch64' } } diff --git a/kokoro/config/test/third_party_apps/presubmit/sles15_x86_64.gcl b/kokoro/config/test/third_party_apps/presubmit/sles15_x86_64.gcl index 1d3afe1f56..da5ca29e1c 100644 --- a/kokoro/config/test/third_party_apps/presubmit/sles15_x86_64.gcl +++ b/kokoro/config/test/third_party_apps/presubmit/sles15_x86_64.gcl @@ -3,7 +3,7 @@ import 'common.gcl' as common config build = common.third_party_apps_test { params { environment { - TARGET = 'sles15' + TARGET = 'sles16' ARCH = 'x86_64' } } diff --git a/pkg/rpm/build.sh b/pkg/rpm/build.sh index 23b0f55270..5fe7275b26 100755 --- a/pkg/rpm/build.sh +++ b/pkg/rpm/build.sh @@ -19,9 +19,14 @@ set -ex . VERSION # Build .rpms +RPMBUILD_ARGS=() +if [[ -n "${SLE_VERSION}" ]]; then + RPMBUILD_ARGS+=(--define "sle_version ${SLE_VERSION}") +fi rpmbuild --define "_source_filedigest_algorithm md5" \ --define "package_version ${PKG_VERSION//[^a-zA-Z0-9.]/.}" \ --define "_sourcedir $(pwd)" \ --define "_rpmdir $(pwd)" \ + "${RPMBUILD_ARGS[@]}" \ -ba pkg/rpm/google-cloud-ops-agent.spec cp $(uname -m)/google-cloud-ops-agent*.rpm / diff --git a/project.yaml b/project.yaml index f99389a133..6c2056780b 100644 --- a/project.yaml +++ b/project.yaml @@ -198,6 +198,22 @@ targets: - suse-cloud:sles-15-sp6-arm64 - opensuse-cloud:opensuse-leap-arm64 - opensuse-cloud=opensuse-leap-15-6-v20250724-arm64 + sles16: + os_versions: [sles-16*, opensuse-leap-16*] + package_extension: + rpm + architectures: + x86_64: + test_distros: + representative: + - suse-cloud: sles-16-0-x86-64 + exhaustive: + - suse-sap-cloud:sles-sap-16-0-x86-64 + aarch64: + test_distros: + representative: + - suse-cloud:sles-16-0-arm64 + exhaustive: windows: package_extension: goo diff --git a/submodules/fluent-bit b/submodules/fluent-bit index 2a1d3c5d7f..797d5e3366 160000 --- a/submodules/fluent-bit +++ b/submodules/fluent-bit @@ -1 +1 @@ -Subproject commit 2a1d3c5d7f5b4de13bb5fdb3ae7800e805eac775 +Subproject commit 797d5e3366f871d4e9655839dd371c17b53225f9 From d0a99e3f0e82a8b6074f23de32a1b5b7d37dc327 Mon Sep 17 00:00:00 2001 From: XuechunHou Date: Fri, 30 Jan 2026 16:49:00 +0000 Subject: [PATCH 03/10] reverted changes in fluent_bit.sh --- builds/fluent_bit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builds/fluent_bit.sh b/builds/fluent_bit.sh index 2d83b811dc..56263357cc 100755 --- a/builds/fluent_bit.sh +++ b/builds/fluent_bit.sh @@ -32,7 +32,7 @@ cmake .. -DCMAKE_INSTALL_PREFIX=$fluent_bit_dir \ -DFLB_IN_SYSTEMD=On \ -DFLB_MSGPACK_TO_JSON_INIT_BUFFER_SIZE=1.5 -DFLB_MSGPACK_TO_JSON_REALLOC_BUFFER_SIZE=.10 \ -DFLB_CONFIG_YAML=OFF -make VERBOSE=1 +make -j8 make DESTDIR="$DESTDIR" install # We don't want fluent-bit's service or configuration, but there are no cmake From 45f6acdf772c011a44238bd5b308994b7709910f Mon Sep 17 00:00:00 2001 From: XuechunHou Date: Fri, 30 Jan 2026 17:06:41 +0000 Subject: [PATCH 04/10] updated transformation test --- .../output_otel.yaml | 73 +- .../output_otel.yaml | 76 +- .../output_otel.yaml | 366 +------ .../output_otel.yaml | 96 +- .../output_otel.yaml | 215 +--- .../output_otel.yaml | 101 +- .../output_otel.yaml | 497 +-------- .../logging_processor-flink/output_otel.yaml | 219 +--- .../logging_processor-hadoop/output_otel.yaml | 106 +- .../output_otel.yaml | 393 +------ .../output_otel.yaml | 72 +- .../logging_processor-kafka/output_otel.yaml | 218 +--- .../output_otel.yaml | 4 +- .../output_otel.yaml | 126 +-- .../output_otel.yaml | 137 +-- .../output_otel.yaml | 169 +-- .../output_otel.yaml | 106 +- .../output_otel.yaml | 132 +-- .../output_otel.yaml | 68 +- .../output_otel.yaml | 33 +- .../output_otel.yaml | 58 +- .../output_otel.yaml | 53 +- .../output_otel.yaml | 58 +- .../output_otel.yaml | 4 +- .../output_otel.yaml | 70 +- .../output_otel.yaml | 513 +--------- .../output_otel.yaml | 357 +------ .../logging_processor-redis/output_otel.yaml | 959 +----------------- .../logging_processor-solr/output_otel.yaml | 210 +--- .../output_otel.yaml | 128 +-- .../output_otel.yaml | 458 +-------- .../output_otel.yaml | 84 +- .../output_otel.yaml | 131 +-- .../output_otel.yaml | 112 +- .../output_otel.yaml | 19 +- .../output_otel.yaml | 18 +- .../output_otel.yaml | 6 +- .../output_otel.yaml | 6 +- .../output_otel.yaml | 20 +- .../output_otel.yaml | 18 +- .../output_otel.yaml | 58 +- .../output_otel.yaml | 57 +- 42 files changed, 287 insertions(+), 6317 deletions(-) diff --git a/transformation_test/testdata/logging_processor-apache-access/output_otel.yaml b/transformation_test/testdata/logging_processor-apache-access/output_otel.yaml index 10b6ebad94..908cbdc936 100644 --- a/transformation_test/testdata/logging_processor-apache-access/output_otel.yaml +++ b/transformation_test/testdata/logging_processor-apache-access/output_otel.yaml @@ -1,60 +1,13 @@ -- entries: - - jsonPayload: {} - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/apache_access - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: 2000-10-10T20:55:36Z - - jsonPayload: - user: frank - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/apache_access - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: 2000-10-10T20:55:36Z - - jsonPayload: {} - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/apache_access - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: 2021-08-26T16:50:15Z - - jsonPayload: - user: admin - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/apache_access - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: 2021-08-26T16:51:22Z - - jsonPayload: - message: "172.16.0.1 - - [26/Aug/2021:16:53:05 +0000] \"PUT /api/data/123 HTTP/1.1\" 500 789 \"https://api.example.com/docs\" \"python-requests/2.25.1\" " - labels: - compute.googleapis.com/resource_name: hostname - logging.googleapis.com/instrumentation_source: agent.googleapis.com/apache_access - logName: projects/my-project/logs/my-log-name - resource: - labels: - instance_id: test-instance-id - zone: test-zone - type: gce_instance - timestamp: now - partialSuccess: true +- exit_error: exit status 1 +- collector_errors: + - stderr: | + Error: invalid configuration: processors::transform/logs_transformation__test_my-log-name_0: unable to parse OTTL statement "set(log.cache[\"__parsed_regex\"], ExtractPatternsRubyRegex(log.body[\"message\"], \"^(?[^ ]*) (?[^ ]*) (?[^ ]*) \\\\[(?