Skip to content

fix(inputs.procstat): Fix user filter conditional logic #17178

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 18, 2025

Conversation

skartikey
Copy link
Contributor

@skartikey skartikey commented Jun 16, 2025

Summary

Filter by users conditional logic is incorrect. Currently, it will continue (skip the process) when:

  1. username != "" (username is not empty) OR
  2. !f.filterUser.Match(username) (username doesn't match the filter)

This means it will skip processes even when they have valid usernames that DO match the filter, which is likely not what we want.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #

The logic is incorrect. Currently, it will continue (skip the process) when:

username != "" (username is not empty) OR
!f.filterUser.Match(username) (username doesn't match the filter)

This means it will skip processes even when they have valid usernames that DO match the filter, which is likely not what we want.
@telegraf-tiger telegraf-tiger bot added area/procstat fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Jun 16, 2025
@skartikey skartikey changed the title fix(inputs.procstat): Filter by users conditional logic fix(inputs.procstat): Fix user filter conditional logic Jun 16, 2025
@telegraf-tiger
Copy link
Contributor

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks @skartikey!

@srebhan srebhan removed their assignment Jun 18, 2025
@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jun 18, 2025
@mstrandboge mstrandboge merged commit 9e9bbc5 into influxdata:master Jun 18, 2025
30 of 31 checks passed
@github-actions github-actions bot added this to the v1.35.1 milestone Jun 18, 2025
srebhan pushed a commit that referenced this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/procstat fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants