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

Accept filters multiple times in history list. #3979

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

blkt
Copy link
Contributor

@blkt blkt commented Jul 24, 2024

Summary

ListEvaluationHistory RPC accepts multiple entries for string-like filters, e.g. evaluation statuses, profile names, etc. While minder CLI internally manages those filters as slices, viper is not configured to accept repeated options.

This change makes it possible to provide --profile-name, --entity-name, --entity-type, --eval-status, --remediation-status, and --alert-status options multiple times with different values, all of which will eventually be passed to the backend as filters.

Fixes #3978

Change Type

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Manually tested against local and staging environment.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

ListEvaluationHistory RPC accepts multiple entries for string-like
filters, e.g. evaluation statuses, profile names, etc. While minder
CLI internally manages those filters as slices, viper is not
configured to accept repeated options.

This change makes it possible to provide `--profile-name`,
`--entity-name`, `--entity-type`, `--eval-status`,
`--remediation-status`, and `--alert-status` options multiple times
with different values, all of which will eventually be passed to the
backend as filters.

Fixes #3978
@blkt blkt self-assigned this Jul 24, 2024
@blkt blkt requested a review from a team as a code owner July 24, 2024 16:45
@coveralls
Copy link

Coverage Status

coverage: 54.343% (+0.01%) from 54.329%
when pulling 184c13f on fix-history-list-cli-filters
into b5ec456 on main.

@blkt blkt merged commit f5629d9 into main Jul 25, 2024
22 checks passed
@blkt blkt deleted the fix-history-list-cli-filters branch July 25, 2024 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accept filters multiple times in history list.
3 participants