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

feat: adding flag filter for custom analyzer #1375

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

naveenthangaraj03
Copy link
Contributor

@naveenthangaraj03 naveenthangaraj03 commented Feb 17, 2025

Closes #

📑 Description

ISSUES:

  • If we run "k8sgpt analyze --custom-analysis" it will fetch all the all the custom analyzer as well as the active filters
  • We need to run separate server for each custom analyzer
  • Filter is not defined for custom analyzer

RESOLVED:

  • If "--custom-analysis" is used it will get only the custom analyzer results, it will not include active filters
  • If flag filter is specified for custom analyzer it will get the particular custom analyzer
  • If flag filter is not specified in custom-analyzer it will get all the custom-analyzer results
  • Passing filter name for custom analyzer server so that single server will handle multiple custom analyzer and run that particular custom analyzer resource based on switch case or if else

image

image

  • In server we can write code logic based on the filter name

image

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

ℹ Additional Information

@naveenthangaraj03 naveenthangaraj03 requested review from a team as code owners February 17, 2025 13:49
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

Attention: Patch coverage is 0% with 55 lines in your changes missing coverage. Please review.

Project coverage is 34.04%. Comparing base (173e4dc) to head (935b4cd).
Report is 50 commits behind head on main.

Files with missing lines Patch % Lines
pkg/analysis/analysis.go 0.00% 49 Missing ⚠️
pkg/custom/client.go 0.00% 4 Missing ⚠️
cmd/analyze/analyze.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1375      +/-   ##
==========================================
- Coverage   34.76%   34.04%   -0.73%     
==========================================
  Files          94       97       +3     
  Lines        6342     6515     +173     
==========================================
+ Hits         2205     2218      +13     
- Misses       4046     4204     +158     
- Partials       91       93       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

naveenthangaraj added 3 commits February 18, 2025 04:46
Signed-off-by: naveenthangaraj <[email protected]>
Signed-off-by: naveenthangaraj <[email protected]>
Signed-off-by: naveenthangaraj <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Proposed
Development

Successfully merging this pull request may close these issues.

1 participant