Skip to content

Conversation

@yanivagman
Copy link
Collaborator

Fix BoolFilter.Parse() to use 'not-new' instead of '!new'. The '!' prefix is not recognized by BoolFilter, causing these filters to incorrectly match new containers/processes instead of excluding them.

Fix BoolFilter.Parse() to use 'not-new' instead of '!new'.
The '!' prefix is not recognized by BoolFilter, causing these
filters to incorrectly match new containers/processes instead
of excluding them.
@yanivagman yanivagman self-assigned this Nov 3, 2025
Copilot AI review requested due to automatic review settings November 3, 2025 15:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in the parsing of container and process filters where the !=new operator was incorrectly using !new syntax, which is not recognized by BoolFilter.Parse(). The fix changes these to use the correct not-new syntax to properly exclude new containers and processes.

Key Changes

  • Updated NewContFilter.Parse() call to use "not-new" instead of "!new"
  • Updated NewPidFilter.Parse() call to use "not-new" instead of "!new"

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@e4492f4). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pkg/cmd/flags/policy.go 0.00% 2 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5009   +/-   ##
=======================================
  Coverage        ?   29.71%           
=======================================
  Files           ?      234           
  Lines           ?    26180           
  Branches        ?        0           
=======================================
  Hits            ?     7780           
  Misses          ?    17861           
  Partials        ?      539           
Flag Coverage Δ
unit 29.71% <0.00%> (?)
Files with missing lines Coverage Δ
pkg/cmd/flags/policy.go 68.93% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@josedonizetti josedonizetti left a comment

Choose a reason for hiding this comment

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

@yanivagman I don't mind merging this as is. Though, can we in a follow up PR add tests case to cover not new? Thanks

btw, if you short on time, I can do a PR for it myself, let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants