Skip to content

Commit

Permalink
Merge branch 'fluent:master' into fix/timeout-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmaya-panda1 authored Jun 28, 2024
2 parents a5d9ee2 + 13f96f9 commit a1c8dd5
Show file tree
Hide file tree
Showing 1,491 changed files with 255,940 additions and 105,161 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-legacy-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Build the legacy x86_64 debug image
if: matrix.arch == 'amd64'
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
file: ./Dockerfile.x86_64.debug
context: .
Expand All @@ -102,7 +102,7 @@ jobs:
raw,${{ matrix.suffix }}-${{ inputs.ref }}
- name: Build the legacy ${{ matrix.arch }} image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
file: ./Dockerfile.${{ matrix.suffix }}
context: .
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/call-build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
- name: Build the production images
id: build_push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
file: ./dockerfiles/Dockerfile
context: .
Expand All @@ -141,7 +141,7 @@ jobs:
- name: Build the debug multi-arch images
id: debug_build_push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
file: ./dockerfiles/Dockerfile
context: .
Expand Down Expand Up @@ -314,7 +314,7 @@ jobs:
docker push ${{ inputs.registry }}/${{ inputs.image }}:windows-${{ matrix.windows-base-version }}-${{ inputs.version }}
# We cannot use this action as it requires privileged mode
# uses: docker/build-push-action@v5
# uses: docker/build-push-action@v6
# with:
# file: ./dockerfiles/Dockerfile.windows
# context: .
Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/call-build-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,21 @@ jobs:

call-build-macos-package:
if: needs.call-build-macos-legacy-check.outputs.build-type == 'modern'
runs-on: macos-latest
runs-on: ${{ matrix.config.runner }}
environment: ${{ inputs.environment }}
needs:
- call-build-macos-legacy-check
permissions:
contents: read
strategy:
fail-fast: false
matrix:
config:
- name: "Normal macOS-latest runner (Intel)"
runner: macos-12
- name: "Apple Silicon macOS runner"
runner: macos-14

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -92,7 +101,7 @@ jobs:
- name: Upload build packages
uses: actions/upload-artifact@v4
with:
name: macos-packages
name: macos-packages on ${{ matrix.config.runner }}
path: |
build/fluent-bit-*-apple*
build/fluent-bit-*-intel*
Expand All @@ -108,6 +117,15 @@ jobs:
- call-build-macos-package
permissions:
contents: read
strategy:
fail-fast: false
matrix:
config:
- name: "Normal macOS-latest package (Intel)"
os: macos-12
- name: "Apple Silicon macOS package"
os: macos-14

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -118,7 +136,7 @@ jobs:
continue-on-error: true
uses: actions/download-artifact@v4
with:
name: macos-packages
name: macos-packages on ${{ matrix.config.os }}
path: artifacts/

- name: Push MacOS packages to S3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/call-integration-image-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
raw,${{ inputs.image-tag }}
- name: Build the AMD64 image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
file: ./dockerfiles/Dockerfile
context: .
Expand All @@ -83,7 +83,7 @@ jobs:
raw,${{ inputs.image-tag }}-debug
- name: Build the AMD64 debug image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
file: ./dockerfiles/Dockerfile
context: .
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/call-run-integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,18 @@ jobs:
bats-version: 1.9.0

- name: Create k8s Kind Cluster
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
node_image: kindest/node:${{ matrix.k8s-release }}
cluster_name: kind

- name: Set up Helm
uses: azure/setup-helm@v3.5
uses: azure/setup-helm@v4
with:
version: v3.8.1

- name: Set up Kubectl
uses: azure/setup-kubectl@v3.2
uses: azure/setup-kubectl@v4

- name: Run tests
timeout-minutes: 60
Expand Down Expand Up @@ -255,12 +255,12 @@ jobs:
bats-version: 1.9.0

- name: Set up Helm
uses: azure/setup-helm@v3.5
uses: azure/setup-helm@v4
with:
version: v3.8.1

- name: Set up Kubectl
uses: azure/setup-kubectl@v3.2
uses: azure/setup-kubectl@v4

- name: Get the GKE Kubeconfig
if: matrix.cloud == 'gke'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/call-test-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ jobs:
ref: ${{ inputs.ref }}

- name: Create k8s Kind Cluster
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0

- name: Set up Helm
uses: azure/setup-helm@v3.5
uses: azure/setup-helm@v4
with:
version: v3.6.3

- name: Set up Kubectl
uses: azure/setup-kubectl@v3.2
uses: azure/setup-kubectl@v4

- name: Test the HTTP server is responding
timeout-minutes: 5
Expand Down
163 changes: 163 additions & 0 deletions .github/workflows/call-windows-unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
---
name: Reusable workflow to run unit tests on Windows packages (only for x86 and x64)

on:
workflow_call:
inputs:
version:
description: The version of Fluent Bit to create.
type: string
required: true
ref:
description: The commit, tag or branch of Fluent Bit to checkout for building that creates the version above.
type: string
required: true
environment:
description: The Github environment to run this workflow on.
type: string
required: false
unstable:
description: Optionally add metadata to build to indicate an unstable build, set to the contents you want to add.
type: string
required: false
default: ''
secrets:
token:
description: The Github token or similar to authenticate with.
required: true

jobs:
call-build-windows-unit-test:
runs-on: windows-latest
environment: ${{ inputs.environment }}
strategy:
fail-fast: false
matrix:
config:
- name: "Windows 32bit"
arch: x86
openssl_dir: C:\vcpkg\packages\openssl_x86-windows-static
cmake_additional_opt: ""
vcpkg_triplet: x86-windows-static
- name: "Windows 64bit"
arch: x64
openssl_dir: C:\vcpkg\packages\openssl_x64-windows-static
cmake_additional_opt: ""
vcpkg_triplet: x64-windows-static
permissions:
contents: read
# 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.
env:
PATH: C:\ProgramData\Chocolatey\bin;c:/Program Files/Git/cmd;c:/Windows/system32;C:/Windows/System32/WindowsPowerShell/v1.0;$ENV:WIX/bin;C:/Program Files/CMake/bin;C:\vcpkg;
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}

- name: Get dependencies
run: |
Invoke-WebRequest -OutFile winflexbison.zip $env:WINFLEXBISON
Expand-Archive winflexbison.zip -Destination C:\WinFlexBison
Copy-Item -Path C:\WinFlexBison/win_bison.exe C:\WinFlexBison/bison.exe
Copy-Item -Path C:\WinFlexBison/win_flex.exe C:\WinFlexBison/flex.exe
echo "C:\WinFlexBison" | Out-File -FilePath $env:GITHUB_PATH -Append
env:
WINFLEXBISON: https://github.com/lexxmark/winflexbison/releases/download/v2.5.22/win_flex_bison-2.5.22.zip
shell: pwsh

- name: Set up with Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.config.arch }}

- name: Get gzip command w/ chocolatey
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install gzip -y

# http://man7.org/linux/man-pages/man1/date.1.html
- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
shell: bash

- name: Restore cached packages of vcpkg
id: cache-unit-test-vcpkg-sources
uses: actions/cache/restore@v4
with:
path: |
C:\vcpkg\packages
key: ${{ runner.os }}-${{ matrix.config.arch }}-wintest-vcpkg-${{ steps.get-date.outputs.date }}
restore-keys: |
${{ runner.os }}-${{ matrix.config.arch }}-wintest-vcpkg-
enableCrossOsArchive: false

- name: Build openssl with vcpkg
run: |
C:\vcpkg\vcpkg install --recurse openssl --triplet ${{ matrix.config.vcpkg_triplet }}
shell: cmd

- name: Build libyaml with vcpkg
run: |
C:\vcpkg\vcpkg install --recurse libyaml --triplet ${{ matrix.config.vcpkg_triplet }}
shell: cmd

- name: Save packages of vcpkg
id: save-vcpkg-sources
uses: actions/cache/save@v4
with:
path: |
C:\vcpkg\packages
key: ${{ steps.cache-unit-test-vcpkg-sources.outputs.cache-primary-key }}
enableCrossOsArchive: false

- name: Build unit-test for Fluent Bit packages (only for x86 and x64)
run: |
cmake -G "NMake Makefiles" `
-D FLB_TESTS_INTERNAL=On `
-D FLB_NIGHTLY_BUILD='${{ inputs.unstable }}' `
-D OPENSSL_ROOT_DIR='${{ matrix.config.openssl_dir }}' `
${{ matrix.config.cmake_additional_opt }} `
-D FLB_LIBYAML_DIR=C:\vcpkg\packages\libyaml_${{ matrix.config.vcpkg_triplet }} `
-D FLB_WITHOUT_flb-rt-out_elasticsearch=On `
-D FLB_WITHOUT_flb-rt-out_td=On `
-D FLB_WITHOUT_flb-rt-out_forward=On `
-D FLB_WITHOUT_flb-rt-in_disk=On `
-D FLB_WITHOUT_flb-rt-in_proc=On `
-D FLB_WITHOUT_flb-it-parser=On `
-D FLB_WITHOUT_flb-it-unit_sizes=On `
-D FLB_WITHOUT_flb-it-network=On `
-D FLB_WITHOUT_flb-it-pack=On `
-D FLB_WITHOUT_flb-it-signv4=On `
-D FLB_WITHOUT_flb-it-aws_credentials=On `
-D FLB_WITHOUT_flb-it-aws_credentials_ec2=On `
-D FLB_WITHOUT_flb-it-aws_credentials_http=On `
-D FLB_WITHOUT_flb-it-aws_credentials_profile=On `
-D FLB_WITHOUT_flb-it-aws_credentials_sts=On `
-D FLB_WITHOUT_flb-it-aws_util=On `
-D FLB_WITHOUT_flb-it-input_chunk=On `
../
cmake --build .
shell: pwsh
working-directory: build

- name: Upload unit test binaries
uses: actions/upload-artifact@v4
with:
name: windows-unit-tests-${{ matrix.config.arch }}
path: |
build/**/*.exe
if-no-files-found: error

- name: Display dependencies w/ dumpbin
run: |
dumpbin /dependents .\bin\fluent-bit.exe
working-directory: build

- name: Build unit-test for Fluent Bit packages (only for x86 and x64)
run: |
ctest --build-run-dir "$PWD" --output-on-failure
shell: pwsh
working-directory: build
2 changes: 1 addition & 1 deletion .github/workflows/cron-scorecards-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534
with:
results_file: scorecard-results.sarif
results_format: sarif
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-compile-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Attempt to build current source for CentOS 7
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: ./dockerfiles/Dockerfile.centos7
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-image-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Build the multi-arch images
id: build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
file: ./dockerfiles/Dockerfile
context: .
Expand All @@ -55,7 +55,7 @@ jobs:
shell: bash

- name: Build the debug multi-arch images
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
file: ./dockerfiles/Dockerfile
context: .
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/pr-windows-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,14 @@ jobs:
environment: pr
secrets:
token: ${{ secrets.GITHUB_TOKEN }}

run-windows-unit-tests:
needs:
- pr-windows-build
uses: ./.github/workflows/call-windows-unit-tests.yaml
with:
version: ${{ github.sha }}
ref: ${{ github.sha }}
environment: pr
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit a1c8dd5

Please sign in to comment.