Project

General

Profile

Bug #27885

Content View Package Filter Rule architecture will not include all arches after updating

Added by John Mitsch 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Content Views
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

To reproduce:
- Add repos to content view
- Create an excluding Content View package filter
- Save rule for a package included in the content view, but don't add an architecture. Specify "All Versions"
- Publish the content view (or use "show matching content" button if available) and see that its filtered out all rpms with that name. This is expected
- Edit the rule and save, keep the architecture blank again.
- Publish or check the rule again, notice now it doesn't filter out the packages

Expected:
Filter continues to filter out all architectures with blank arch

It seems to be saving the architecture as nil on creation but "" on save

Associated revisions

Revision f7f4fedf (diff)
Added by John Mitsch 4 months ago

Fixes #27885 - Make architecture more flexible in CV filter rule

This allow an empty string to be used for the package filter rule architecture, keeping it more flexible.

We shouldn't enforce a strict nil as API clients, hammer, and the UI could be doing different things and
as long as its an "empty" value, we should treat it as matching all arches

I also added tests and switched !foo.blank? to foo.present? as the double negative is a bit confusing. They return opposite values so no behavior should change.
(`.present?` might not have been available when this was written)

See the issue for reproducing details

History

#1 Updated by Justin Sherrill 5 months ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.14.0
  • Category set to Content Views

#2 Updated by The Foreman Bot 4 months ago

  • Fixed in Releases Katello 3.15.0 added

#3 Updated by John Mitsch 4 months ago

  • Status changed from New to Closed

Also available in: Atom PDF