Project

General

Profile

Actions

Bug #8775

closed

Applicable errata is not a subset of available errata

Added by Stephen Benjamin over 9 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
Errata Management
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

The second query looks right to me at first glance, and can't see at all how it's generating a higher number... available should be a subset of applicable always. This is causing some oddness in mails with negative numbers and such.

Applicable errata:

irb(main):018:0> system.applicable_errata.count
   (0.9ms)  SELECT COUNT(*) FROM "katello_errata" INNER JOIN "katello_system_errata" ON "katello_errata"."id" = "katello_system_errata"."erratum_id" WHERE "katello_system_errata"."system_id" = 17
=> 26

Available errata:

irb(main):019:0> system.available_errata.count
  Katello::Repository Load (0.8ms)  SELECT "katello_repositories".* FROM "katello_repositories" INNER JOIN "katello_system_repositories" ON "katello_repositories"."id" = "katello_system_repositories"."repository_id" WHERE "katello_system_repositories"."system_id" = 17 ORDER BY katello_repositories.name ASC
   (1.0ms)  SELECT COUNT(*) FROM "katello_errata" INNER JOIN "katello_repository_errata" ON "katello_repository_errata"."erratum_id" = "katello_errata"."id" INNER JOIN "katello_system_errata" ON "katello_errata"."id" = "katello_system_errata"."erratum_id" WHERE "katello_system_errata"."system_id" = 17 AND "katello_repository_errata"."repository_id" IN (72, 44, 8, 7, 45)
=> 42

Actions #1

Updated by Stephen Benjamin over 9 years ago

Ah, there's duplicate errata:

system.available_errata.map(&:errata_id).count = 42
system.available_errata.map(&:errata_id).sort.uniq.count = 26

Actions #2

Updated by The Foreman Bot over 9 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 62
  • Pull request https://github.com/Katello/katello/pull/4891 added
  • Pull request deleted ()
Actions #3

Updated by Justin Sherrill over 9 years ago

  • Translation missing: en.field_release set to 14
Actions #4

Updated by Anonymous over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #5

Updated by Eric Helms over 9 years ago

  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF