Skip to content

Commit a148473

Browse files
committed
Merge remote-tracking branch 'upstream/master' into upstream-pod-identity
2 parents ec2209c + 412d3ea commit a148473

File tree

2,345 files changed

+344416
-10413
lines changed

Some content is hidden

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

2,345 files changed

+344416
-10413
lines changed

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

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
# https://openssf.org/blog/2022/01/19/reducing-security-risks-in-open-source-software-at-scale-scorecards-launches-v4/
44
name: Scorecards supply-chain security
55
on:
6-
# Only the default branch is supported.
7-
branch_protection_rule:
6+
push:
7+
# Only the default branch is supported.
8+
branches:
9+
- main
810
schedule:
911
# Weekly on Saturdays.
1012
- cron: '30 1 * * 6'
@@ -31,29 +33,20 @@ jobs:
3133
- name: "Run analysis"
3234
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46
3335
with:
34-
results_file: scorecard-results.sarif
36+
results_file: results.sarif
3537
results_format: sarif
36-
# (Optional) fine-grained personal access token. Uncomment the `repo_token` line below if:
37-
# - you want to enable the Branch-Protection check on a *public* repository, or
38-
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-fine-grained-pat-optional.
39-
repo_token: ${{ secrets.SCORECARD_TOKEN }}
40-
#
41-
# Publish the results for public repositories to enable scorecard badges. For more details, see
42-
# https://github.com/ossf/scorecard-action#publishing-results.
43-
# For private repositories, `publish_results` will automatically be set to `false`, regardless
44-
# of the value entered here.
4538
publish_results: true
4639

4740
- name: "Upload artifact"
4841
uses: actions/upload-artifact@v4
4942
with:
5043
name: SARIF file
51-
path: scorecard-results.sarif
44+
path: results.sarif
5245
retention-days: 7
5346

5447
# Upload the results to GitHub's code scanning dashboard.
5548
- name: "Upload to code-scanning"
5649
uses: github/codeql-action/upload-sarif@v3
5750
with:
58-
sarif_file: scorecard-results.sarif
51+
sarif_file: results.sarif
5952
category: ossf-scorecard

.github/workflows/cron-unstable-build.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
schedule:
1515
- cron: "0 6 * * *" # master build
1616
- cron: "0 12 * * *" # 3.0 build
17+
- cron: "0 18 * * *" # 3.1 build
1718

1819
# We do not want a new unstable build to run whilst we are releasing the current unstable build.
1920
concurrency: unstable-build-release
@@ -57,6 +58,12 @@ jobs:
5758
echo "cron_branch=3.0" >> $GITHUB_ENV
5859
shell: bash
5960

61+
- name: 3.1 run
62+
if: github.event_name == 'schedule' && github.event.schedule=='0 18 * * *'
63+
run: |
64+
echo "cron_branch=3.1" >> $GITHUB_ENV
65+
shell: bash
66+
6067
- name: Output the branch to use
6168
id: branch
6269
run: |

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,13 @@ jobs:
4747
- name: Setup environment
4848
run: |
4949
sudo apt-get update
50-
sudo apt-get install -y gcc-7 g++-7 clang-6.0 libsystemd-dev gcovr libyaml-dev libluajit-5.1-dev
50+
sudo apt-get install -y curl gcc-7 g++-7 clang-6.0 libsystemd-dev gcovr libyaml-dev libluajit-5.1-dev \
51+
libnghttp2-dev libjemalloc-dev
5152
sudo ln -s /usr/bin/llvm-symbolizer-6.0 /usr/bin/llvm-symbolizer || true
53+
mkdir -p /tmp/libbacktrace/build && \
54+
curl -L https://github.com/ianlancetaylor/libbacktrace/archive/8602fda.tar.gz | \
55+
tar --strip-components=1 -xzC /tmp/libbacktrace/ && \
56+
pushd /tmp/libbacktrace/build && ../configure && make && sudo make install && popd
5257
5358
- name: Checkout Fluent Bit code
5459
uses: actions/checkout@v4
@@ -67,7 +72,7 @@ jobs:
6772
CC: ${{ matrix.compiler }}
6873
CXX: ${{ matrix.compiler }}
6974
FLB_OPT: ${{ matrix.flb_option }}
70-
GLOBAL_OPTS: "-DFLB_BACKTRACE=Off -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off"
75+
GLOBAL_OPTS: "-DFLB_JEMALLOC=On -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off"
7176

7277
- name: Display dependencies w/ ldd
7378
run: |

.github/workflows/staging-release.yaml

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,8 @@ jobs:
502502
TAG: ${{ steps.get-tag.outputs.tag }}
503503

504504
staging-release-images-latest-tags:
505-
# Only update latest tags for 3.1 releases
506-
if: startsWith(github.event.inputs.version, '3.1')
505+
# Only update latest tags for 3.2 releases
506+
if: startsWith(github.event.inputs.version, '3.2')
507507
name: Release latest Linux container images
508508
runs-on: ubuntu-latest
509509
needs:
@@ -803,9 +803,21 @@ jobs:
803803
target_commitish: '3.0'
804804
make_latest: false
805805

806-
- name: Release 3.1 and latest
806+
- name: Release 3.1 - not latest
807807
uses: softprops/action-gh-release@v2
808808
if: startsWith(inputs.version, '3.1')
809+
with:
810+
body: "https://fluentbit.io/announcements/v${{ inputs.version }}/"
811+
draft: false
812+
generate_release_notes: true
813+
name: "Fluent Bit ${{ inputs.version }}"
814+
tag_name: v${{ inputs.version }}
815+
target_commitish: '3.1'
816+
make_latest: false
817+
818+
- name: Release 3.2 and latest
819+
uses: softprops/action-gh-release@v2
820+
if: startsWith(inputs.version, '3.2')
809821
with:
810822
body: "https://fluentbit.io/announcements/v${{ inputs.version }}/"
811823
draft: false
@@ -903,11 +915,20 @@ jobs:
903915
uses: actions/checkout@v4
904916
with:
905917
repository: fluent/fluent-bit-docs
918+
ref: 3.0
906919
token: ${{ secrets.GH_PA_TOKEN }}
907920

908-
- name: Release 3.1 and latest
921+
- name: Release 3.1 - not latest
909922
if: startsWith(inputs.version, '3.1')
910923
uses: actions/checkout@v4
924+
with:
925+
repository: fluent/fluent-bit-docs
926+
ref: 3.1
927+
token: ${{ secrets.GH_PA_TOKEN }}
928+
929+
- name: Release 3.2 and latest
930+
if: startsWith(inputs.version, '3.2')
931+
uses: actions/checkout@v4
911932
with:
912933
repository: fluent/fluent-bit-docs
913934
token: ${{ secrets.GH_PA_TOKEN }}
@@ -935,7 +956,7 @@ jobs:
935956

936957
- name: Raise docs PR
937958
id: cpr
938-
uses: peter-evans/create-pull-request@v6
959+
uses: peter-evans/create-pull-request@v7
939960
with:
940961
commit-message: 'release: update to v${{ inputs.version }}'
941962
signoff: true
@@ -984,15 +1005,23 @@ jobs:
9841005
with:
9851006
ref: 2.2
9861007

987-
- name: Release 3.0 not latest
1008+
- name: Release 3.0
9881009
if: startsWith(inputs.version, '3.0')
9891010
uses: actions/checkout@v4
9901011
with:
9911012
ref: 3.0
9921013

993-
- name: Release 3.1 latest
1014+
- name: Release 3.1
9941015
if: startsWith(inputs.version, '3.1')
9951016
uses: actions/checkout@v4
1017+
with:
1018+
ref: 3.1
1019+
1020+
- name: Release 3.2
1021+
if: startsWith(inputs.version, '3.2')
1022+
uses: actions/checkout@v4
1023+
with:
1024+
ref: master
9961025

9971026
# Get the new version to use
9981027
- name: 'Get next minor version'
@@ -1011,7 +1040,7 @@ jobs:
10111040

10121041
- name: Raise FB PR to update version
10131042
id: cpr
1014-
uses: peter-evans/create-pull-request@v6
1043+
uses: peter-evans/create-pull-request@v7
10151044
with:
10161045
commit-message: 'release: update to ${{ steps.semvers.outputs.patch }}'
10171046
signoff: true

.github/workflows/unit-tests.yaml

Lines changed: 112 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
- "-DFLB_COVERAGE=On"
4343
- "-DFLB_SANITIZE_MEMORY=On"
4444
- "-DFLB_SANITIZE_THREAD=On"
45+
- "-DFLB_SIMD=On"
46+
- "-DFLB_SIMD=Off"
4547
compiler:
4648
- gcc
4749
- clang
@@ -54,7 +56,7 @@ jobs:
5456
- name: Setup environment
5557
run: |
5658
sudo apt-get update
57-
sudo apt-get install -y gcc-7 g++-7 clang-6.0 libsystemd-dev gcovr libyaml-dev
59+
sudo apt-get install -y gcc-7 g++-7 clang-6.0 libsystemd-dev gcovr libyaml-dev libbpf-dev linux-tools-common
5860
sudo ln -s /usr/bin/llvm-symbolizer-6.0 /usr/bin/llvm-symbolizer || true
5961
6062
- uses: actions/checkout@v4
@@ -110,6 +112,113 @@ jobs:
110112
CXX: g++
111113
FLB_OPT: ${{ matrix.flb_option }}
112114

115+
run-aarch64-unit-tests:
116+
# Ensure for OSS Fluent Bit repo we enable usage of Actuated runners for ARM builds, for forks it should keep existing ubuntu-latest usage.
117+
runs-on: ${{(github.repository == 'fluent/fluent-bit') && 'actuated-arm64-8cpu-16gb' || 'ubuntu-latest' }}
118+
permissions:
119+
contents: read
120+
# We chain this after Linux one as there are costs for actuated workers
121+
needs:
122+
- run-ubuntu-unit-tests
123+
timeout-minutes: 10
124+
strategy:
125+
fail-fast: false
126+
matrix:
127+
config:
128+
- name: "Aarch64 actuated testing"
129+
flb_option: "-DFLB_WITHOUT_flb-it-network=1 -DFLB_WITHOUT_flb-it-fstore=1"
130+
omit_option: ""
131+
global_option: "-DFLB_BACKTRACE=Off -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off"
132+
unit_test_option: "-DFLB_TESTS_INTERNAL=On"
133+
compiler: gcc
134+
steps:
135+
- name: Checkout Fluent Bit code
136+
uses: actions/checkout@v4
137+
138+
- name: Set up Actuated mirror
139+
if: github.repository == 'fluent/fluent-bit'
140+
uses: self-actuated/hub-mirror@master
141+
142+
- name: Setup environment
143+
run: |
144+
sudo apt-get update
145+
sudo apt-get install -y gcc-9 g++-9 clang-12 cmake flex bison libsystemd-dev gcovr libyaml-dev libbpf-dev linux-tools-common
146+
sudo ln -s /usr/bin/llvm-symbolizer-12 /usr/bin/llvm-symbolizer || true
147+
148+
- name: Build and test with actuated runners
149+
run: |
150+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
151+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
152+
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 90
153+
154+
export nparallel=$(( $(getconf _NPROCESSORS_ONLN) > 8 ? 8 : $(getconf _NPROCESSORS_ONLN) ))
155+
export FLB_OPTION="${{ matrix.config.flb_option }}"
156+
export FLB_OMIT_OPTION="${{ matrix.config.omit_option }}"
157+
export GLOBAL_OPTION="${{ matrix.config.global_option }}"
158+
export FLB_UNIT_TEST_OPTION="${{ matrix.config.unit_test_option }}"
159+
export FLB_OPT="${FLB_OPTION} ${GLOBAL_OPTION} ${FLB_UNIT_TEST_OPTION} ${FLB_OMIT_OPTION}"
160+
161+
echo "CC = ${{ matrix.config.compiler }}, CXX = ${{ matrix.config.compiler }}, FLB_OPT = $FLB_OPT"
162+
163+
cmake ${FLB_OPT} ../
164+
make -j $nparallel
165+
ctest -j $nparallel --build-run-dir . --output-on-failure
166+
working-directory: build
167+
env:
168+
CC: ${{ matrix.config.compiler }}
169+
CXX: ${{ matrix.config.compiler }}
170+
171+
run-qemu-ubuntu-unit-tests:
172+
# We chain this after Linux one as there are CPU time costs for QEMU emulation
173+
needs:
174+
- run-ubuntu-unit-tests
175+
runs-on: ubuntu-20.04
176+
timeout-minutes: 60
177+
strategy:
178+
fail-fast: false
179+
matrix:
180+
arch:
181+
- s390x
182+
steps:
183+
- name: Checkout Fluent Bit code
184+
uses: actions/checkout@v4
185+
186+
- name: Prepare and build with QEMU ${{ matrix.arch }}
187+
uses: uraimo/run-on-arch-action@v2
188+
id: build-and-test-on-qemu
189+
with:
190+
arch: ${{ matrix.arch }}
191+
distro: ubuntu20.04
192+
shell: /bin/bash
193+
dockerRunArgs: |
194+
--volume "/var/lib/dbus/machine-id:/var/lib/dbus/machine-id"
195+
--volume "/etc/machine-id:/etc/machine-id"
196+
install: |
197+
apt-get update
198+
apt-get install -y gcc-7 g++-7 clang-6.0 libyaml-dev cmake flex bison libssl-dev libbpf-dev linux-tools-common#libsystemd-dev
199+
ln -s /usr/bin/llvm-symbolizer-6.0 /usr/bin/llvm-symbolizer || true
200+
201+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 90
202+
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90
203+
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 90
204+
run: |
205+
cd build
206+
export nparallel=$(( $(getconf _NPROCESSORS_ONLN) > 8 ? 8 : $(getconf _NPROCESSORS_ONLN) ))
207+
export FLB_OPTION="-DFLB_WITHOUT_flb-it-network=1 -DFLB_WITHOUT_flb-it-fstore=1"
208+
export FLB_OMIT_OPTION=""
209+
export GLOBAL_OPTION="-DFLB_BACKTRACE=Off -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off"
210+
export FLB_UNIT_TEST_OPTION="-DFLB_TESTS_INTERNAL=On"
211+
export FLB_OPT="${FLB_OPTION} ${GLOBAL_OPTION} ${FLB_UNIT_TEST_OPTION} ${FLB_OMIT_OPTION}"
212+
export CC=gcc
213+
export CXX=gcc
214+
215+
echo "CC = $CC, CXX = $CXX, FLB_OPT = $FLB_OPT"
216+
217+
cmake ${FLB_OPT} ../
218+
make -j $nparallel
219+
ctest -j $nparallel --build-run-dir . --output-on-failure
220+
221+
113222
# Required check looks at this so do not remove
114223
run-all-unit-tests:
115224
if: always()
@@ -120,6 +229,8 @@ jobs:
120229
needs:
121230
- run-macos-unit-tests
122231
- run-ubuntu-unit-tests
232+
- run-aarch64-unit-tests
233+
- run-qemu-ubuntu-unit-tests
123234
steps:
124235
- name: Check build matrix status
125236
# Ignore MacOS failures

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ workflow/
2828
*.key
2929
*.log
3030
*.tar.gz
31-
31+
*.o
3232
# clangd files
3333
.cache/
3434
compile_commands.json
@@ -40,4 +40,4 @@ workflow/
4040
# examples
4141
examples/wasi_serde_json/target/
4242
# WASM test data
43-
tests/runtime/wasm/go/*.wasm
43+
tests/runtime/wasm/go/*.wasm

0 commit comments

Comments
 (0)