Skip to content

make gen_compile_commands for tetragon #3698

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

Merged
merged 1 commit into from
Jun 23, 2025
Merged

Conversation

0xMALVEE
Copy link
Contributor

@0xMALVEE 0xMALVEE commented May 3, 2025

Fixes
#3697

Description

just like in cilium, make gen_compile_commands will generate compile_commands.json using bear.
It's used for some IDE to analyze codebase better and ensure no linting errors are shown by following includes paths

@0xMALVEE 0xMALVEE requested a review from a team as a code owner May 3, 2025 07:32
@0xMALVEE 0xMALVEE requested a review from jrfastab May 3, 2025 07:32
@ghost ghost added the release-note/misc This PR makes changes that have no direct user impact. label May 5, 2025
@0xMALVEE 0xMALVEE force-pushed the compile-commands branch from 4794255 to 0229f83 Compare May 5, 2025 10:20
@ghost
Copy link

ghost commented May 5, 2025

@0xMALVEE Thank you for the PR. For reference, here are the guidelines for commits in the Tetragon project: https://tetragon.io/docs/contribution-guide/submitting-a-pull-request/#commit-changes If you could write a more descriptive commit message that would be great, but IMO it's also fine to merge as is.

@0xMALVEE 0xMALVEE force-pushed the compile-commands branch 2 times, most recently from 141b059 to bd9f72e Compare May 6, 2025 09:37
@0xMALVEE 0xMALVEE requested a review from a user May 16, 2025 20:51
@0xMALVEE
Copy link
Contributor Author

0xMALVEE commented May 26, 2025

@lambdanis updated the commit according to commit guidelines. <3

@0xMALVEE 0xMALVEE force-pushed the compile-commands branch from c9fe331 to 14ebc40 Compare June 3, 2025 21:08
@0xMALVEE 0xMALVEE requested a review from kkourt June 5, 2025 04:45
Copy link
Contributor

@kkourt kkourt left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Contributor

@kkourt kkourt left a comment

Choose a reason for hiding this comment

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

@0xMALVEE 👋🏼

Could you please fix the checkpatch warnings?

Copy link

netlify bot commented Jun 10, 2025

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit b11be28
🔍 Latest deploy log https://app.netlify.com/projects/tetragon/deploys/68592935a160d10008c539be
😎 Deploy Preview https://deploy-preview-3698--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mtardy
Copy link
Member

mtardy commented Jun 10, 2025

I'm sorry this is still failing, I think you need to do that:

-Signed-off-by: M Alvee <m.alvee8141@gmail.com>
-Co-Authored-By: Kornilios Kourtis <kkourt@users.noreply.github.com>
+Co-authored-By: Kornilios Kourtis <kkourt@users.noreply.github.com>
+Signed-off-by: M Alvee <m.alvee8141@gmail.com>

remove A in authored, and maybe switch co-authored and signed-off.

Sorry I know this is a bit annoying

@0xMALVEE 0xMALVEE requested a review from kkourt June 14, 2025 16:44
Copy link
Contributor

@kkourt kkourt left a comment

Choose a reason for hiding this comment

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

Thanks!

@kkourt
Copy link
Contributor

kkourt commented Jun 18, 2025

Warning: WARNING:BAD_SIGN_OFF: 'Co-authored-by:' is the preferred signature form

:(

Indeed very annoying. Feel free to remove it :)

@mtardy
Copy link
Member

mtardy commented Jun 18, 2025

Warning: WARNING:BAD_SIGN_OFF: 'Co-authored-by:' is the preferred signature form

:(

Indeed very annoying. Feel free to remove it :)

oh my... I missed the uppercase B in my reco sorry

@ghost ghost removed their request for review June 18, 2025 12:44
@0xMALVEE
Copy link
Contributor Author

Warning: WARNING:BAD_SIGN_OFF: 'Co-authored-by:' is the preferred signature form

:(
Indeed very annoying. Feel free to remove it :)

oh my... I missed the uppercase B in my reco sorry

I have updated with "b"

@0xMALVEE
Copy link
Contributor Author

I think the project should have pre commit hooks to check commits details when user comits, rather then in github actions. What you guys think

@mtardy
Copy link
Member

mtardy commented Jun 23, 2025

image

I don't understand what's happening, I have been trying to repro locally but it doesn't make any sense. Let me try to push to your PR to rebase and see because even the error displayed doesn't make sense. 🤔

Tetragon project doesn't have a command to generate
compile_commands.json for clang.

This commit fixes that by:
1. Adding make gen_compile_commands just like in cilium

Fixes: cilium#3697

Co-authored-by: Kornilios Kourtis <kornilios@isovalent.com>
Signed-off-by: M Alvee <m.alvee8141@gmail.com>
@mtardy mtardy force-pushed the compile-commands branch from b11be28 to de7ac97 Compare June 23, 2025 10:36
@mtardy
Copy link
Member

mtardy commented Jun 23, 2025

I think the project should have pre commit hooks to check commits details when user comits, rather then in github actions. What you guys think

Yeah that could be an idea maybe just having a target for first contributors to trigger checkpatch and such static checks could be an idea as well (looking at the static-checks YAML GitHub actions could give an idea, in addition to checkpatch).

Unrelated to this, sorry the contribution was such a poor experience, I admit for this kind of patch, it should have been merged quickly and you shouldn't have to do all these edits! Sorry, I hope you still want to contribute to Tetragon :)

Copy link
Member

@mtardy mtardy left a comment

Choose a reason for hiding this comment

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

Hopefully this passes CI and we can merge this :)

@mtardy mtardy removed the request for review from jrfastab June 23, 2025 10:47
@mtardy mtardy merged commit f8dd5df into cilium:main Jun 23, 2025
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants