-
Notifications
You must be signed in to change notification settings - Fork 218
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: fix Conntrack GC running in Retina default #1323
base: main
Are you sure you want to change the base?
fix: fix Conntrack GC running in Retina default #1323
Conversation
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @manojks1999, thanks for opening this PR! Can you please fix all unsuccessful checks? If needed you can "convert to draft" and then switch to "ready for review" once you are done.
…99/retina into disabling_gc_with_packetparser
@SRodi , I have fixed the runtime build, able to create a make file locally, but unable to create a docker file as some dependency issue in config. |
@SRodi, I have made changes now we are getting the correct output,
Please verify once and also can you provide command related to helm install |
@SRodi Added a set method for the widows files too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@manojks1999 Thanks for looking into this. I don't think we want and/or is necessary to add the config to Conntrack struct. Have you looked into adding a conditional when we start Conntrack?
retina/pkg/managers/pluginmanager/pluginmanager.go
Lines 140 to 141 in 819a9ee
// run conntrack GC | |
ct, err := conntrack.New() |
Also, for development environment set up instructions please see this doc https://retina.sh/docs/Contributing/development
Make sure this is tested and you add test results (or screenshots) to the PR description when possible. Please also provide a clear description for this PR.
I'll mark this PR as draft for now, once you have all bits in order, please feel free to change it to "Ready to review". Thanks again!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By removing the function isPluginEnables
you should also be able to fix the existing golint errors on receiver name and shadow declaration.
Error: pkg/managers/pluginmanager/pluginmanager.go:214:1: receiver-naming: receiver name pm should be consistent with previous receiver name p for PluginManager (revive)
func (pm *PluginManager) isPluginEnabled(name string) bool {
if pm.cfg.EnabledPlugin == nil {
return false
}
for _, plugin := range pm.cfg.EnabledPlugin {
if plugin == name {
return true
}
}
return false
}
Error: pkg/managers/pluginmanager/pluginmanager.go:1[42](https://github.com/microsoft/retina/actions/runs/13476073474/job/37767750405?pr=1323#step:4:44):7: shadow: declaration of "err" shadows declaration at line 119 (govet)
ct, err := conntrack.New()
^
@SRodi made a changes with variable names |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I'd like @nddq to also take a look/approve. Please @manojks1999 also update the branch based on latest main.
@manojks1999 please sign the commits so we can merge this, thanks! |
Sure will do that |
Description
Please provide a brief description of the changes made in this pull request.
Related Issue
#1314
Below are changes made in current PR:
Checklist
git commit -S -s ...
). See this documentation on signing commits.