Feat: Add "Plugin Crash" to messages logged when plugins crash to improve error observability. #1923
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2020 Google LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: Test | |
on: | |
pull_request: | |
branches: | |
- main | |
- 'envoy-release/**' | |
- 'istio-release/**' | |
push: | |
branches: | |
- main | |
- 'envoy-release/**' | |
- 'istio-release/**' | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
test_data: | |
name: build test data | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set cache name | |
id: vars | |
# The cache tag consists of the following parts: | |
# * test-deps-bazel-cache- prefix | |
# * hash of WORKSPACE, .bazelrc, and .bazelversion, which is | |
# purely to differentiate caches for substantial changes in bazel. | |
# * github.sha, which is the commit hash of the commit used to generate | |
# the cache entry. | |
run: echo "CACHE_TAG=test-deps-bazel-cache-${{ hashFiles('WORKSPACE', '.bazelrc', '.bazelversion') }}" >> "$GITHUB_OUTPUT" | |
- name: bazel cache | |
uses: actions/cache/restore@v3 | |
with: | |
path: /tmp/bazel/cache | |
key: ${{ steps.vars.outputs.CACHE_TAG }}-${{ github.sha }} | |
restore-keys: | | |
${{ steps.vars.outputs.CACHE_TAG }}-${{ github.sha }} | |
${{ steps.vars.outputs.CACHE_TAG }}- | |
test-deps-bazel-cache-${{ matrix.name }}- | |
test-deps-bazel-cache- | |
- name: Bazel build | |
run: > | |
bazel build | |
--verbose_failures | |
--test_output=errors | |
--config=clang | |
--disk_cache /tmp/bazel/cache | |
-c opt | |
$(bazel query 'kind(was.*_rust_binary, //test/test_data/...)') | |
$(bazel query 'kind(_optimized_wasm_cc_binary, //test/test_data/...)') | |
# Currently, in Github Action, "Bazel build step" creates `wasm_canary_check.wasm` directory as a temporal directory. | |
# Since the name of this directory has "*.wasm" pattern, the step "Mangle build rules to use existing test data" fails. | |
# So, here, we clear out the directories in test_data. | |
- name: Clean up test data | |
shell: bash | |
run: | | |
# Remove temporal directories | |
for i in $(find bazel-bin/test/test_data/ -mindepth 1 -maxdepth 1 -type d); do \ | |
rm -rf $i; \ | |
done | |
- name: Upload test data | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test_data | |
path: bazel-bin/test/test_data/*.wasm | |
if-no-files-found: error | |
retention-days: 3 | |
- name: save bazel cache | |
uses: actions/cache/save@v3 | |
if: always() | |
with: | |
path: /tmp/bazel/cache | |
key: ${{ steps.vars.outputs.CACHE_TAG }}-${{ github.sha }} | |
build: | |
name: ${{ matrix.action }} with ${{ matrix.name }} | |
needs: test_data | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: 'NullVM on Linux/x86_64' | |
engine: 'null' | |
os: ubuntu-24.04 | |
arch: x86_64 | |
action: test | |
flags: --config=gcc | |
- name: 'NullVM on Linux/x86_64 with ASan' | |
engine: 'null' | |
os: ubuntu-24.04 | |
arch: x86_64 | |
action: test | |
flags: --config=clang-asan --define=crypto=system | |
- name: 'NullVM on Linux/x86_64 with TSan' | |
engine: 'null' | |
os: ubuntu-24.04 | |
arch: x86_64 | |
action: test | |
flags: --config=clang-tsan | |
- name: 'NullVM on Windows/x86_64' | |
engine: 'null' | |
os: windows-2022 | |
arch: x86_64 | |
action: test | |
targets: -//test/fuzz/... | |
- name: 'V8 on Linux/x86_64' | |
engine: 'v8' | |
repo: 'v8' | |
os: ubuntu-24.04 | |
arch: x86_64 | |
action: test | |
flags: --config=hermetic-llvm --define=crypto=system | |
cache: true | |
- name: 'V8 on Linux/x86_64 with ASan' | |
engine: 'v8' | |
repo: 'v8' | |
os: ubuntu-24.04 | |
arch: x86_64 | |
action: test | |
flags: --config=hermetic-llvm --config=clang-asan | |
cache: true | |
- name: 'V8 on Linux/x86_64 with TSan' | |
engine: 'v8' | |
repo: 'v8' | |
os: ubuntu-24.04 | |
arch: x86_64 | |
action: test | |
flags: --config=hermetic-llvm --config=clang-tsan | |
cache: true | |
- name: 'V8 on Linux/x86_64 with GCC' | |
engine: 'v8' | |
repo: 'v8' | |
os: ubuntu-24.04 | |
arch: x86_64 | |
action: test | |
flags: --config=gcc | |
cache: true | |
- name: 'V8 on Linux/aarch64' | |
engine: 'v8' | |
repo: 'v8' | |
os: ubuntu-24.04-arm | |
arch: aarch64 | |
action: test | |
targets: -//test/fuzz/... | |
flags: --config=hermetic-llvm --@v8//bazel/config:v8_target_cpu=arm64 | |
cache: true | |
- name: 'V8 on macOS/x86_64' | |
engine: 'v8' | |
repo: 'v8' | |
os: macos-13 | |
arch: x86_64 | |
action: test | |
flags: --config=hermetic-llvm-macos | |
cache: true | |
- name: 'WAMR interp on Linux/x86_64' | |
engine: 'wamr-interp' | |
repo: 'com_github_bytecodealliance_wasm_micro_runtime' | |
os: ubuntu-24.04 | |
arch: x86_64 | |
action: test | |
flags: --config=clang | |
- name: 'WAMR interp on macOS/x86_64' | |
engine: 'wamr-interp' | |
repo: 'com_github_bytecodealliance_wasm_micro_runtime' | |
os: macos-13 | |
arch: x86_64 | |
action: test | |
- name: 'WAMR jit on Linux/x86_64' | |
engine: 'wamr-jit' | |
repo: 'com_github_bytecodealliance_wasm_micro_runtime' | |
os: ubuntu-24.04 | |
arch: x86_64 | |
action: test | |
flags: --config=clang | |
deps: lld-18 | |
cache: true | |
- name: 'WAMR jit on macOS/x86_64' | |
engine: 'wamr-jit' | |
repo: 'com_github_bytecodealliance_wasm_micro_runtime' | |
os: macos-13 | |
arch: x86_64 | |
action: test | |
cache: true | |
- name: 'WasmEdge on Linux/x86_64' | |
engine: 'wasmedge' | |
repo: 'com_github_wasmedge_wasmedge' | |
os: ubuntu-24.04 | |
arch: x86_64 | |
action: test | |
flags: --config=clang | |
- name: 'WasmEdge on macOS/x86_64' | |
engine: 'wasmedge' | |
repo: 'com_github_wasmedge_wasmedge' | |
os: macos-13 | |
arch: x86_64 | |
action: test | |
- name: 'Wasmtime on Linux/x86_64' | |
engine: 'wasmtime' | |
repo: 'com_github_bytecodealliance_wasmtime' | |
os: ubuntu-24.04 | |
arch: x86_64 | |
action: test | |
flags: --config=clang -c opt | |
- name: 'Wasmtime on Linux/x86_64 with ASan' | |
engine: 'wasmtime' | |
repo: 'com_github_bytecodealliance_wasmtime' | |
os: ubuntu-24.04 | |
arch: x86_64 | |
action: test | |
flags: --config=clang-asan --define=crypto=system | |
- name: 'Wasmtime on Linux/aarch64' | |
engine: 'wasmtime' | |
repo: 'com_github_bytecodealliance_wasmtime' | |
os: ubuntu-24.04-arm | |
arch: aarch64 | |
action: build | |
flags: --config=hermetic-llvm | |
- name: 'Wasmtime on Linux/s390x' | |
engine: 'wasmtime' | |
repo: 'com_github_bytecodealliance_wasmtime' | |
os: ubuntu-24.04 | |
arch: s390x | |
action: test | |
flags: --config=clang --test_timeout=1800 | |
# s390x build-tools image built from bazel/external/Dockerfile.bazel | |
run_under: docker run --rm --env HOME=$HOME --env USER=$(id -un) --volume "$HOME:$HOME" --workdir $(pwd) --user $(id -u):$(id -g) --platform linux/s390x ghcr.io/proxy-wasm/build-tools:ubuntu-22.04-bazel-6.5.0 | |
cache: true | |
- name: 'Wasmtime on macOS/x86_64' | |
engine: 'wasmtime' | |
repo: 'com_github_bytecodealliance_wasmtime' | |
os: macos-13 | |
arch: x86_64 | |
action: test | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies (Linux) | |
if: ${{ matrix.deps != '' && startsWith(matrix.os, 'ubuntu') }} | |
run: sudo apt update -y && sudo apt install -y ${{ matrix.deps }} | |
# Needed for s390x test which runs on a GHCR Docker Ubuntu image. | |
- name: Login to GitHub Container Registry | |
if: startsWith(matrix.run_under, 'docker') | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Activate Docker/QEMU | |
if: startsWith(matrix.run_under, 'docker') | |
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | |
- name: set cache name | |
id: vars | |
# The cache tag consists of the following parts: | |
# * bazel-cache- prefix | |
# * matrix.name, which separates the cache for each build type. | |
# * hash of WORKSPACE, .bazelrc, and .bazelversion, which is | |
# purely to differentiate caches for substantial changes in bazel. | |
# * github.sha, which is the commit hash of the commit used to generate | |
# the cache entry. | |
run: echo "CACHE_TAG=bazel-cache-${{ matrix.name }}-${{ hashFiles('WORKSPACE', '.bazelrc', '.bazelversion') }}" >> "$GITHUB_OUTPUT" | |
- name: bazel cache | |
uses: actions/cache/restore@v3 | |
with: | |
path: /tmp/bazel/cache | |
key: ${{ steps.vars.outputs.CACHE_TAG }}-${{ github.sha }} | |
restore-keys: | | |
${{ steps.vars.outputs.CACHE_TAG }}-${{ github.sha }} | |
${{ steps.vars.outputs.CACHE_TAG }}- | |
bazel-cache-${{ matrix.name }}- | |
bazel-cache- | |
- name: Download test data | |
uses: actions/download-artifact@v4 | |
with: | |
name: test_data | |
path: test/test_data/ | |
- name: Mangle build rules to use existing test data | |
shell: bash | |
run: | | |
sed 's/\.wasm//g' test/BUILD > test/BUILD.tmp && mv test/BUILD.tmp test/BUILD | |
echo "package(default_visibility = [\"//visibility:public\"])" > test/test_data/BUILD | |
for i in $(cd test/test_data && ls -1 *.wasm | sed 's/\.wasm$//g'); do \ | |
echo "filegroup(name = \"$i\", srcs = [\"$i.wasm\"])" >> test/test_data/BUILD; \ | |
done | |
- name: Bazel build/test | |
shell: bash | |
run: > | |
${{ matrix.run_under }} | |
bazel ${{ matrix.action }} | |
--verbose_failures | |
--test_output=errors | |
--define engine=${{ matrix.engine }} | |
--disk_cache /tmp/bazel/cache | |
${{ matrix.flags }} | |
-- //test/... ${{ matrix.targets }} | |
- name: Bazel build/test (signed Wasm module) | |
if: ${{ matrix.engine != 'null' && !startsWith(matrix.os, 'windows') }} | |
run: > | |
${{ matrix.run_under }} | |
bazel ${{ matrix.action }} | |
--verbose_failures | |
--test_output=errors | |
--define engine=${{ matrix.engine }} | |
--disk_cache /tmp/bazel/cache | |
${{ matrix.flags }} | |
--per_file_copt=src/signature_util.cc,test/signature_util_test.cc@-DPROXY_WASM_VERIFY_WITH_ED25519_PUBKEY=\"$(xxd -p -c 256 test/test_data/signature_key1.pub | cut -b9-)\" | |
//test:signature_util_test | |
- name: save bazel cache | |
uses: actions/cache/save@v3 | |
if: always() | |
with: | |
path: /tmp/bazel/cache | |
key: ${{ steps.vars.outputs.CACHE_TAG }}-${{ github.sha }} | |