falco icon indicating copy to clipboard operation
falco copied to clipboard

fix(build): metrics compilation after refactoring into classes

Open Molter73 opened this issue 1 year ago • 15 comments

What type of PR is this?

/kind cleanup

Any specific area of the project related to this PR?

/area build

What this PR does / why we need it: Once falcosecurity/libs#1920 is merged, compilation of falco will be broken due to the new_metric method changing the class it lives in. This PR makes falco compatible with this change.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer: The commit that changes the libs cmake files will be dropped and replaced with a commit that properly updates the libs commit and SHA once falcosecurity/libs#1920 is merged, please disregard these changes until that merge occurs.

Does this PR introduce a user-facing change?:

NONE

Molter73 avatar Jun 27 '24 13:06 Molter73

/hold

Molter73 avatar Jun 27 '24 13:06 Molter73

/cc @FedeDP @incertum

Molter73 avatar Jun 27 '24 13:06 Molter73

Thanks Mauro for taking care of this!

FedeDP avatar Jun 27 '24 13:06 FedeDP

I'm a bit confused as to why those driver tests are failing, these PRs don't do any changes to driver code or its corresponding userspace components. Any ideas?

Molter73 avatar Jun 27 '24 14:06 Molter73

It happens sometimes; probably mismatch between kernel headers package and runner kernel (or bugged headers package); rnothing to worry about for you! Restarted :)

FedeDP avatar Jun 27 '24 14:06 FedeDP

Kmod failed again, but I need to fix the cmake files after I merge the libs PR anyways. @FedeDP, what do you think? Am I OK to unhold the libs PR?

Molter73 avatar Jun 27 '24 14:06 Molter73

Yes no problem, the issue is not dependent on your changes!

FedeDP avatar Jun 27 '24 14:06 FedeDP

/unhold

Molter73 avatar Jun 27 '24 14:06 Molter73

@Molter73 we usually have the habit to bump both libs and driver during the dev phase. Few times we didn't do it and it caused compatibility issues. If you agree we can just continue bumping both together?

incertum avatar Jun 27 '24 15:06 incertum

/milestone 0.39.0

FedeDP avatar Jun 27 '24 15:06 FedeDP

Sorry it took a bit, I've bumped the driver version so it matches libs.

Molter73 avatar Jun 28 '24 08:06 Molter73

I'm guessing the error I'm getting is related to this commit: https://github.com/falcosecurity/libs/commit/fac0ae442474bc1265d2ddc54a3f12557337a821

How do we want to handle it?

Molter73 avatar Jun 28 '24 09:06 Molter73

Yep! I already tagged Gerald in that PR to ask him to double check ;) Not a big deal, we can wait and then bump libs and driver here once the fix PR is merged.

FedeDP avatar Jun 28 '24 09:06 FedeDP

One of these days I'll get this PR to pass CI...

Molter73 avatar Jul 01 '24 09:07 Molter73

/hold for possible patches https://github.com/falcosecurity/falco/issues/3271#issuecomment-2206918760. Do not merge prior to having made a decision.

incertum avatar Jul 03 '24 18:07 incertum

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Molter73 Once this PR has been reviewed and has the lgtm label, please assign mstemm for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 avatar Aug 05 '24 16:08 poiana

I'm guessing the 3 issues are due to some change that bled in with the latest libs bump, I was having some issues linking unit tests locally, I'll look into them when I get a minute.

Molter73 avatar Aug 05 '24 16:08 Molter73

@jasondellaluce looks like the unit test errors I got are due to some warning messages being changed in falcosecurity/libs#1831, could you double check I got those right in the last commit?

Molter73 avatar Aug 06 '24 12:08 Molter73

Now it looks like ASAN is not very happy, tried to run the tests locally with a debug build and the errors seem related to falcosecurity/libs#1992, would appreciate some confirmation.

Molter73 avatar Aug 06 '24 14:08 Molter73

@Molter73 AFAIK the ASan failures are fixed by https://github.com/falcosecurity/libs/pull/1992 , I'm writing some tests for those and will merge the PR soon. I'm not sure why the asan crashes started appearing now.

LucaGuerra avatar Aug 06 '24 14:08 LucaGuerra

No worries, I'll update this PR after you merge!

Molter73 avatar Aug 06 '24 15:08 Molter73

I'm gonna need some help understanding the last errors I'm getting, seems something has been broken with the legacy rules?

Molter73 avatar Aug 07 '24 10:08 Molter73

This is the same error we are gettng on #3283 . Needs further investigation... Also this and #3283 are basically the same, i'd close one of them (well this is older and we should keep this but the other is on an upstream branch that is much easier to work with to fix the test issues; let me know if you wish to keep this one, i'll close the other!)

FedeDP avatar Aug 21 '24 07:08 FedeDP

Closing in favor of #3283, let me know if any help is needed on that PR!

Molter73 avatar Aug 21 '24 11:08 Molter73