Skip to content

Commit 3246c32

Browse files
authored
Merge branch 'fluent:master' into enable-aws-http-debug
2 parents d6d31b3 + 65722e8 commit 3246c32

File tree

1,160 files changed

+139202
-3030
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,160 files changed

+139202
-3030
lines changed

.github/workflows/call-build-linux-packages.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ jobs:
163163
# For ubuntu map to codename using the disto-info list (CSV)
164164
run: |
165165
sudo apt-get update
166-
sudo apt-get install -y distro-info awscli
166+
sudo apt-get install -y distro-info
167+
sudo apt-get install -y awscli || sudo snap install aws-cli --classic
168+
167169
TARGET=${DISTRO%*.arm64v8}
168170
if [[ "$TARGET" == "ubuntu/"* ]]; then
169171
UBUNTU_CODENAME=$(cut -d ',' -f 1,3 < "/usr/share/distro-info/ubuntu.csv"|grep "${TARGET##*/}"|cut -d ',' -f 2)
@@ -224,7 +226,9 @@ jobs:
224226
timeout-minutes: 10
225227
run: |
226228
sudo apt-get update
227-
sudo apt-get install -y createrepo-c aptly awscli
229+
sudo apt-get install -y createrepo-c aptly
230+
sudo apt-get install -y awscli || sudo snap install aws-cli --classic
231+
shell: bash
228232
env:
229233
DEBIAN_FRONTEND: noninteractive
230234

.github/workflows/call-windows-unit-tests.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ on:
2828

2929
jobs:
3030
call-build-windows-unit-test:
31-
runs-on: windows-latest
31+
runs-on: ${{ matrix.config.os }}
3232
environment: ${{ inputs.environment }}
3333
strategy:
3434
fail-fast: false
@@ -39,11 +39,19 @@ jobs:
3939
cmake_additional_opt: ""
4040
vcpkg_triplet: x86-windows-static
4141
cmake_version: "3.31.6"
42+
os: windows-latest
4243
- name: "Windows 64bit"
4344
arch: x64
4445
cmake_additional_opt: ""
4546
vcpkg_triplet: x64-windows-static
4647
cmake_version: "3.31.6"
48+
os: windows-latest
49+
- name: "Windows 64bit (Arm64)"
50+
arch: amd64_arm64
51+
cmake_additional_opt: "-DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_SYSTEM_PROCESSOR=ARM64"
52+
vcpkg_triplet: arm64-windows-static
53+
cmake_version: "3.31.6"
54+
os: windows-11-arm
4755
permissions:
4856
contents: read
4957
# Default environment variables can be overridden below. To prevent library pollution - without this other random libraries may be found on the path leading to failures.
@@ -62,7 +70,7 @@ jobs:
6270
Copy-Item -Path C:\WinFlexBison/win_bison.exe C:\WinFlexBison/bison.exe
6371
Copy-Item -Path C:\WinFlexBison/win_flex.exe C:\WinFlexBison/flex.exe
6472
echo "C:\WinFlexBison" | Out-File -FilePath $env:GITHUB_PATH -Append
65-
choco install cmake --version "${{ matrix.config.cmake_version }}" --force
73+
choco install cmake.portable --version "${{ matrix.config.cmake_version }}" --force
6674
env:
6775
WINFLEXBISON: https://github.com/lexxmark/winflexbison/releases/download/v2.5.22/win_flex_bison-2.5.22.zip
6876
shell: pwsh
@@ -119,7 +127,7 @@ jobs:
119127
key: ${{ steps.cache-unit-test-vcpkg-sources.outputs.cache-primary-key }}
120128
enableCrossOsArchive: false
121129

122-
- name: Build unit-test for Fluent Bit packages (only for x86 and x64)
130+
- name: Build unit-test for Fluent Bit packages (x86, x64, and ARM64)
123131
run: |
124132
cmake -G "NMake Makefiles" `
125133
-D FLB_TESTS_INTERNAL=On `
@@ -162,7 +170,7 @@ jobs:
162170
dumpbin /dependents .\bin\fluent-bit.exe
163171
working-directory: build
164172

165-
- name: Build unit-test for Fluent Bit packages (only for x86 and x64)
173+
- name: Run unit tests for Fluent Bit packages (x86, x64, and ARM64)
166174
run: |
167175
ctest --build-run-dir "$PWD" --output-on-failure
168176
shell: pwsh

.github/workflows/cron-scorecards-analysis.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
persist-credentials: false
3232

3333
- name: "Run analysis"
34-
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde
34+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a
3535
with:
3636
results_file: results.sarif
3737
results_format: sarif
@@ -46,7 +46,7 @@ jobs:
4646

4747
# Upload the results to GitHub's code scanning dashboard.
4848
- name: "Upload to code-scanning"
49-
uses: github/codeql-action/upload-sarif@v3
49+
uses: github/codeql-action/upload-sarif@v4
5050
with:
5151
sarif_file: results.sarif
5252
category: ossf-scorecard

.github/workflows/cron-trivy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
format: table
7373

7474
- name: Upload Trivy scan results to GitHub Security tab
75-
uses: github/codeql-action/upload-sarif@v3
75+
uses: github/codeql-action/upload-sarif@v4
7676
with:
7777
sarif_file: trivy-results-${{ matrix.local_tag }}.sarif
7878
category: ${{ matrix.arch }} container

.github/workflows/pr-compile-check.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,35 @@ jobs:
120120
echo "$ldd_result" | grep libmsgpack
121121
echo "$ldd_result" | grep librdkafka
122122
working-directory: build
123+
124+
# Sanity check for compilation w/ CXX support
125+
pr-compile-without-cxx:
126+
runs-on: ubuntu-24.04
127+
timeout-minutes: 60
128+
strategy:
129+
fail-fast: false
130+
matrix:
131+
cmake_version:
132+
- "3.31.6"
133+
steps:
134+
- name: Setup environment
135+
run: |
136+
sudo apt-get update
137+
sudo apt-get install -y bison cmake flex gcc libssl-dev libyaml-dev
138+
sudo apt-get install -y libzstd-dev librdkafka-dev
139+
140+
- name: Install cmake
141+
uses: jwlawson/actions-setup-cmake@v2
142+
with:
143+
cmake-version: "${{ matrix.cmake_version }}"
144+
145+
- name: Checkout Fluent Bit code
146+
uses: actions/checkout@v5
147+
148+
- name: Compile w/ CXX support
149+
run: |
150+
export CXX=/bin/false
151+
export nparallel=$(( $(getconf _NPROCESSORS_ONLN) > 8 ? 8 : $(getconf _NPROCESSORS_ONLN) ))
152+
cmake -DFLB_PREFER_SYSTEM_LIB_ZSTD=ON -DFLB_PREFER_SYSTEM_LIB_KAFKA=ON ../
153+
make -j $nparallel
154+
working-directory: build

.github/workflows/pr-fuzz.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
path: ./out/artifacts
3434
- name: Upload Sarif
3535
if: always() && steps.build.outcome == 'success'
36-
uses: github/codeql-action/upload-sarif@v3
36+
uses: github/codeql-action/upload-sarif@v4
3737
with:
3838
# Path to SARIF file relative to the root of the repository
3939
sarif_file: cifuzz-sarif/results.sarif

.github/workflows/staging-release.yaml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -831,9 +831,20 @@ jobs:
831831
target_commitish: '3.2'
832832
make_latest: false
833833

834-
- name: Release 4.0 and latest
834+
- name: Release 4.0 - not latest
835835
uses: softprops/action-gh-release@v2
836836
if: startsWith(inputs.version, '4.0')
837+
with:
838+
body: "https://fluentbit.io/announcements/v${{ inputs.version }}/"
839+
draft: false
840+
generate_release_notes: true
841+
name: "Fluent Bit ${{ inputs.version }}"
842+
tag_name: v${{ inputs.version }}
843+
make_latest: false
844+
845+
- name: Release 4.1 and latest
846+
uses: softprops/action-gh-release@v2
847+
if: startsWith(inputs.version, '4.1')
837848
with:
838849
body: "https://fluentbit.io/announcements/v${{ inputs.version }}/"
839850
draft: false
@@ -950,12 +961,20 @@ jobs:
950961
token: ${{ secrets.GH_PA_TOKEN }}
951962
ref: 3.2
952963

953-
- name: Release 4.0 and latest
964+
- name: Release 4.0 - not latest
954965
if: startsWith(inputs.version, '4.0')
955966
uses: actions/checkout@v5
956967
with:
957968
repository: fluent/fluent-bit-docs
958969
token: ${{ secrets.GH_PA_TOKEN }}
970+
ref: 4.0
971+
972+
- name: Release 4.1 and latest
973+
if: startsWith(inputs.version, '4.1')
974+
uses: actions/checkout@v5
975+
with:
976+
repository: fluent/fluent-bit-docs
977+
token: ${{ secrets.GH_PA_TOKEN }}
959978

960979
- name: Ensure we have the script we need
961980
run: |
@@ -1056,7 +1075,7 @@ jobs:
10561075

10571076
- name: Release 4.1
10581077
if: startsWith(inputs.version, '4.1')
1059-
uses: actions/checkout@v4
1078+
uses: actions/checkout@v5
10601079
with:
10611080
ref: master
10621081

.github/workflows/unit-tests.yaml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ jobs:
156156
FLB_OPT: ${{ matrix.flb_option }}
157157

158158
run-aarch64-unit-tests:
159-
runs-on: ${{(github.repository == 'fluent/fluent-bit') && 'ubuntu-22.04-arm' || 'ubuntu-latest' }}
159+
runs-on: ${{(github.repository == 'fluent/fluent-bit') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
160160
permissions:
161161
contents: read
162162
needs:
@@ -183,8 +183,8 @@ jobs:
183183
- name: Setup environment
184184
run: |
185185
sudo apt-get update
186-
sudo apt-get install -y gcc-9 g++-9 clang-12 flex bison libsystemd-dev gcovr libyaml-dev libbpf-dev linux-tools-common curl tar gzip
187-
sudo ln -s /usr/bin/llvm-symbolizer-12 /usr/bin/llvm-symbolizer || true
186+
sudo apt-get install -y gcc-14 g++-14 clang-14 flex bison libsystemd-dev gcovr libyaml-dev libbpf-dev linux-tools-common curl tar gzip
187+
sudo ln -s /usr/bin/llvm-symbolizer-14 /usr/bin/llvm-symbolizer || true
188188
sudo mkdir -p "${CMAKE_HOME}"
189189
cmake_url="https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz"
190190
cmake_dist="$(mktemp --suffix ".tar.gz")"
@@ -199,9 +199,9 @@ jobs:
199199

200200
- name: Build and test with arm runners
201201
run: |
202-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
203-
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
204-
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 90
202+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 90
203+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 90
204+
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 90
205205
206206
export nparallel=$(( $(getconf _NPROCESSORS_ONLN) > 8 ? 8 : $(getconf _NPROCESSORS_ONLN) ))
207207
export FLB_OPTION="${{ matrix.config.flb_option }}"
@@ -255,13 +255,32 @@ jobs:
255255
install: |
256256
apt-get update
257257
apt-get install -y gcc-12 g++-12 libyaml-dev flex bison libssl-dev libbpf-dev linux-tools-common
258+
arch="$(dpkg --print-architecture)"
259+
case "$arch" in
260+
riscv64)
261+
apt-get install -y gcc-12 g++-12 libyaml-dev flex bison libssl-dev \
262+
libbpf-dev linux-tools-common lld-15
263+
update-alternatives --install /usr/bin/ld.lld ld.lld /usr/bin/ld.lld-15 50
264+
;;
265+
*)
266+
;;
267+
esac
258268
apt-get satisfy -y cmake "cmake (<< 4.0)"
259269
260270
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 90
261271
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 90
262272
run: |
263273
cd build
264274
export nparallel=$(( $(getconf _NPROCESSORS_ONLN) > 8 ? 8 : $(getconf _NPROCESSORS_ONLN) ))
275+
export CMAKE_LINKER_OPTION=""
276+
arch="$(dpkg --print-architecture)"
277+
case "$arch" in
278+
riscv64)
279+
export CMAKE_LINKER_OPTION='-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=lld"'
280+
;;
281+
*)
282+
;;
283+
esac
265284
export FLB_OPTION="-DFLB_WITHOUT_flb-it-network=1 -DFLB_WITHOUT_flb-it-fstore=1"
266285
export FLB_OMIT_OPTION=""
267286
export GLOBAL_OPTION="-DFLB_BACKTRACE=Off -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off"
@@ -272,7 +291,7 @@ jobs:
272291
273292
echo "CC = $CC, CXX = $CXX, FLB_OPT = $FLB_OPT"
274293
275-
cmake ${FLB_OPT} ../
294+
cmake ${CMAKE_LINKER_OPTION} ${FLB_OPT} ../
276295
make -j $nparallel
277296
ctest -j $nparallel --build-run-dir . --output-on-failure
278297

.github/workflows/update-dockerhub.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v5
1515

1616
- name: Docker Hub Description
17-
uses: peter-evans/dockerhub-description@v4
17+
uses: peter-evans/dockerhub-description@v5
1818
with:
1919
username: ${{ secrets.DOCKERHUB_USERNAME }}
2020
password: ${{ secrets.DOCKERHUB_TOKEN }}

CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
77

88
# Fluent Bit Version
99
set(FLB_VERSION_MAJOR 4)
10-
set(FLB_VERSION_MINOR 1)
10+
set(FLB_VERSION_MINOR 2)
1111
set(FLB_VERSION_PATCH 0)
1212
set(FLB_VERSION_STR "${FLB_VERSION_MAJOR}.${FLB_VERSION_MINOR}.${FLB_VERSION_PATCH}")
1313

@@ -214,6 +214,9 @@ option(FLB_CUSTOM_CALYPTIA "Enable Calyptia Support" Yes)
214214
# Config formats
215215
option(FLB_CONFIG_YAML "Enable YAML config format" Yes)
216216

217+
option(FLB_BENCHMARKS "Enable benchmarks" No)
218+
219+
217220
# List of plugins available and defaults for each option
218221
include(cmake/plugins_options.cmake)
219222

@@ -318,6 +321,7 @@ if(FLB_DEV)
318321
set(FLB_HTTP_SERVER On)
319322
set(FLB_HTTP_CLIENT_DEBUG On)
320323
set(FLB_TESTS_INTERNAL On)
324+
set(FLB_BENCHMARKS On)
321325
endif()
322326

323327
if(FLB_TRACE)
@@ -588,6 +592,9 @@ endif()
588592
# ring buffer library
589593
add_subdirectory(${FLB_PATH_LIB_RING_BUFFER} EXCLUDE_FROM_ALL)
590594

595+
# yyson
596+
add_subdirectory(${FLB_PATH_LIB_YYJSON} EXCLUDE_FROM_ALL)
597+
591598
# Avro
592599
if(FLB_AVRO_ENCODER)
593600
# jansson
@@ -1067,6 +1074,10 @@ else()
10671074
FLB_DEFINITION_VAL(FLB_MSGPACK_TO_JSON_REALLOC_BUFFER_SIZE ${FLB_MSGPACK_TO_JSON_REALLOC_BUFFER_SIZE})
10681075
endif()
10691076

1077+
if (FLB_BENCHMARKS)
1078+
add_subdirectory(benchmarks)
1079+
endif()
1080+
10701081
# Build tools/xxd-c
10711082
add_subdirectory(tools/xxd-c)
10721083

0 commit comments

Comments
 (0)