-
Notifications
You must be signed in to change notification settings - Fork 310
Fix cyclomatic complexity linter warnings #1708
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
marcofranssen
merged 2 commits into
fluent:master
from
marcofranssen:fix-cyclo-complexity
Oct 7, 2025
Merged
Fix cyclomatic complexity linter warnings #1708
marcofranssen
merged 2 commits into
fluent:master
from
marcofranssen:fix-cyclo-complexity
Oct 7, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
04fe75d to
6da3f3f
Compare
df78188 to
7f49a0d
Compare
4457093 to
16a83b3
Compare
c07c23c to
9f6b95f
Compare
Signed-off-by: Marco Franssen <[email protected]>
Signed-off-by: Marco Franssen <[email protected]>
9f6b95f to
30cd0c3
Compare
joshuabaird
added a commit
to joshuabaird/fluent-operator
that referenced
this pull request
Nov 17, 2025
ClusterParsers and ClusterMultilineParsers are cluster-scoped resources and should not be filtered by namespace. This bug was introduced in commit 30cd0c3 (PR fluent#1708) where the code was refactored to use a listNamespacedResources helper function that incorrectly added namespace filtering for cluster-scoped resources. This caused ClusterParsers referenced from namespace-scoped Filters to not be generated in parsers.conf with their hash-suffixed names, leading to fluent-bit pods crashlooping with 'requested parser not found' errors. The fix: 1. Changes the function to use listClusterResources (which doesn't filter by namespace) for ClusterParsers and ClusterMultilineParsers. 2. Renames ListNamespacedResources to ListFluentBitConfigResources to better reflect that it lists both namespaced and cluster-scoped resources needed by a FluentBitConfig. Note: The original code (pre-refactor) also had a bug where ClusterMultilineParsers were incorrectly filtered by namespace. Fixes fluent#1778
joshuabaird
added a commit
to joshuabaird/fluent-operator
that referenced
this pull request
Nov 17, 2025
ClusterParsers and ClusterMultilineParsers are cluster-scoped resources and should not be filtered by namespace. This bug was introduced in commit 30cd0c3 (PR fluent#1708) where the code was refactored to use a listNamespacedResources helper function that incorrectly added namespace filtering for cluster-scoped resources. This caused ClusterParsers referenced from namespace-scoped Filters to not be generated in parsers.conf with their hash-suffixed names, leading to fluent-bit pods crashlooping with 'requested parser not found' errors. The fix: 1. Changes the function to use listClusterResources (which doesn't filter by namespace) for ClusterParsers and ClusterMultilineParsers. 2. Renames ListNamespacedResources to ListFluentBitConfigResources to better reflect that it lists both namespaced and cluster-scoped resources needed by a FluentBitConfig. Note: The original code (pre-refactor) also had a bug where ClusterMultilineParsers were incorrectly filtered by namespace. Fixes fluent#1778 Signed-off-by: Josh Baird <[email protected]>
marcofranssen
pushed a commit
to joshuabaird/fluent-operator
that referenced
this pull request
Nov 18, 2025
ClusterParsers and ClusterMultilineParsers are cluster-scoped resources and should not be filtered by namespace. This bug was introduced in commit 30cd0c3 (PR fluent#1708) where the code was refactored to use a listNamespacedResources helper function that incorrectly added namespace filtering for cluster-scoped resources. This caused ClusterParsers referenced from namespace-scoped Filters to not be generated in parsers.conf with their hash-suffixed names, leading to fluent-bit pods crashlooping with 'requested parser not found' errors. The fix: 1. Changes the function to use listClusterResources (which doesn't filter by namespace) for ClusterParsers and ClusterMultilineParsers. 2. Renames ListNamespacedResources to ListFluentBitConfigResources to better reflect that it lists both namespaced and cluster-scoped resources needed by a FluentBitConfig. Note: The original code (pre-refactor) also had a bug where ClusterMultilineParsers were incorrectly filtered by namespace. Fixes fluent#1778 Signed-off-by: Josh Baird <[email protected]>
marcofranssen
pushed a commit
that referenced
this pull request
Nov 18, 2025
…) (#1779) * Fix ClusterParser namespace filtering bug (#1778) ClusterParsers and ClusterMultilineParsers are cluster-scoped resources and should not be filtered by namespace. This bug was introduced in commit 30cd0c3 (PR #1708) where the code was refactored to use a listNamespacedResources helper function that incorrectly added namespace filtering for cluster-scoped resources. This caused ClusterParsers referenced from namespace-scoped Filters to not be generated in parsers.conf with their hash-suffixed names, leading to fluent-bit pods crashlooping with 'requested parser not found' errors. The fix: 1. Changes the function to use listClusterResources (which doesn't filter by namespace) for ClusterParsers and ClusterMultilineParsers. 2. Renames ListNamespacedResources to ListFluentBitConfigResources to better reflect that it lists both namespaced and cluster-scoped resources needed by a FluentBitConfig. Note: The original code (pre-refactor) also had a bug where ClusterMultilineParsers were incorrectly filtered by namespace. Fixes #1778 Signed-off-by: Josh Baird <[email protected]> * Fix linting errors. Signed-off-by: Josh Baird <[email protected]> --------- Signed-off-by: Josh Baird <[email protected]>
sugaf1204
pushed a commit
to sugaf1204/fluent-operator
that referenced
this pull request
Dec 22, 2025
…ent#1778) (fluent#1779) * Fix ClusterParser namespace filtering bug (fluent#1778) ClusterParsers and ClusterMultilineParsers are cluster-scoped resources and should not be filtered by namespace. This bug was introduced in commit 30cd0c3 (PR fluent#1708) where the code was refactored to use a listNamespacedResources helper function that incorrectly added namespace filtering for cluster-scoped resources. This caused ClusterParsers referenced from namespace-scoped Filters to not be generated in parsers.conf with their hash-suffixed names, leading to fluent-bit pods crashlooping with 'requested parser not found' errors. The fix: 1. Changes the function to use listClusterResources (which doesn't filter by namespace) for ClusterParsers and ClusterMultilineParsers. 2. Renames ListNamespacedResources to ListFluentBitConfigResources to better reflect that it lists both namespaced and cluster-scoped resources needed by a FluentBitConfig. Note: The original code (pre-refactor) also had a bug where ClusterMultilineParsers were incorrectly filtered by namespace. Fixes fluent#1778 Signed-off-by: Josh Baird <[email protected]> * Fix linting errors. Signed-off-by: Josh Baird <[email protected]> --------- Signed-off-by: Josh Baird <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to #1707