Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update(ci): bump zig to official 0.14.0 and drop caching #2300

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

FedeDP
Copy link
Contributor

@FedeDP FedeDP commented Mar 5, 2025

What type of PR is this?

/kind cleanup

Any specific area of the project related to this PR?

/area CI

Does this PR require a change in the driver versions?

What this PR does / why we need it:

Zig 0.14.0 has been released, we don't need to cache the version ourselves.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@poiana
Copy link
Contributor

poiana commented Mar 5, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP

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

@poiana poiana requested review from hbrueckner and LucaGuerra March 5, 2025 07:59
@poiana poiana added the approved label Mar 5, 2025
@FedeDP
Copy link
Contributor Author

FedeDP commented Mar 5, 2025

/hold

@FedeDP
Copy link
Contributor Author

FedeDP commented Mar 5, 2025

/milestone 0.21.0

@poiana poiana added this to the 0.21.0 milestone Mar 5, 2025
Copy link

github-actions bot commented Mar 5, 2025

Perf diff from master - unit tests

     5.62%     -0.31%  [.] sinsp_evt::get_type
     0.57%     +0.25%  [.] std::_Hashtable<long, std::pair<long const, std::shared_ptr<sinsp_threadinfo> >, std::allocator<std::pair<long const, std::shared_ptr<sinsp_threadinfo> > >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::find
     6.46%     +0.22%  [.] sinsp::next
     0.40%     +0.16%  [.] std::_Hashtable<conversion_key, std::pair<conversion_key const, conversion_info>, std::allocator<std::pair<conversion_key const, conversion_info> >, std::__detail::_Select1st, std::equal_to<conversion_key>, std::hash<conversion_key>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_find_before_node
     0.92%     +0.16%  [.] user_group_updater::~user_group_updater
     1.34%     +0.16%  [.] next
     0.60%     +0.15%  [.] libsinsp::events::is_unknown_event
     0.28%     +0.13%  [.] sinsp_fdtable::find
     9.21%     +0.12%  [.] sinsp_thread_manager::create_thread_dependencies
     5.96%     -0.12%  [.] sinsp_parser::reset

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.0532         -0.0532           151           143           151           143
BM_sinsp_split_median                                          -0.0564         -0.0564           152           143           152           143
BM_sinsp_split_stddev                                          -0.3945         -0.3941             2             1             2             1
BM_sinsp_split_cv                                              -0.3605         -0.3600             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  -0.0884         -0.0884            60            54            60            54
BM_sinsp_concatenate_paths_relative_path_median                -0.0977         -0.0977            60            54            60            54
BM_sinsp_concatenate_paths_relative_path_stddev                -0.6289         -0.6288             2             1             2             1
BM_sinsp_concatenate_paths_relative_path_cv                    -0.5929         -0.5928             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0160         -0.0160            25            25            25            25
BM_sinsp_concatenate_paths_empty_path_median                   -0.0175         -0.0175            25            24            25            24
BM_sinsp_concatenate_paths_empty_path_stddev                   +0.1705         +0.1707             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +0.1895         +0.1898             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  -0.1100         -0.1100            59            52            59            52
BM_sinsp_concatenate_paths_absolute_path_median                -0.1126         -0.1126            59            52            59            52
BM_sinsp_concatenate_paths_absolute_path_stddev                -0.4897         -0.4898             1             1             1             1
BM_sinsp_concatenate_paths_absolute_path_cv                    -0.4267         -0.4268             0             0             0             0

Copy link

codecov bot commented Mar 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.17%. Comparing base (9dc846f) to head (626d030).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2300   +/-   ##
=======================================
  Coverage   77.17%   77.17%           
=======================================
  Files         224      224           
  Lines       30133    30133           
  Branches     4600     4605    +5     
=======================================
  Hits        23256    23256           
  Misses       6877     6877           
Flag Coverage Δ
libsinsp 77.17% <ø> (ø)

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.

@FedeDP
Copy link
Contributor Author

FedeDP commented Mar 10, 2025

Testing locally, the CI passes only for debug builds. Investigating.
Seems like ziglang/zig#23052 could be the culprit.

@FedeDP
Copy link
Contributor Author

FedeDP commented Mar 10, 2025

Opened a tracking issue: ziglang/zig#23185 🙏 i found a workaround but i'll wait for upstream feedback before proposing it.

@FedeDP
Copy link
Contributor Author

FedeDP commented Mar 10, 2025

I found out the issue: we were building zlib without -O3 thus letting zig enable ubsan for us even for release builds.
Gonna fix it soon.

FedeDP added a commit to falcosecurity/falco that referenced this pull request Mar 10, 2025
Signed-off-by: Federico Di Pierro <[email protected]>
@poiana poiana added size/M and removed size/S labels Mar 10, 2025
FedeDP added a commit to falcosecurity/falco that referenced this pull request Mar 10, 2025
Signed-off-by: Federico Di Pierro <[email protected]>
@FedeDP
Copy link
Contributor Author

FedeDP commented Mar 10, 2025

Will unhold once falcosecurity/falco#3508 CI passes fine.

@@ -8,23 +8,11 @@ runs:
shell: bash
id: store
env:
ZIG_VERSION: '0.14.0-dev.3188+34644511b'
ZIG_VERSION: '0.14.0'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bump zig version and drop caching.

@@ -72,8 +72,8 @@ else()
URL_HASH "SHA256=e51cc8fc496f893e2a48beb417730ab6cbcb251142ad8b2cd1951faa5c76fe3d"
# TODO what if using system zlib?
CONFIGURE_COMMAND
CPPFLAGS=-I${ZLIB_INCLUDE} LDFLAGS=-L${ZLIB_SRC} ./configure
CXXFLAGS=${PROTOBUF_CXXFLAGS} --with-zlib ${PROTOBUF_CONFIGURE_FLAGS}
./configure CXXFLAGS=${PROTOBUF_CXXFLAGS} --with-zlib-include=${ZLIB_INCLUDE}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use the protobuf configure way of passing CPPFLAGS and LDFLAGS; this is basically the same we did before.

@@ -55,6 +55,7 @@ else()
-DRE2_BUILD_TESTING=OFF
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-DCMAKE_INSTALL_PREFIX=${RE2_SRC}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Build re2 with the same build type of the main project.

@@ -45,9 +45,13 @@ else()
"${ZLIB_INCLUDE}/zutil.h"
)
if(NOT TARGET zlib)
set(ZLIB_CFLAGS)
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(ZLIB_CFLAGS "-O3")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Build zlib with the same optimization of the main project.

@FedeDP
Copy link
Contributor Author

FedeDP commented Mar 11, 2025

/unhold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants