Skip to content

fix: fix %TRACE_ID% substitution formatter in response body #103083

fix: fix %TRACE_ID% substitution formatter in response body

fix: fix %TRACE_ID% substitution formatter in response body #103083

Workflow file for this run

name: CodeQL/push
permissions:
contents: read
on:
push:
paths:
- include/**
- source/common/**
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.head_ref || github.run_id }}-${{ github.workflow }}
cancel-in-progress: true
env:
SEARCH_FOLDER: //source/common/...
jobs:
CodeQL-Build:
permissions:
actions: read
contents: read
# for github/codeql-action/analyze to upload SARIF results
security-events: write
pull-requests: read
runs-on: ubuntu-22.04
if: github.repository == 'envoyproxy/envoy'
steps:
- uses: envoyproxy/toolshed/actions/bind-mounts@8d5d8d4b9eeb5e4e76b92341b0b1b1f6438af231 # v0.4.5
if: |
! github.event.repository.private
with:
mounts: |
- src: /mnt/workspace
target: GITHUB_WORKSPACE
chown: "runner:runner"
- src: /mnt/runner-cache
target: /home/runner/.cache
chown: "runner:runner"
- name: Free disk space
if: |
env.BUILD_TARGETS != ''
&& github.event.repository.private
uses: envoyproxy/toolshed/actions/diskspace@8d5d8d4b9eeb5e4e76b92341b0b1b1f6438af231 # v0.4.5
with:
to_remove: |
/usr/local/.ghcup
/usr/local/lib/android
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 2
- name: Get build targets
run: |
# TODO(phlax): Shift this to an action
compare_head () {
while IFS= read -r line; do
if [[ -n "$line" ]]; then
bazel query "rdeps($SEARCH_FOLDER, $line, 1)" 2> /dev/null
fi
done < <(git diff --name-only HEAD "${1}" -- source/* include/*)
}
if [[ "$GIT_EVENT" == "pull_request" ]]; then
git fetch "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" main 2> /dev/null
TO_OTHER=FETCH_HEAD
else
TO_OTHER=HEAD^1
fi
BUILD_TARGETS="$(compare_head "$TO_OTHER" | grep -v '\.cc\|\.h' | sort -u | head -n 3)"
echo 'BUILD_TARGETS<<EOF' >> $GITHUB_ENV
echo "$BUILD_TARGETS" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
env:
GIT_EVENT: ${{ github.event_name }}
- name: Set default build target
if: ${{ env.BUILD_TARGETS == '' }}
run: |
echo "MINIMAL_BUILD_TARGET=//source/common/common:assert_lib" > $GITHUB_ENV
- name: Initialize CodeQL
uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # codeql-bundle-v4.32.4
with:
languages: cpp
trap-caching: false
- name: Install deps
shell: bash
run: |
sudo apt-get -qq update --error-on=any
sudo apt-get -qq install --yes \
libtool libtinfo5 automake autoconf curl unzip
# Note: the llvm/clang version should match the version specifed in:
# - bazel/repository_locations.bzl
# - .github/workflows/codeql-daily.yml
# - https://github.com/envoyproxy/envoy-build-tools/blob/main/build_container/build_container_ubuntu.sh#L84
mkdir -p bin/clang18.1.8
cd bin/clang18.1.8
wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz
tar -xf clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz --strip-components 1
- name: Build
run: |
bazel shutdown
bazel build \
-c fastbuild \
--repo_env=BAZEL_LLVM_PATH="$(realpath bin/clang18.1.8)" \
--spawn_strategy=local \
--discard_analysis_cache \
--nouse_action_cache \
--features="-layering_check" \
--config=clang \
--config=ci \
${BUILD_TARGETS:-${MINIMAL_BUILD_TARGET}}
echo -e "Built targets...\n${BUILD_TARGETS:-${MINIMAL_BUILD_TARGET}}"
- name: Clean Artifacts
run: |
git clean -xdf
- name: Perform CodeQL Analysis
# if: ${{ env.BUILD_TARGETS != '' }}
uses: github/codeql-action/analyze@89a39a4e59826350b863aa6b6252a07ad50cf83e # codeql-bundle-v4.32.4