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

Add job group filter options for /tests/overview #5388

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

kraih
Copy link
Member

@kraih kraih commented Dec 6, 2023

This change introduces Text::Glob as a new dependency. Because globs are much safer for user provided input than regular expressions, which are prone to ReDoS attacks.

Progress: https://progress.opensuse.org/issues/134933

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fbad594) 98.36% compared to head (1505a6a) 98.36%.
Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5388   +/-   ##
=======================================
  Coverage   98.36%   98.36%           
=======================================
  Files         389      389           
  Lines       37454    37490   +36     
=======================================
+ Hits        36840    36876   +36     
  Misses        614      614           

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

@kraih
Copy link
Member Author

kraih commented Dec 6, 2023

This is what the new include and exclude filter options look like, both are comma separated lists of globs:
overview

<%= help_popover('Help for the <em>Include job group</em> filter' => '
<p>Shows jobs from job groups matching these globs</p>') %>
<input name="group_glob" type="text" id="group-glob"
placeholder="globs, comma separated, e.g. *kernel*,*Tumbleweed*"
Copy link
Member Author

Choose a reason for hiding this comment

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

The default globs are not very creative, there's probably better ones to show. 🤔

@kraih
Copy link
Member Author

kraih commented Dec 6, 2023

While i've only really used the zero or more character syntax in tests, there's other options as well: https://metacpan.org/pod/Text::Glob#SYNTAX

This change introduces Text::Glob as a new dependency. Because globs are
much safer for user provided input than regular expressions, which are
prone to ReDoS attacks.

Progress: https://progress.opensuse.org/issues/134933
@mergify mergify bot merged commit f2e8217 into master Dec 7, 2023
41 checks passed
@mergify mergify bot deleted the k/job_group_filters branch December 7, 2023 11:39
kraih added a commit that referenced this pull request Dec 21, 2023
Based on #5388, and reusing most of the same logic, to bring job
group filtering to `/tests` from `/tests/overview`. Similar to the
`?match=...` option, this does not have a UI element yet and can
only be used by manually entering the query parameter. Since the
question of how to extend the filter form with text fields is still
open, i consider it out of scope for this PR.

Progress: https://progress.opensuse.org/issues/134933
kraih added a commit that referenced this pull request Dec 22, 2023
Based on #5388, and reusing most of the same logic, to bring job
group filtering to `/tests` from `/tests/overview`. Similar to the
`?match=...` option, this does not have a UI element yet and can
only be used by manually entering the query parameter. Since the
question of how to extend the filter form with text fields is still
open, i consider it out of scope for this PR.

Progress: https://progress.opensuse.org/issues/134933
kraih added a commit that referenced this pull request Dec 22, 2023
This is a followup for #5388 and #5401. When there were no matches for
job group globs, no query condition would be generated previously. Giving
the false impression that all job groups were matching. So now we just
generate an impossible query that cannot match anything with the group
id `0`.

Progress: https://progress.opensuse.org/issues/134933
kraih added a commit that referenced this pull request Dec 22, 2023
This is a followup for #5388 and #5401. When there were no matches for
job group globs, no query condition would be generated previously. Giving
the false impression that all job groups were matching. So now we just
generate an impossible query that cannot match anything with the group
id `0`.

Progress: https://progress.opensuse.org/issues/134933
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.

4 participants