Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 4 additions & 76 deletions .github/workflows/container-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,82 +153,10 @@ jobs:

libs-tests:
needs: [build-linux]
runs-on: ubuntu-22.04
steps:
- name: Install deps ⛓️
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
build-essential \
clang-14 llvm-14 \
git \
clang \
llvm \
pkg-config \
autoconf \
automake \
libtool \
libelf-dev \
wget \
libbpf-dev \
libcap-dev \
libtbb-dev \
libjq-dev \
libjsoncpp-dev \
libgtest-dev \
libprotobuf-dev \
protobuf-compiler \
"linux-headers-$(uname -r)"
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 90
sudo update-alternatives --install /usr/bin/llvm-strip llvm-strip /usr/bin/llvm-strip-14 90
sudo update-alternatives --install /usr/bin/llc llc /usr/bin/llc-14 90

- name: Checkout libs
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
submodules: 'recursive'
repository: "falcosecurity/libs"

- name: Install deps
run: sudo .github/install-deps.sh

- name: Build e2e tests 🏗️🧪
env:
# This avoids random failures on CI.
# (https://github.com/google/sanitizers/issues/1322#issuecomment-699946942)
ASAN_OPTIONS: intercept_tls_get_addr=0
run: |
mkdir -p build && cd build
cmake -DBUILD_BPF=ON \
-DBUILD_LIBSCAP_MODERN_BPF=ON \
-DBUILD_LIBSCAP_GVISOR=OFF \
-DENABLE_E2E_TESTS=ON \
-DUSE_BUNDLED_DEPS=OFF \
-DUSE_BUNDLED_LIBBPF=ON \
..
make -j$(nproc) sinsp-example driver bpf container_plugin
sudo -E make e2e-install-deps

- name: Download library overriding built library
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: libcontainer-amd64
path: build/test/e2e/container_plugin-prefix/src/container_plugin/

- name: Run e2e tests
run: |
cd build
sudo -E ../test/e2e/scripts/run_tests.sh

- name: Archive test reports
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: always()
with:
name: libs_e2e_report
path: |
/tmp/report/
uses: falcosecurity/libs/.github/workflows/reusable_e2e_tests.yaml@master
with:
container_plugin_artifact_name: 'libcontainer-amd64'
secrets: inherit

formatting-check:
runs-on: ubuntu-24.04
Expand Down
2 changes: 1 addition & 1 deletion plugins/container/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
# project metadata
project(
container
VERSION 0.2.1
VERSION 0.2.2
DESCRIPTION "Falco container metadata enrichment Plugin"
LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion plugins/container/go-worker/worker_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func StopWorker(pCtx unsafe.Pointer) {

//export AskForContainerInfo
func AskForContainerInfo(containerId *C.cchar_t) {
containerID := ptr.GoString(unsafe.Pointer(containerId))
containerID := C.GoString(containerId)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a BIG fix.

ch := container.GetFetcherChan()
if ch != nil {
ch <- containerID
Expand Down
Loading