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

fix(ci): avoid running drivers CI jobs that need secrets in PR coming from forks #2060

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

FedeDP
Copy link
Contributor

@FedeDP FedeDP commented Sep 12, 2024

What type of PR is this?

/kind bug

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:

The current solution is not working because github.repository resolves to the target github repository that is always falcosecurity/libs.
That trick is needed to avoid run a github action on forks.
Instead, we need to avoid running a github action on PRs coming from forks; we need to rely on github.event.pull_request.head.repo.full_name.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@FedeDP
Copy link
Contributor Author

FedeDP commented Sep 12, 2024

/milestone 0.18.0

@poiana poiana added this to the 0.18.0 milestone Sep 12, 2024
Copy link

Perf diff from master - unit tests

     5.02%     -1.36%  [.] sinsp_evt::load_params
     5.59%     -1.31%  [.] next
     5.65%     +1.13%  [.] sinsp_evt::get_type
     4.34%     +0.83%  [.] sinsp_parser::process_event
     2.93%     -0.69%  [.] scap_event_decode_params
     0.27%     +0.66%  [.] std::_Hashtable<long, std::pair<long const, std::shared_ptr<sinsp_fdinfo> >, std::allocator<std::pair<long const, std::shared_ptr<sinsp_fdinfo> > >, 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> >::_M_find_before_node
     1.08%     -0.48%  [.] scap_event_has_large_payload
     1.51%     -0.47%  [.] std::vector<sinsp_evt_param, std::allocator<sinsp_evt_param> >::emplace_back<sinsp_evt*, unsigned int&, char const*, unsigned long&>
     5.68%     +0.44%  [.] sinsp::next
     1.03%     -0.42%  [.] 0x00000000000e93f0

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.0066         +0.0066           149           150           149           150
BM_sinsp_split_median                                          +0.0078         +0.0077           149           150           149           150
BM_sinsp_split_stddev                                          -0.4351         -0.4352             1             1             1             1
BM_sinsp_split_cv                                              -0.4388         -0.4389             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  -0.0080         -0.0080            47            46            47            46
BM_sinsp_concatenate_paths_relative_path_median                +0.0009         +0.0009            46            46            46            46
BM_sinsp_concatenate_paths_relative_path_stddev                +1.0118         +1.0108             0             1             0             1
BM_sinsp_concatenate_paths_relative_path_cv                    +1.0281         +1.0271             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0067         -0.0067            17            17            17            17
BM_sinsp_concatenate_paths_empty_path_median                   -0.0021         -0.0021            17            17            17            17
BM_sinsp_concatenate_paths_empty_path_stddev                   -0.3353         -0.3354             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       -0.3308         -0.3310             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  -0.0196         -0.0196            50            49            50            49
BM_sinsp_concatenate_paths_absolute_path_median                -0.0220         -0.0220            50            49            50            49
BM_sinsp_concatenate_paths_absolute_path_stddev                +0.9118         +0.9128             0             1             0             1
BM_sinsp_concatenate_paths_absolute_path_cv                    +0.9500         +0.9510             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0069         +0.0069           353           355           353           355
BM_sinsp_split_container_image_median                          +0.0139         +0.0139           350           355           350           355
BM_sinsp_split_container_image_stddev                          -0.5449         -0.5449             4             2             4             2
BM_sinsp_split_container_image_cv                              -0.5481         -0.5480             0             0             0             0

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.55%. Comparing base (5b9db23) to head (b30975f).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2060      +/-   ##
==========================================
- Coverage   73.55%   73.55%   -0.01%     
==========================================
  Files         253      253              
  Lines       31863    31863              
  Branches     5651     5632      -19     
==========================================
- Hits        23438    23437       -1     
+ Misses       8420     8400      -20     
- Partials        5       26      +21     
Flag Coverage Δ
libsinsp 73.55% <ø> (-0.01%) ⬇️

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.

@FedeDP
Copy link
Contributor Author

FedeDP commented Sep 12, 2024

Well, we can eventually move to 0.19.0, this is not urgent.

Copy link
Member

@Andreagit97 Andreagit97 left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link
Contributor

poiana commented Sep 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, 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 merged commit 16ac62f into master Sep 13, 2024
46 of 47 checks passed
@poiana poiana deleted the chore/avoid_running_secrets_jobs_forks branch September 13, 2024 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants