Project

General

Profile

Actions

Bug #39112

closed

orphan cleanup triggers CapsuleContent::UpdateContentCounts regardless of automatic_content_count_updates setting

Added by Pavel Moravec 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Foreman Proxy Content
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Description of problem:

automatic_content_count_updates Setting should disable Capsule's automated content stats recalculation. Yet the `::Actions::Katello::CapsuleContent::UpdateContentCounts` task is triggered at the end of `Actions::Katello::OrphanCleanup::RemoveOrphans` task, regardless of the settings value.

How reproducible:

100%

Is this issue a regression from an earlier version:

No

Steps to Reproduce:

1. Have an external Capsule

2. Set `automatic_content_count_updates=false`

3. Launch orphan cleanup (`foreman-rake katello:delete_orphaned_content`)

4. Check what tasks are triggered.

Actual behavior:
Remove Orphans task is triggered for each Capsule.

Update Content Counts is triggered for each external Capsule as well.

Expected behavior:
No Update Content Counts (until automatic_content_count_updates is reset to True)

Business Impact / Additional info:

I will create a PR with the fix. Simply, `app/lib/actions/katello/orphan_cleanup/remove_orphans.rb` needs to run finalize phase conditionally.

Actions #1

Updated by The Foreman Bot 5 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/11660 added
Actions #2

Updated by The Foreman Bot 4 months ago

  • Fixed in Releases Katello 4.21.0 added
Actions #3

Updated by Pavel Moravec 4 months ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by Quinn James 4 months ago

  • Category set to Foreman Proxy Content
  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF