Skip to content

Conversation

FedeDP
Copy link
Contributor

@FedeDP FedeDP commented May 5, 2025

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area CI

/area tests

Does this PR require a change in the driver versions?

What this PR does / why we need it:

This PR enables e2e tests (the python ones) to run through podman socket too.
This allows us to test container plugin with both docker and podman.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Keeping it wip since i am testing the CI by triggering it over and over :D

Does this PR introduce a user-facing change?:

NONE

@@ -295,9 +294,6 @@ jobs:
libprotobuf-dev \
protobuf-compiler \
"linux-headers-$(uname -r)"
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 90
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ported CI to use standard clang and llvm present in the ubuntu-24.04 runner image.

@@ -268,15 +268,14 @@ jobs:
cmake_opts: -DUSE_BUNDLED_DEPS=True
- name: asan
cmake_opts: -DUSE_BUNDLED_DEPS=True -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need newer version of podman.

Copy link

github-actions bot commented May 5, 2025

Perf diff from master - unit tests

     1.94%     -0.98%  [.] libsinsp::sinsp_suppress::process_event
     6.33%     +0.37%  [.] sinsp::next
     2.67%     +0.34%  [.] gzfile_read
    35.04%     -0.31%  [.] sinsp_thread_manager::create_thread_dependencies
     5.43%     -0.29%  [.] sinsp_evt::get_type
     0.51%     +0.26%  [.] sinsp_evt::get_ts
     2.16%     +0.26%  [.] sinsp_evt::load_params
     1.42%     +0.22%  [.] sinsp_parser::process_event
     1.05%     -0.21%  [.] sinsp_parser::event_cleanup
     0.21%     +0.20%  [.] scap_file_test::assert_num_event_type

Heap diff from master - unit tests

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Heap diff from master - scap file

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Benchmarks diff from master

Comparing gbench_data.json to /root/actions-runner/_work/libs/libs/build/gbench_data.json
Benchmark                                                         Time             CPU      Time Old      Time New       CPU Old       CPU New
----------------------------------------------------------------------------------------------------------------------------------------------
BM_sinsp_split_mean                                            +0.0140         +0.0141           149           152           149           152
BM_sinsp_split_median                                          +0.0078         +0.0078           150           151           150           151
BM_sinsp_split_stddev                                          +2.4129         +2.4141             1             3             1             3
BM_sinsp_split_cv                                              +2.3659         +2.3667             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.0649         +0.0650            56            60            56            60
BM_sinsp_concatenate_paths_relative_path_median                +0.0880         +0.0881            56            61            56            61
BM_sinsp_concatenate_paths_relative_path_stddev               +11.0832        +11.0825             0             2             0             2
BM_sinsp_concatenate_paths_relative_path_cv                   +10.3473        +10.3455             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     +0.0374         +0.0376            24            25            24            25
BM_sinsp_concatenate_paths_empty_path_median                   +0.0338         +0.0339            24            24            24            24
BM_sinsp_concatenate_paths_empty_path_stddev                   +4.0257         +4.0321             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +3.8443         +3.8500             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.1462         +0.1463            56            65            56            65
BM_sinsp_concatenate_paths_absolute_path_median                +0.1422         +0.1423            56            64            56            64
BM_sinsp_concatenate_paths_absolute_path_stddev                +2.0904         +2.0900             0             1             0             1
BM_sinsp_concatenate_paths_absolute_path_cv                    +1.6963         +1.6957             0             0             0             0

Copy link

codecov bot commented May 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.18%. Comparing base (2510a2c) to head (535e679).
Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2386      +/-   ##
==========================================
+ Coverage   77.15%   77.18%   +0.02%     
==========================================
  Files         231      231              
  Lines       30347    30357      +10     
  Branches     4656     4658       +2     
==========================================
+ Hits        23415    23430      +15     
+ Misses       6932     6927       -5     
Flag Coverage Δ
libsinsp 77.18% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
@FedeDP FedeDP force-pushed the new/e2e_tests_podman branch from 1267651 to 1dc4c50 Compare May 5, 2025 13:44
@poiana poiana added size/L and removed size/M labels May 5, 2025
@FedeDP FedeDP force-pushed the new/e2e_tests_podman branch from 04541d7 to 97cc497 Compare May 5, 2025 14:19
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also took my time and added a new reusable_workflow for e2e tests; it is useful because we will use it in container's plugin CI: https://github.com/falcosecurity/plugins/blob/main/.github/workflows/container-ci.yaml#L154

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
@FedeDP FedeDP force-pushed the new/e2e_tests_podman branch 3 times, most recently from 0adb26f to a23c370 Compare May 5, 2025 15:14
run: |
sudo rm -rf /tmp/report
# Force podman to run with runc by removing crun
sudo apt remove -y crun
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We enforce running podman with runc so that test_exec_in_container test is still valid since it expects a runc related event.

Copy link
Contributor

Choose a reason for hiding this comment

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

We could make some changes to the tests to try and figure out if they are running with podman or docker, but meh.

Copy link
Contributor

@Molter73 Molter73 left a comment

Choose a reason for hiding this comment

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

Neat! Just left a few comments.

run: |
sudo rm -rf /tmp/report
# Force podman to run with runc by removing crun
sudo apt remove -y crun
Copy link
Contributor

Choose a reason for hiding this comment

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

We could make some changes to the tests to try and figure out if they are running with podman or docker, but meh.

@FedeDP FedeDP force-pushed the new/e2e_tests_podman branch 2 times, most recently from f1652c5 to 7369db0 Compare May 5, 2025 15:52
FedeDP added 3 commits May 6, 2025 10:14
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
@FedeDP FedeDP force-pushed the new/e2e_tests_podman branch from 4d02de4 to 86207cc Compare May 6, 2025 08:14
@FedeDP FedeDP changed the title wip: new(ci): run e2e tests with podman socket too. new(ci): run e2e tests with podman socket too. May 6, 2025
@FedeDP
Copy link
Contributor Author

FedeDP commented May 6, 2025

/milestone 0.21.0

@poiana poiana added this to the 0.21.0 milestone May 6, 2025
They allow to disable test for podman or docker.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
@FedeDP FedeDP force-pushed the new/e2e_tests_podman branch from 4e302e4 to 535e679 Compare May 6, 2025 08:28
Copy link
Contributor

@Molter73 Molter73 left a comment

Choose a reason for hiding this comment

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

/lgtm

@poiana
Copy link
Contributor

poiana commented May 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP, Molter73

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-project-automation github-project-automation bot moved this from Todo to In progress in Falco Roadmap May 6, 2025
@poiana poiana merged commit b1b30d3 into master May 6, 2025
47 checks passed
@poiana poiana deleted the new/e2e_tests_podman branch May 6, 2025 10:14
@github-project-automation github-project-automation bot moved this from In progress to Done in Falco Roadmap May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants